From 90b85165d1a5402828021db7187d22742beed2b7 Mon Sep 17 00:00:00 2001 From: caifubi Date: Tue, 27 Apr 2021 15:59:48 +0800 Subject: [PATCH] clean dump codex --- mindspore/ccsrc/debug/data_dump/e2e_dump.cc | 14 +++++++------- mindspore/ccsrc/debug/data_dump/e2e_dump.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mindspore/ccsrc/debug/data_dump/e2e_dump.cc b/mindspore/ccsrc/debug/data_dump/e2e_dump.cc index aedbc3acdf..3f24b56ae6 100644 --- a/mindspore/ccsrc/debug/data_dump/e2e_dump.cc +++ b/mindspore/ccsrc/debug/data_dump/e2e_dump.cc @@ -53,7 +53,7 @@ void E2eDump::DumpGPUMemToFile(const std::string &file_path, const std::string & #endif } -void E2eDump::DumpOutput(const session::KernelGraph *graph, const std::string &dump_path, Debugger *debugger) { +void E2eDump::DumpOutput(const session::KernelGraph *graph, const std::string &dump_path, const Debugger *debugger) { MS_EXCEPTION_IF_NULL(graph); auto &dump_json_parser = DumpJsonParser::GetInstance(); if (!dump_json_parser.OutputNeedDump()) { @@ -74,7 +74,7 @@ void E2eDump::DumpOutput(const session::KernelGraph *graph, const std::string &d } void E2eDump::DumpOutputImpl(const CNodePtr &node, bool trans_flag, const std::string &dump_path, - std::string *kernel_name, Debugger *debugger) { + std::string *kernel_name, const Debugger *debugger) { MS_EXCEPTION_IF_NULL(node); GetFileKernelName(NOT_NULL(kernel_name)); auto output_size = AnfAlgo::GetOutputTensorNum(node); @@ -96,7 +96,7 @@ void E2eDump::DumpOutputImpl(const CNodePtr &node, bool trans_flag, const std::s } } -void E2eDump::DumpInput(const session::KernelGraph *graph, const std::string &dump_path, Debugger *debugger) { +void E2eDump::DumpInput(const session::KernelGraph *graph, const std::string &dump_path, const Debugger *debugger) { MS_EXCEPTION_IF_NULL(graph); auto &dump_json_parser = DumpJsonParser::GetInstance(); if (!dump_json_parser.InputNeedDump()) { @@ -117,7 +117,7 @@ void E2eDump::DumpInput(const session::KernelGraph *graph, const std::string &du } void E2eDump::DumpInputImpl(const CNodePtr &node, bool trans_flag, const std::string &dump_path, - std::string *kernel_name, Debugger *debugger) { + std::string *kernel_name, const Debugger *debugger) { MS_EXCEPTION_IF_NULL(node); GetFileKernelName(NOT_NULL(kernel_name)); auto input_size = AnfAlgo::GetInputTensorNum(node); @@ -155,7 +155,7 @@ void E2eDump::DumpInputImpl(const CNodePtr &node, bool trans_flag, const std::st } void E2eDump::DumpSingleAnfNode(const AnfNodePtr &anf_node, const size_t output_index, const std::string &dump_path, - bool trans_flag, std::map *const_map, Debugger *debugger) { + bool trans_flag, std::map *const_map, const Debugger *debugger) { MS_EXCEPTION_IF_NULL(anf_node); auto &dump_json_parser = DumpJsonParser::GetInstance(); if (!anf_node->isa() && !anf_node->isa()) { @@ -195,7 +195,7 @@ void E2eDump::DumpSingleAnfNode(const AnfNodePtr &anf_node, const size_t output_ } void E2eDump::DumpParametersAndConst(const session::KernelGraph *graph, const std::string &dump_path, - Debugger *debugger) { + const Debugger *debugger) { MS_EXCEPTION_IF_NULL(graph); auto &dump_json_parser = DumpJsonParser::GetInstance(); MS_LOG(INFO) << "Start e2e dump parameters and Const values"; @@ -215,7 +215,7 @@ 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, const Debugger *debugger) { MS_EXCEPTION_IF_NULL(graph); auto &dump_json_parser = DumpJsonParser::GetInstance(); if (starting_graph_id == INT32_MAX) { diff --git a/mindspore/ccsrc/debug/data_dump/e2e_dump.h b/mindspore/ccsrc/debug/data_dump/e2e_dump.h index 670d7c31f3..372232eaea 100644 --- a/mindspore/ccsrc/debug/data_dump/e2e_dump.h +++ b/mindspore/ccsrc/debug/data_dump/e2e_dump.h @@ -33,26 +33,26 @@ class E2eDump { public: E2eDump() = default; ~E2eDump() = default; - static bool DumpData(const session::KernelGraph *graph, uint32_t device_id, Debugger *debugger = nullptr); + static bool DumpData(const session::KernelGraph *graph, uint32_t device_id, const Debugger *debugger = nullptr); // Dump data when task error. static void DumpInputImpl(const CNodePtr &node, bool trans_flag, const std::string &dump_path, - std::string *kernel_name, Debugger *debugger); + std::string *kernel_name, const Debugger *debugger); static void DumpOutputImpl(const CNodePtr &node, bool trans_flag, const std::string &dump_path, - std::string *kernel_name, Debugger *debugger); + std::string *kernel_name, const Debugger *debugger); private: - static void DumpOutput(const session::KernelGraph *graph, const std::string &dump_path, Debugger *debugger); - static void DumpInput(const session::KernelGraph *graph, const std::string &dump_path, Debugger *debugger); + static void DumpOutput(const session::KernelGraph *graph, const std::string &dump_path, const Debugger *debugger); + static void DumpInput(const session::KernelGraph *graph, const std::string &dump_path, const Debugger *debugger); static void DumpParametersAndConst(const session::KernelGraph *graph, const std::string &dump_path, - Debugger *debugger); + const Debugger *debugger); static void DumpGPUMemToFile(const std::string &file_path, const std::string &original_kernel_name, NotNull addr, const ShapeVector &int_shapes, const TypeId &type, bool trans_flag, size_t slot, const Debugger *debugger); 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); + bool trans_flag, std::map *const_map, const Debugger *debugger); inline static unsigned int starting_graph_id = INT32_MAX; }; } // namespace mindspore