!14502 modify export mindir tuple[]
From: @changzherui Reviewed-by: @zhoufeng54,@zh_qh Signed-off-by: @zh_qh
This commit is contained in:
commit
ae91575346
|
@ -443,6 +443,7 @@ std::string IrExportBuilder::BuildInputNode(const AnfNodePtr &node, mind_ir::Gra
|
|||
if (node->isa<ValueNode>()) {
|
||||
// When node input is a ValueNode, need to create a Constant Node
|
||||
mind_ir::NodeProto *node_proto = graph_proto->add_node();
|
||||
node_proto->set_name(node_name);
|
||||
node_proto->add_output(node_name);
|
||||
SetAttributeProto(node, node_proto);
|
||||
}
|
||||
|
|
|
@ -637,6 +637,14 @@ bool MSANFModelParser::GetAttrValueForValueNode(const std::string &value_node_na
|
|||
anfnode_build_map_[value_node_name] = new_value_node;
|
||||
break;
|
||||
}
|
||||
if ((value_pos = ref_attr_name.find("Tuple[]")) != std::string::npos) {
|
||||
MS_LOG(INFO) << "Build Tuple() ValueNode for primitive.";
|
||||
ValuePtr res = MakeValue(std::vector<ValuePtr>{});
|
||||
new_value_node = NewValueNode(res);
|
||||
new_value_node->set_abstract(res->ToAbstract());
|
||||
anfnode_build_map_[value_node_name] = new_value_node;
|
||||
break;
|
||||
}
|
||||
ObtainCNodeAttrInScalarForm(attr_proto, &multi_value_map);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue