Browse Source

fixed recheck issue for operator overflow

tags/v1.1.0
Adel Shafiei 5 years ago
parent
commit
809c060ae1
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

@@ -1045,7 +1045,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