forked from mindspore-Ecosystem/mindspore
Fix tuple to make tuple pass.
This commit is contained in:
parent
a9b46ffb98
commit
f2edb0fcbb
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue