MCPcopy Create free account
hub / github.com/tdrussell/diffusion-pipe / storage_from_cache

Function storage_from_cache

utils/reduction.py:536–540  ·  view source on GitHub ↗
(cls, key)

Source from the content-addressed store, hash-verified

534
535
536def storage_from_cache(cls, key):
537 storage_ref = shared_cache.get(key)
538 if storage_ref is None:
539 return None
540 return torch.UntypedStorage._new_with_weak_ptr(storage_ref.cdata)
541
542
543def rebuild_storage_fd(cls, df, size):

Callers 3

rebuild_cuda_tensorFunction · 0.85
rebuild_storage_fdFunction · 0.85
rebuild_storage_filenameFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected