forked from mindspore-Ecosystem/mindspore
fix opt_shard bug
This commit is contained in:
parent
aa905d51af
commit
4e42992cc1
|
@ -1271,9 +1271,9 @@ static void InsertAllGatherOp(const FuncGraphPtr &root, const std::string &group
|
|||
if (param_ptr->user_data<TensorLayout>()) {
|
||||
auto opt_shard_mirror_group = param_ptr->user_data<TensorLayout>()->opt_shard_mirror_group();
|
||||
is_with_mirror = !opt_shard_mirror_group.empty();
|
||||
if (!is_with_mirror) {
|
||||
if (!param_ptr->param_info()->parallel_optimizer()) {
|
||||
auto mirror_group = mirror_group_list(param_ptr->user_data<TensorLayout>());
|
||||
is_with_mirror = !mirror_group.empty();
|
||||
is_with_mirror = mirror_group.size() > 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue