| 177 | |
| 178 | template<typename Dtype> |
| 179 | string NCCL<Dtype>::new_uid() { |
| 180 | string uid; |
| 181 | uid.resize(NCCL_UNIQUE_ID_BYTES); |
| 182 | ncclUniqueId nccl_uid; |
| 183 | NCCL_CHECK(ncclGetUniqueId(&nccl_uid)); |
| 184 | memcpy(&uid[0], &nccl_uid, NCCL_UNIQUE_ID_BYTES); // NOLINT(caffe/alt_fn) |
| 185 | return uid; |
| 186 | } |
| 187 | |
| 188 | template<typename Dtype> |
| 189 | void NCCL<Dtype>::Broadcast() { |
no outgoing calls