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

Function getSymmMemWorkspace

csrc/compile/deepcompile.cpp:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41bool is_profiling() { return profile; }
42
43c10::intrusive_ptr<c10d::symmetric_memory::SymmetricMemory> getSymmMemWorkspace(int64_t size)
44{
45 c10::Device device = c10::Device(c10::kCUDA, c10::cuda::current_device());
46 std::vector<int64_t> sizes = {size};
47 std::vector<int64_t> strides = {1};
48 at::Tensor sym_mem_ws = c10d::symmetric_memory::empty_strided_p2p(
49 {size}, {1}, c10::ScalarType::Byte, device, process_group->getGroupName(), std::nullopt);
50 return c10d::symmetric_memory::rendezvous(sym_mem_ws);
51}
52
53void lazy_init_symm_memory()
54{

Callers 1

lazy_init_symm_memoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected