MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / _load_cpu_pin_buffer

Method _load_cpu_pin_buffer

lightx2v/common/ops/tensor/tensor.py:67–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65 tensor = tensor.to(self.infer_dtype)
66 else:
67 tensor = weight_dict[self.tensor_name]
68 return tensor
69
70 def _create_cpu_pin_tensor(self, tensor):
71 pin_tensor = torch.empty(tensor.shape, pin_memory=True, dtype=tensor.dtype)
72 pin_tensor.copy_(tensor)

Callers 1

loadMethod · 0.95

Calls 2

_get_tensorMethod · 0.95

Tested by

no test coverage detected