!30174 Fix the debugger warning on cpu

Merge pull request !30174 from maning202007/r1.6
This commit is contained in:
i-robot 2022-02-18 06:35:46 +00:00 committed by Gitee
commit 25c3d507cd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 2 deletions

View File

@ -93,9 +93,11 @@ Debugger::Debugger()
MS_EXCEPTION_IF_NULL(ms_context);
std::string device_target = ms_context->get_param<std::string>(MS_CTX_DEVICE_TARGET);
MS_LOG(INFO) << "Debugger got device_target: " << device_target;
if (device_target == kCPUDevice) {
if (!CheckDebuggerEnabled()) {
return;
} else if (device_target == kCPUDevice) {
MS_LOG(WARNING) << "Not enabling debugger. Debugger does not support CPU.";
} else if (CheckDebuggerEnabled()) {
} else {
// configure partial memory reuse
partial_memory_ = CheckDebuggerPartialMemoryEnabled();