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

!2867 Add full_name for anf_ir.proto

Merge pull request !2867 from huanghui/vm-anf-ir-graph-pb-dump
...@@ -453,6 +453,7 @@ void ProtoExporter::ExportCNode(const FuncGraphPtr &func_graph, const CNodePtr & ...@@ -453,6 +453,7 @@ void ProtoExporter::ExportCNode(const FuncGraphPtr &func_graph, const CNodePtr &
GetOpNodeTypeAndAttrs(func_graph, op, node_proto); GetOpNodeTypeAndAttrs(func_graph, op, node_proto);
node_proto->set_name(std::to_string(apply_idx)); node_proto->set_name(std::to_string(apply_idx));
node_proto->set_scope(node->scope()->name()); node_proto->set_scope(node->scope()->name());
node_proto->set_full_name(node->fullname_with_scope());
// process OP inputs // process OP inputs
for (size_t i = 1; i < inputs.size(); ++i) { for (size_t i = 1; i < inputs.size(); ++i) {
......
...@@ -355,7 +355,7 @@ void AscendBackendOptimization(const std::shared_ptr<session::KernelGraph> &kern ...@@ -355,7 +355,7 @@ void AscendBackendOptimization(const std::shared_ptr<session::KernelGraph> &kern
std::string file_path = std::string file_path =
save_graphs_path + "/" + "hwopt_d_end" + "_graph_" + std::to_string(kernel_graph->graph_id()) + ".ir"; save_graphs_path + "/" + "hwopt_d_end" + "_graph_" + std::to_string(kernel_graph->graph_id()) + ".ir";
DumpIR(file_path, kernel_graph, true); DumpIR(file_path, kernel_graph, true);
DumpIRProto(kernel_graph, "after_hwopt"); DumpIRProto(kernel_graph, "after_hwopt_" + std::to_string(kernel_graph->graph_id()));
kernel_graph->DumpFuncGraph("hwopt_d_end"); kernel_graph->DumpFuncGraph("hwopt_d_end");
} }
} }
......
...@@ -227,6 +227,9 @@ message NodeProto { ...@@ -227,6 +227,9 @@ message NodeProto {
// other fields for debug // other fields for debug
optional uint64 output_i = 7; optional uint64 output_i = 7;
// The full_name_with_scope of CNode
optional string full_name = 8;
} }
// Models // Models
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册