MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / evictee_minimum_size

Function evictee_minimum_size

imperative/python/megengine/dtr/dtr.py:57–74  ·  view source on GitHub ↗

r"""Get or set the memory threshold of tensors in bytes. It can also be set to a string, whose formatting supports byte(B), kilobyte(KB), megabyte(MB) and gigabyte(GB) units. Note: Only tensors whose size exceeds this threshold will be added to the candidate set. A ten

(mod)

Source from the content-addressed store, hash-verified

55
56@property
57def evictee_minimum_size(mod):
58 r"""Get or set the memory threshold of tensors in bytes. It can also be set to a
59 string, whose formatting supports byte(B), kilobyte(KB), megabyte(MB) and
60 gigabyte(GB) units.
61
62 Note:
63 Only tensors whose size exceeds this threshold will be added to the
64 candidate set. A tensor that is not added to the candidate set will
65 never be evicted during its lifetime.
66
67 Examples:
68
69 .. code-block::
70
71 import megengine as mge
72 mge.dtr.evictee_minimum_size = "2MB"
73 """
74 return _evictee_minimum_size
75
76
77@evictee_minimum_size.setter

Callers

nothing calls this directly

Calls 1

_str2bytesFunction · 0.85

Tested by

no test coverage detected