!46176 fix_opt_shard_not_fullshard

Merge pull request !46176 from yao_yf/fix_opt_shard_not_fullshard
This commit is contained in:
i-robot 2022-11-30 02:15:46 +00:00 committed by Gitee
commit 4403295e38
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 0 deletions

View File

@ -1065,6 +1065,9 @@ CNodePtr SkipTrivialNodesMoveUp(CNodePtr node) {
MS_EXCEPTION_IF_NULL(node);
while (True) {
if (IsPrimitiveCNode(node, prim::kPrimLoad) || IsInTrivialNodeList(node) || IsInAllGatherNodeList(node)) {
if (IsPrimitiveCNode(node->input(1), prim::kPrimMicroStepAllGather)) {
return node;
}
if (node->input(1)->isa<Parameter>()) {
return node;
}