MCPcopy Create free account
hub / github.com/BVLC/caffe / InitSingleProcess

Method InitSingleProcess

src/caffe/parallel.cpp:166–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164
165template<typename Dtype>
166void NCCL<Dtype>::InitSingleProcess(vector<NCCL<Dtype>*>* nccls) {
167 ncclComm_t* comms = new ncclComm_t[nccls->size()];
168 int* gpu_list = new int[nccls->size()];
169 for (int i = 0; i < nccls->size(); ++i) {
170 gpu_list[i] = (*nccls)[i]->solver_->param().device_id();
171 }
172 NCCL_CHECK(ncclCommInitAll(comms, static_cast<int>(nccls->size()), gpu_list));
173 for (int i = 0; i < nccls->size(); ++i) {
174 (*nccls)[i]->comm_ = comms[i];
175 }
176}
177
178template<typename Dtype>
179string NCCL<Dtype>::new_uid() {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected