diff --git a/mindspore/ccsrc/debug/data_dump/e2e_dump.cc b/mindspore/ccsrc/debug/data_dump/e2e_dump.cc index 4789752c6f..aedbc3acdf 100644 --- a/mindspore/ccsrc/debug/data_dump/e2e_dump.cc +++ b/mindspore/ccsrc/debug/data_dump/e2e_dump.cc @@ -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); diff --git a/mindspore/ccsrc/debug/data_dump/e2e_dump.h b/mindspore/ccsrc/debug/data_dump/e2e_dump.h index dd7c03f2bc..670d7c31f3 100644 --- a/mindspore/ccsrc/debug/data_dump/e2e_dump.h +++ b/mindspore/ccsrc/debug/data_dump/e2e_dump.h @@ -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 *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_ diff --git a/mindspore/ccsrc/debug/debugger/debugger.cc b/mindspore/ccsrc/debug/debugger/debugger.cc index b56af88ba7..7e74477a86 100644 --- a/mindspore/ccsrc/debug/debugger/debugger.cc +++ b/mindspore/ccsrc/debug/debugger/debugger.cc @@ -353,7 +353,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(); }