Browse Source

!7131 Change directory to read the overflow dumps from

Merge pull request !7131 from Harshvardhan Gupta/fix-overflow
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
9e48d6527a
4 changed files with 6 additions and 5 deletions
  1. +1
    -1
      mindspore/ccsrc/debug/data_dump/dump_json_parser.cc
  2. +2
    -2
      mindspore/ccsrc/debug/debugger/debugger.cc
  3. +1
    -1
      mindspore/ccsrc/debug/debugger/debugger.h
  4. +2
    -1
      mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.cc

+ 1
- 1
mindspore/ccsrc/debug/data_dump/dump_json_parser.cc View File

@@ -364,7 +364,7 @@ void DumpJsonParser::PrintUnusedKernel() {
} }


std::string DumpJsonParser::GetOpOverflowBinPath(uint32_t graph_id, uint32_t device_id) const { std::string DumpJsonParser::GetOpOverflowBinPath(uint32_t graph_id, uint32_t device_id) const {
std::string bin_path = "/var/log/npu/ide_daemon/dump";
std::string bin_path;
bin_path.append(path_); bin_path.append(path_);
bin_path.append("_"); bin_path.append("_");
bin_path.append(std::to_string(device_id)); bin_path.append(std::to_string(device_id));


+ 2
- 2
mindspore/ccsrc/debug/debugger/debugger.cc View File

@@ -318,8 +318,8 @@ void Debugger::PostDebugOp() {
} }
} }


std::map<std::pair<uint32_t, uint32_t>, std::string> Debugger::GetStreamTaskToOpnameMap() const {
return stream_task_to_opname_;
void Debugger::SetStreamTaskToOpnameMap(const std::map<std::pair<uint32_t, uint32_t>, std::string> &mapping) {
stream_task_to_opname_ = mapping;
} }


void Debugger::CheckGraphPtr(const KernelGraphPtr &graph_ptr) { void Debugger::CheckGraphPtr(const KernelGraphPtr &graph_ptr) {


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

@@ -94,7 +94,7 @@ class Debugger : public std::enable_shared_from_this<Debugger> {


int32_t step_num() const; int32_t step_num() const;


std::map<std::pair<uint32_t, uint32_t>, std::string> GetStreamTaskToOpnameMap() const;
void SetStreamTaskToOpnameMap(const std::map<std::pair<uint32_t, uint32_t>, std::string> &mapping);


// check if any feature that uses the debugger backend is enabled // check if any feature that uses the debugger backend is enabled
bool DebuggerBackendEnabled(); bool DebuggerBackendEnabled();


+ 2
- 1
mindspore/ccsrc/runtime/device/ascend/dump/data_dumper.cc View File

@@ -115,7 +115,7 @@ void DataDumper::LoadDumpInfo() {
auto debugger = mindspore::Debugger::GetInstance(); auto debugger = mindspore::Debugger::GetInstance();
MS_EXCEPTION_IF_NULL(debugger); MS_EXCEPTION_IF_NULL(debugger);
if (debugger->DebuggerBackendEnabled()) { if (debugger->DebuggerBackendEnabled()) {
std::map<std::pair<uint32_t, uint32_t>, std::string> stream_task_to_opname = debugger->GetStreamTaskToOpnameMap();
std::map<std::pair<uint32_t, uint32_t>, std::string> stream_task_to_opname;
// extract stream id, task id and opname from runtime_info_map for overflow detection // extract stream id, task id and opname from runtime_info_map for overflow detection
std::transform(runtime_info_map_.begin(), runtime_info_map_.end(), std::transform(runtime_info_map_.begin(), runtime_info_map_.end(),
std::inserter(stream_task_to_opname, stream_task_to_opname.end()), std::inserter(stream_task_to_opname, stream_task_to_opname.end()),
@@ -123,6 +123,7 @@ void DataDumper::LoadDumpInfo() {
-> std::pair<std::pair<uint32_t, uint32_t>, std::string> { -> std::pair<std::pair<uint32_t, uint32_t>, std::string> {
return {{std::get<1>(*p.second), std::get<0>(*p.second)}, p.first}; return {{std::get<1>(*p.second), std::get<0>(*p.second)}, p.first};
}); });
debugger->SetStreamTaskToOpnameMap(stream_task_to_opname);
} }
#endif #endif
MS_LOG(INFO) << "[DataDump] LoadDumpInfo end"; MS_LOG(INFO) << "[DataDump] LoadDumpInfo end";


Loading…
Cancel
Save