forked from OSSInnovation/mindspore
support nccl sub group
This commit is contained in:
parent
74f2c89d01
commit
6aa41f7be1
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue