Browse Source

fix graph history dump issue for ascend kernel by kernel

feature/build-system-rewrite
Parastoo Ashtari 4 years ago
parent
commit
dadcadec03
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      mindspore/ccsrc/debug/data_dump/e2e_dump.cc

+ 7
- 2
mindspore/ccsrc/debug/data_dump/e2e_dump.cc View File

@@ -580,9 +580,14 @@ void E2eDump::DumpRunIter(const KernelGraphPtr &graph, uint32_t rank_id) {
MS_LOG(INFO) << "graph: " << graph->graph_id() << " is dataset graph, not creating graph history file.";
return;
}
if (!IsDeviceTargetGPU() && (graph->graph_id() != graph->root_graph_id())) {
// when device target is ascend, we only dump graph run iter for the root graph.
return;
}
std::string execution_order_path = json_parser.path() + "/rank_" + std::to_string(rank_id) + "/execution_order/";
std::string file_name_to_check =
execution_order_path + "/ms_global_execution_order_graph_" + std::to_string(graph->graph_id()) + ".csv";
std::string graph_str =
IsDeviceTargetGPU() ? std::to_string(graph->graph_id()) : std::to_string(graph->root_graph_id());
std::string file_name_to_check = execution_order_path + "/ms_global_execution_order_graph_" + graph_str + ".csv";
auto real_path = Common::CreatePrefixPath(file_name_to_check);
if (!real_path.has_value()) {
MS_LOG(WARNING) << "Check file path: " << file_name_to_check << " failed.";


Loading…
Cancel
Save