Browse Source

!9856 Fixed the recheck issue for operator overflow watchpoint

From: @adelshafiei
Reviewed-by: @john_tzanakakis,@wangyue01
Signed-off-by: @wangyue01
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
daee4c2c49
2 changed files with 10 additions and 1 deletions
  1. +9
    -1
      mindspore/ccsrc/debug/debugger/debugger.cc
  2. +1
    -0
      mindspore/ccsrc/debug/debugger/debugger.h

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

@@ -1051,7 +1051,15 @@ std::vector<std::string> Debugger::CheckOpOverflow() {
}
}

return op_names;
auto iter_op_names = overflow_ops_.find(num_step_);
if (iter_op_names == overflow_ops_.end()) {
overflow_ops_.insert(std::pair<uint32_t, std::vector<std::string>>(num_step_, op_names));

return op_names;
}
iter_op_names->second.insert(std::end(iter_op_names->second), std::begin(op_names), std::end(op_names));

return iter_op_names->second;
}

void Debugger::SetTrainingDone(bool training_done) { training_done_ = training_done; }


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

@@ -233,6 +233,7 @@ class Debugger : public std::enable_shared_from_this<Debugger> {
bool partial_memory_;
std::mutex access_lock_;
std::map<std::pair<uint32_t, uint32_t>, std::string> stream_task_to_opname_;
std::map<uint32_t, std::vector<std::string>> overflow_ops_;
double last_overflow_bin_;
std::map<uint32_t, std::string> overflow_bin_path_;
// flag to keep track of the very first suspension of debugger


Loading…
Cancel
Save