MCPcopy
hub / github.com/deepspeedai/DeepSpeed / pin_memory

Method pin_memory

accelerator/hpu_accelerator.py:234–235  ·  view source on GitHub ↗
(self, tensor, align_bytes=1)

Source from the content-addressed store, hash-verified

232 return functools.partial(torch.tensor, dtype=torch.long, device='hpu')
233
234 def pin_memory(self, tensor, align_bytes=1):
235 return tensor.pin_memory(self.device())
236
237 def is_pinned(self, tensor):
238 return tensor.is_pinned()

Callers 15

_build_writerFunction · 0.45
test_parallel_readMethod · 0.45
test_async_readMethod · 0.45
test_readMethod · 0.45
test_offset_writeMethod · 0.45
test_offset_readMethod · 0.45
move_keyFunction · 0.45
offload_adam_states_syncFunction · 0.45
move_keyFunction · 0.45

Calls 1

deviceMethod · 0.95

Tested by 10

_build_writerFunction · 0.36
test_parallel_readMethod · 0.36
test_async_readMethod · 0.36
test_readMethod · 0.36
test_offset_writeMethod · 0.36
test_offset_readMethod · 0.36