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

Class dmap

imperative/python/megengine/serialization.py:72–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72class dmap:
73 def __init__(self, map_location):
74 self.map_location = map_location
75
76 def __enter__(self):
77 Tensor.dmap_callback = staticmethod(self.map_location)
78 return self
79
80 def __exit__(self, type, value, traceback):
81 Tensor.dmap_callback = None
82
83
84def _get_callable_map_location(map_location):

Callers 2

loadFunction · 0.85
device2objFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected