Fix tuple to make tuple pass.

This commit is contained in:
gaoyong10 2023-03-07 19:10:51 +08:00
parent a9b46ffb98
commit f2edb0fcbb
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];