MCPcopy Create free account
hub / github.com/CERT-Lab/lora-sb / pack

Method pack

utils/offload_utils_for_quant/graph_hook.py:24–28  ·  view source on GitHub ↗
(x: torch.Tensor)

Source from the content-addressed store, hash-verified

22
23 @staticmethod
24 def pack(x: torch.Tensor):
25 if offload_condition(x):
26 return x.device, x.to(OffloadSavedTensorHook.offload_device)
27 else:
28 return x.device, x

Callers

nothing calls this directly

Calls 1

offload_conditionFunction · 0.85

Tested by

no test coverage detected