diff --git a/mindspore/ccsrc/debug/anf_ir_dump.cc b/mindspore/ccsrc/debug/anf_ir_dump.cc index 49e3deaf95d..823f6d1cff4 100644 --- a/mindspore/ccsrc/debug/anf_ir_dump.cc +++ b/mindspore/ccsrc/debug/anf_ir_dump.cc @@ -628,7 +628,7 @@ void SetDumpConfigByString(const std::string &str, DumpConfig *dump_config) { {kDumpConfigLineLevel0, kOff}, {kDumpConfigLineLevel1, kTopStack}, {kDumpConfigLineLevel2, kWholeStack}}; auto it = dump_level_map.find(str); if (it != dump_level_map.end()) { - dump_config->enable_dump_pass_ir = it->second; + dump_config->dump_line_level = it->second; return; } if (str == kDumpConfigDisableBackend) { diff --git a/mindspore/ccsrc/debug/trace.cc b/mindspore/ccsrc/debug/trace.cc index 46c73e670e2..e5b9e01b317 100644 --- a/mindspore/ccsrc/debug/trace.cc +++ b/mindspore/ccsrc/debug/trace.cc @@ -474,8 +474,8 @@ void GetTraceStackInfo(std::ostringstream &oss) { std::ostringstream trace_info; GetEvalStackInfo(trace_info); if (trace_info.str().empty()) { - DebugInfoPtr debug_info = TraceManager::GetParseOrResolveDebugInfo(); - if (debug_info != nullptr && TraceManager::GetRecordDebugInfoFlag() == true) { + DebugInfoPtr debug_info = TraceManager::record_debug_info(); + if (debug_info != nullptr && TraceManager::record_debug_info_flag() == true) { auto debug_str = trace::GetDebugInfo(debug_info); if (!debug_str.empty()) { oss << "\n\n# " << debug_str; diff --git a/mindspore/core/utils/info.cc b/mindspore/core/utils/info.cc index 8450afc78ad..4ade7b24f0d 100644 --- a/mindspore/core/utils/info.cc +++ b/mindspore/core/utils/info.cc @@ -167,7 +167,7 @@ void TraceManager::DebugTrace(const DebugInfoPtr &debug_info, const TraceInfoPtr (void)TraceManager::trace_context_stack_.emplace_back(cloned_info); } -DebugInfoPtr TraceManager::GetParseOrResolveDebugInfo() { return TraceManager::record_debug_info_; } +DebugInfoPtr TraceManager::record_debug_info() { return TraceManager::record_debug_info_; } void TraceManager::ClearParseOrResolveDebugInfo() { TraceManager::record_debug_info_ = nullptr; } @@ -175,7 +175,7 @@ void TraceManager::CloseRecordDebugInfoFlag() { record_debug_info_flag_ = false; void TraceManager::OpenRecordDebugInfoFlag() { record_debug_info_flag_ = true; } -bool TraceManager::GetRecordDebugInfoFlag() { return record_debug_info_flag_; } +bool TraceManager::record_debug_info_flag() { return record_debug_info_flag_; } thread_local std::vector TraceManager::trace_context_stack_; diff --git a/mindspore/core/utils/info.h b/mindspore/core/utils/info.h index cf54e6e2a3f..0f1c62ee758 100644 --- a/mindspore/core/utils/info.h +++ b/mindspore/core/utils/info.h @@ -122,12 +122,12 @@ class MS_CORE_API TraceManager { /// \brief Get debug info for parse or resolve. /// /// \return The debug info for parse or resolve. - static DebugInfoPtr GetParseOrResolveDebugInfo(); + static DebugInfoPtr record_debug_info(); /// \brief Get the flag of recording a debug info. /// /// \return A bool. - static bool GetRecordDebugInfoFlag(); + static bool record_debug_info_flag(); /// \brief Set the flag to false for not recording a debug info. static void CloseRecordDebugInfoFlag();