diff --git a/paddle/operators/nccl/nccl_gpu_common.h b/paddle/operators/nccl/nccl_gpu_common.h index eead7f79b75789f41a4c0fbe876107e290f4f715..0d71eddf021eab797e5afdbf3996697672f4f5e4 100644 --- a/paddle/operators/nccl/nccl_gpu_common.h +++ b/paddle/operators/nccl/nccl_gpu_common.h @@ -34,6 +34,8 @@ struct Communicator { std::vector comms_; std::unordered_map comm_id_map_; + Communicator() {} + int GetCommId(int device_id) const { return comm_id_map_.at(device_id); } void InitAll(const std::vector& gpus) {