support nccl sub group

This commit is contained in:
lichenever 2020-07-21 09:15:33 +08:00
parent 74f2c89d01
commit 6aa41f7be1
2 changed files with 1 additions and 4 deletions

View File

@ -345,9 +345,6 @@ std::string DeviceManager::GenerateGroupNameByRanks(RankList ranks) {
// name. Otherwise, let the pointer g point to that group.
Group DeviceManager::CreateGroup(const std::string &group_name,
const std::vector<mindspore::parallel::Device> &devices) {
if ((world_group() == NCCL_WORLD_GROUP) && (devices.size() != devices_.size())) {
MS_LOG(EXCEPTION) << "Do not support sub group for nccl";
}
Group g;
(void)gm_.CreateGroup(group_name, devices, &g);
return g;

View File

@ -74,7 +74,7 @@ Status GroupManager::CreateGroup(const std::string &group_name, const std::vecto
(void)CommManager::GetInstance().GetRankSize(world_group_, &world_size);
}
if ((world_group_ == NCCL_WORLD_GROUP) || (devices.size() == world_size)) {
if (devices.size() == world_size) {
auto it = groups_.find(world_group_);
if (it == groups_.end()) {
(void)group->Init(world_group_, devices);