Browse Source

check bool tensors for watchpoints

tags/v1.1.0
Harshvardhan Gupta 5 years ago
parent
commit
4b2e1ea9f7
2 changed files with 6 additions and 2 deletions
  1. +5
    -2
      mindspore/ccsrc/debug/debug_services.cc
  2. +1
    -0
      mindspore/ccsrc/debug/debugger/tensor_summary.cc

+ 5
- 2
mindspore/ccsrc/debug/debug_services.cc View File

@@ -87,8 +87,6 @@ void DebugServices::CheckWatchpoints(std::vector<std::string> *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<std::string> *name, std::vector
std::make_unique<TensorSummary<double>>(tensor_ptr->data_c(), previous_tensor_ptr, num_elements);
break;
}
case kNumberTypeBool: {
base_summary_ptr =
std::make_unique<TensorSummary<bool>>(tensor_ptr->data_c(), previous_tensor_ptr, num_elements);
break;
}
default:
MS_LOG(INFO) << "Unsupported tensor type";
continue;


+ 1
- 0
mindspore/ccsrc/debug/debugger/tensor_summary.cc View File

@@ -280,4 +280,5 @@ template class TensorSummary<int64_t>;
template class TensorSummary<float16>;
template class TensorSummary<float>;
template class TensorSummary<double>;
template class TensorSummary<bool>;
} // namespace mindspore

Loading…
Cancel
Save