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

Function lazy_init_symm_memory

csrc/compile/deepcompile.cpp:53–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void lazy_init_symm_memory()
54{
55 if (use_symm_mem && !symm_mem) {
56 int64_t max_param_size = 0;
57 for (const auto& it : param_registry->getParams()) {
58 int64_t size = it.second.getDSTensor().numel() * it.second.getDSTensor().element_size();
59 if (size > max_param_size) { max_param_size = size; }
60 }
61 symm_mem = getSymmMemWorkspace(max_param_size);
62 }
63}
64
65ncclDataType_t get_nccl_data_type(at::ScalarType scalar_type)
66{

Callers 1

start_forwardFunction · 0.85

Calls 3

getSymmMemWorkspaceFunction · 0.85
getDSTensorMethod · 0.80
numelMethod · 0.45

Tested by

no test coverage detected