!49929 Fix tuple to make tuple pass.

Merge pull request !49929 from gaoyong10/dynamic_shape_04
This commit is contained in:
i-robot 2023-03-07 20:57:48 +00:00 committed by Gitee
commit 10ef7403d3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 6 deletions

View File

@ -60,7 +60,8 @@ bool IsNeedConvert(const FuncGraphPtr &func_graph, const AnfNodePtr &input) {
MS_EXCEPTION_IF_NULL(input);
return (input->Type() != nullptr && AnfUtils::IsRealKernel(input) && common::AnfAlgo::IsTupleOutput(input) &&
!common::AnfAlgo::CheckPrimitiveType(input, prim::kPrimCall) &&
(input->isa<Parameter>() || input->isa<ValueNode>() || IsKerenlGraphOutput(func_graph, input)));
(input->isa<Parameter>() || input->isa<ValueNode>() || IsKerenlGraphOutput(func_graph, input)) &&
(!common::AnfAlgo::IsDynamicSequence(input)));
}
} // namespace
@ -88,11 +89,6 @@ const AnfNodePtr ConvertTupleOutputToMaketuple::Process(const FuncGraphPtr &func
return nullptr;
}
// Dynamic sequence does not need to be converted.
if (common::AnfAlgo::IsDynamicSequence(cnode)) {
return nullptr;
}
bool cnode_input_changed = false;
for (size_t i = 0; i < cnode->inputs().size(); ++i) {
const auto &input = cnode->inputs()[i];