Merge pull request !7131 from Harshvardhan Gupta/fix-overflowtags/v1.1.0
| @@ -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)); | ||||
| @@ -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) { | ||||
| @@ -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(); | ||||
| @@ -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"; | ||||