MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / restore_location

Function restore_location

python/oneflow/framework/check_point_v2.py:225–226  ·  view source on GitHub ↗
(storage, location=None)

Source from the content-addressed store, hash-verified

223 elif isinstance(map_location, (str, flow.device)):
224
225 def restore_location(storage, location=None):
226 return storage.to(device=map_location)
227
228 elif isinstance(map_location, flow.placement):
229

Callers 2

smart_toFunction · 0.85
module_toFunction · 0.85

Calls 3

toMethod · 0.45
to_globalMethod · 0.45

Tested by

no test coverage detected