Browse Source

add full_name for anf_ir.proto

tags/v0.6.0-beta
huanghui 5 years ago
parent
commit
4e3c532c86
3 changed files with 5 additions and 1 deletions
  1. +1
    -0
      mindspore/ccsrc/debug/dump_proto.cc
  2. +1
    -1
      mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc
  3. +3
    -0
      mindspore/ccsrc/utils/anf_ir.proto

+ 1
- 0
mindspore/ccsrc/debug/dump_proto.cc View File

@@ -453,6 +453,7 @@ void ProtoExporter::ExportCNode(const FuncGraphPtr &func_graph, const CNodePtr &
GetOpNodeTypeAndAttrs(func_graph, op, node_proto);
node_proto->set_name(std::to_string(apply_idx));
node_proto->set_scope(node->scope()->name());
node_proto->set_full_name(node->fullname_with_scope());

// process OP inputs
for (size_t i = 1; i < inputs.size(); ++i) {


+ 1
- 1
mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc View File

@@ -351,7 +351,7 @@ void AscendBackendOptimization(const std::shared_ptr<session::KernelGraph> &kern
std::string file_path =
save_graphs_path + "/" + "hwopt_d_end" + "_graph_" + std::to_string(kernel_graph->graph_id()) + ".ir";
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");
}
}


+ 3
- 0
mindspore/ccsrc/utils/anf_ir.proto View File

@@ -227,6 +227,9 @@ message NodeProto {
// other fields for debug
optional uint64 output_i = 7;

// The full_name_with_scope of CNode
optional string full_name = 8;
}

// Models


Loading…
Cancel
Save