提交 ded9608f 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!1604 handle tuple in CreateNewCNode

Merge pull request !1604 from Margaret_wangrui/handle-tuple-in-CreateNewCNode
...@@ -375,7 +375,7 @@ CNodePtr SessionBasic::CreateNewCNode(const CNodePtr &cnode, bool valid_input, K ...@@ -375,7 +375,7 @@ CNodePtr SessionBasic::CreateNewCNode(const CNodePtr &cnode, bool valid_input, K
cnode_inputs.emplace_back(new_value_node); cnode_inputs.emplace_back(new_value_node);
} }
continue; continue;
} else if (anf->isa<Parameter>()) { } else if (anf->isa<Parameter>() && AnfAlgo::GetOutputTensorNum(anf) == 1) {
auto new_parameter = CreateNewParameterFromParameter(anf, valid_input, graph); auto new_parameter = CreateNewParameterFromParameter(anf, valid_input, graph);
cnode_inputs.push_back(new_parameter); cnode_inputs.push_back(new_parameter);
if (GetGraphIdByNode(anf) == kInvalidGraphId) { if (GetGraphIdByNode(anf) == kInvalidGraphId) {
...@@ -384,7 +384,7 @@ CNodePtr SessionBasic::CreateNewCNode(const CNodePtr &cnode, bool valid_input, K ...@@ -384,7 +384,7 @@ CNodePtr SessionBasic::CreateNewCNode(const CNodePtr &cnode, bool valid_input, K
(*other_graph_cnode)[anf] = new_parameter; (*other_graph_cnode)[anf] = new_parameter;
} }
continue; continue;
} else if (anf->isa<CNode>()) { } else if (anf->isa<AnfNode>()) {
*from_other_graph = true; *from_other_graph = true;
// the input node is a cnode from other graph // the input node is a cnode from other graph
auto parameter_from_cnode = CreateNewParameterFromCNode(anf, valid_input, graph); auto parameter_from_cnode = CreateNewParameterFromCNode(anf, valid_input, graph);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册