added log in debugger.cc for pre and post execute added log in debugger.cc for pre and post execute fixed the format of the code removed the repeated lines fixed format in debugger.cc add more logs for debugger.cc fixed the bug in debugger.cc removed the logs in debugger.ccpull/15448/head
| @@ -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) { | bool E2eDump::DumpData(const session::KernelGraph *graph, uint32_t device_id, Debugger *debugger) { | ||||
| MS_EXCEPTION_IF_NULL(graph); | MS_EXCEPTION_IF_NULL(graph); | ||||
| auto &dump_json_parser = DumpJsonParser::GetInstance(); | 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()) { | if (!dump_json_parser.GetIterDumpFlag()) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| MS_LOG(INFO) << "Start e2e dump. Current iteration is " << dump_json_parser.cur_dump_iter(); | 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); | std::string dump_path = GenerateDumpPath(&device_id); | ||||
| DumpInput(graph, dump_path, debugger); | DumpInput(graph, dump_path, debugger); | ||||
| @@ -53,6 +53,7 @@ class E2eDump { | |||||
| static bool IsDeviceTargetGPU(); | static bool IsDeviceTargetGPU(); | ||||
| static void DumpSingleAnfNode(const AnfNodePtr &anf_node, const size_t output_index, const std::string &dump_path, | 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); | bool trans_flag, std::map<std::string, size_t> *const_map, Debugger *debugger); | ||||
| inline static unsigned int starting_graph_id = INT32_MAX; | |||||
| }; | }; | ||||
| } // namespace mindspore | } // namespace mindspore | ||||
| #endif // MINDSPORE_MINDSPORE_CCSRC_DEBUG_DATA_DUMP_E_2_E_DUMP_UTIL_H_ | #endif // MINDSPORE_MINDSPORE_CCSRC_DEBUG_DATA_DUMP_E_2_E_DUMP_UTIL_H_ | ||||
| @@ -353,7 +353,7 @@ void Debugger::PostExecute() { | |||||
| if (device_target_ != kGPUDevice) { | if (device_target_ != kGPUDevice) { | ||||
| num_step_++; | num_step_++; | ||||
| } | } | ||||
| MS_LOG(INFO) << "Debugger suspend at end of step; number of steps executed: " << num_step_; | |||||
| SendWatchpoints(CheckWatchpoints()); | SendWatchpoints(CheckWatchpoints()); | ||||
| CommandLoop(); | CommandLoop(); | ||||
| } | } | ||||