Browse Source

!15448 Fixing multi graph dump

From: @parastooashtari
Reviewed-by: @john_tzanakakis,@robingrosman
Signed-off-by: @john_tzanakakis
pull/15448/MERGE
mindspore-ci-bot Gitee 5 years ago
parent
commit
90828cc0ac
3 changed files with 9 additions and 2 deletions
  1. +7
    -1
      mindspore/ccsrc/debug/data_dump/e2e_dump.cc
  2. +1
    -0
      mindspore/ccsrc/debug/data_dump/e2e_dump.h
  3. +1
    -1
      mindspore/ccsrc/debug/debugger/debugger.cc

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

@@ -218,11 +218,17 @@ void E2eDump::DumpParametersAndConst(const session::KernelGraph *graph, const st
bool E2eDump::DumpData(const session::KernelGraph *graph, uint32_t device_id, Debugger *debugger) {
MS_EXCEPTION_IF_NULL(graph);
auto &dump_json_parser = DumpJsonParser::GetInstance();
dump_json_parser.UpdateDumpIter();
if (starting_graph_id == INT32_MAX) {
starting_graph_id = graph->graph_id();
}
if (starting_graph_id == graph->graph_id()) {
dump_json_parser.UpdateDumpIter();
}
if (!dump_json_parser.GetIterDumpFlag()) {
return true;
}
MS_LOG(INFO) << "Start e2e dump. Current iteration is " << dump_json_parser.cur_dump_iter();
MS_LOG(INFO) << "Current graph id is " << graph->graph_id();
std::string dump_path = GenerateDumpPath(&device_id);

DumpInput(graph, dump_path, debugger);


+ 1
- 0
mindspore/ccsrc/debug/data_dump/e2e_dump.h View File

@@ -53,6 +53,7 @@ class E2eDump {
static bool IsDeviceTargetGPU();
static void DumpSingleAnfNode(const AnfNodePtr &anf_node, const size_t output_index, const std::string &dump_path,
bool trans_flag, std::map<std::string, size_t> *const_map, Debugger *debugger);
inline static unsigned int starting_graph_id = INT32_MAX;
};
} // namespace mindspore
#endif // MINDSPORE_MINDSPORE_CCSRC_DEBUG_DATA_DUMP_E_2_E_DUMP_UTIL_H_

+ 1
- 1
mindspore/ccsrc/debug/debugger/debugger.cc View File

@@ -355,7 +355,7 @@ void Debugger::PostExecute() {
if (device_target_ != kGPUDevice) {
num_step_++;
}
MS_LOG(INFO) << "Debugger suspend at end of step; number of steps executed: " << num_step_;
SendWatchpoints(CheckWatchpoints());
CommandLoop();
}


Loading…
Cancel
Save