diff --git a/src/domain/collective_communication/framework/communicator/hccl_comm.cc b/src/domain/collective_communication/framework/communicator/hccl_comm.cc index 5cca925e04a1ea1b5e41b8794a52d245e3c9af5d..336ead77650288f1bed158cd34220a96baf14ba6 100644 --- a/src/domain/collective_communication/framework/communicator/hccl_comm.cc +++ b/src/domain/collective_communication/framework/communicator/hccl_comm.cc @@ -72,6 +72,7 @@ void hcclComm::UpdateIsHaveCpuRank(const RankTable_t &rankTable) // 同一server的标识IP 是一样的,所以可以以此推算出平均dev个数 if (rankTable.rankList[i].deviceInfo.devicePhyId == HOST_DEVICE_ID) { isHaveCpuRank_ = true; + return; } } } @@ -82,6 +83,7 @@ void hcclComm::UpdateIsHaveCpuRank(const std::vector &rankList) // 同一server的标识IP 是一样的,所以可以以此推算出平均dev个数 if (rankList[i].devicePhyId == HOST_DEVICE_ID) { isHaveCpuRank_ = true; + return; } } }