From 4b2e1ea9f70040e9ac5e0afa3ccffd1bdaee8e26 Mon Sep 17 00:00:00 2001 From: Harshvardhan Gupta Date: Thu, 10 Dec 2020 14:15:14 -0500 Subject: [PATCH] check bool tensors for watchpoints --- mindspore/ccsrc/debug/debug_services.cc | 7 +++++-- mindspore/ccsrc/debug/debugger/tensor_summary.cc | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/debug/debug_services.cc b/mindspore/ccsrc/debug/debug_services.cc index 2505b48552..9f8e314007 100644 --- a/mindspore/ccsrc/debug/debug_services.cc +++ b/mindspore/ccsrc/debug/debug_services.cc @@ -87,8 +87,6 @@ void DebugServices::CheckWatchpoints(std::vector *name, std::vector // skip init condition on all the other states if ((wp.condition.type == INIT) ^ init_dbg_suspend) continue; - if (wp.condition.type != IS_OVERFLOW && tensor_dtype == kNumberTypeBool) continue; - // check change conditions only on step end. if (wp.change_condition() && !step_end) continue; @@ -168,6 +166,11 @@ void DebugServices::CheckWatchpoints(std::vector *name, std::vector std::make_unique>(tensor_ptr->data_c(), previous_tensor_ptr, num_elements); break; } + case kNumberTypeBool: { + base_summary_ptr = + std::make_unique>(tensor_ptr->data_c(), previous_tensor_ptr, num_elements); + break; + } default: MS_LOG(INFO) << "Unsupported tensor type"; continue; diff --git a/mindspore/ccsrc/debug/debugger/tensor_summary.cc b/mindspore/ccsrc/debug/debugger/tensor_summary.cc index 86cf9e6241..5490696b11 100644 --- a/mindspore/ccsrc/debug/debugger/tensor_summary.cc +++ b/mindspore/ccsrc/debug/debugger/tensor_summary.cc @@ -280,4 +280,5 @@ template class TensorSummary; template class TensorSummary; template class TensorSummary; template class TensorSummary; +template class TensorSummary; } // namespace mindspore