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

Function initialize_sub_comm

csrc/cpu/comm/ccl.cpp:142–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void initialize_sub_comm(int size, int rank, torch::Tensor& kvs_data, std::vector<int> ranks)
143{
144 ccl::kvs::address_type main_addr;
145 if (rank != 0) {
146 memcpy(main_addr.data(), kvs_data.data_ptr(), main_addr.size());
147 sub_kvs = ccl::create_kvs(main_addr);
148 }
149 _ccl_comms.push_back(ccl::create_communicator(size, rank, sub_kvs));
150 group_to_comm_id[ranks] = _ccl_comms.size() - 1;
151}
152
153ccl::datatype get_ccl_datatype(c10::ScalarType type)
154{

Callers

nothing calls this directly

Calls 3

dataMethod · 0.80
data_ptrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected