MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / new_cpu_locked_tensor

Method new_cpu_locked_tensor

csrc/aio/py_lib/deepspeed_py_io_handle.cpp:357–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357at::Tensor deepspeed_io_handle_t::new_cpu_locked_tensor(const int64_t num_elem,
358 const torch::Tensor& example_tensor)
359{
360 return _pinned_tensor_mgr->alloc(num_elem, example_tensor.scalar_type());
361}
362
363bool deepspeed_io_handle_t::free_cpu_locked_tensor(torch::Tensor& locked_tensor)
364{

Callers 9

test_parallel_readMethod · 0.80
test_async_readMethod · 0.80
test_readMethod · 0.80
test_offset_writeMethod · 0.80
test_offset_readMethod · 0.80
pin_memoryMethod · 0.80

Calls 1

allocMethod · 0.80

Tested by 8

test_parallel_readMethod · 0.64
test_async_readMethod · 0.64
test_readMethod · 0.64
test_offset_writeMethod · 0.64
test_offset_readMethod · 0.64