!31884 fix multi device target dump issue

Merge pull request !31884 from parastooashtari/ascend_mindrt
This commit is contained in:
i-robot 2022-03-26 07:58:03 +00:00 committed by Gitee
commit cd3cfc3320
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 1 deletions

View File

@ -73,6 +73,7 @@ class BACKEND_EXPORT DumpJsonParser {
std::string GetOpOverflowBinPath(uint32_t graph_id) const;
void GetCellDumpFlag(const session::KernelGraph &kernel_graph);
void UpdateNeedDumpKernels(const session::KernelGraph &kernel_graph);
bool IsDumpEnabled();
void ClearGraph() { graphs_.clear(); }
void SaveGraph(session::KernelGraph *graph) { (void)graphs_.emplace_back(graph); }
@ -111,7 +112,6 @@ class BACKEND_EXPORT DumpJsonParser {
void ParseCommonDumpSetting(const nlohmann::json &content);
void ParseE2eDumpSetting(const nlohmann::json &content);
bool IsDumpEnabled();
auto CheckJsonKeyExist(const nlohmann::json &content, const std::string &key);

View File

@ -51,6 +51,7 @@
#include "utils/ms_utils.h"
#include "backend/graph_compiler/transform.h"
#include "load_mindir/infer_mindir.h"
#include "debug/data_dump/dump_json_parser.h"
#if ((defined ENABLE_CPU) && (!defined _WIN32))
#include "ps/parameter_server.h"
#include "ps/scheduler.h"
@ -971,6 +972,9 @@ bool TaskEmitAction(const ResourcePtr &res) {
}
func_graph->SetMultiTarget();
if (DumpJsonParser::GetInstance().IsDumpEnabled() && func_graph->exist_multi_target()) {
MS_LOG(WARNING) << "Multi device target is detected, CPU data is dumped in rank_0 directory";
}
DisableMindRT(res);
auto context_ptr = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(context_ptr);