From e4f321ff8246b712a0a31e8731871b26beb387b7 Mon Sep 17 00:00:00 2001 From: Amir Lashkari Date: Fri, 5 Mar 2021 12:05:00 -0500 Subject: [PATCH] Added log for debugger not supporting CPU Fixed bug v1 Fixing UMonad Issue with online debug remove --- mindspore/ccsrc/debug/debugger/debugger.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/debug/debugger/debugger.cc b/mindspore/ccsrc/debug/debugger/debugger.cc index 58a6681124d..1ff85afe2cc 100644 --- a/mindspore/ccsrc/debug/debugger/debugger.cc +++ b/mindspore/ccsrc/debug/debugger/debugger.cc @@ -122,7 +122,11 @@ void Debugger::EnableDebugger() { MS_LOG(INFO) << "debugger_enabled_ = " << debugger_enabled_; if (!debugger_enabled_ && !dump_enabled) { - MS_LOG(INFO) << "Not enabling debugger. Set environment variable ENABLE_MS_DEBUGGER=1 to enable debugger."; + if (device_target_ == kCPUDevice) { + MS_LOG(INFO) << "Not enabling debugger. Debugger does not support CPU."; + } else { + MS_LOG(INFO) << "Not enabling debugger. Set environment variable ENABLE_MS_DEBUGGER=1 to enable debugger."; + } return; } @@ -227,7 +231,7 @@ bool Debugger::CheckDebuggerEnabled() { if (env_enable_char != nullptr) { std::string env_enable_str = env_enable_char; (void)std::transform(env_enable_str.begin(), env_enable_str.end(), env_enable_str.begin(), ::tolower); - if (env_enable_str == "1" || env_enable_str == "true") { + if ((env_enable_str == "1" || env_enable_str == "true") && device_target_ != kCPUDevice) { return true; } }