From ea95be37a7116eea96a48511519aaaa5f5e59a2f Mon Sep 17 00:00:00 2001 From: zhangxiaokun Date: Thu, 8 Jul 2021 13:50:00 +0800 Subject: [PATCH] Revert EnableExceptionDump --- ge/graph/execute/model_executor.cc | 7 ------- ge/init/gelib.cc | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ge/graph/execute/model_executor.cc b/ge/graph/execute/model_executor.cc index 36d21e1c..bcbc08e6 100644 --- a/ge/graph/execute/model_executor.cc +++ b/ge/graph/execute/model_executor.cc @@ -47,13 +47,6 @@ Status ModelExecutor::Initialize(const map &options, uint64_t se return MEMALLOC_FAILED; } - auto model_manager = ModelManager::GetInstance(); - GE_CHECK_NOTNULL(model_manager); - GE_IF_BOOL_EXEC(model_manager->EnableExceptionDump(options) != SUCCESS, - REPORT_CALL_ERROR("E19999", "ModelManager EnableExceptionDump failed."); - GELOGE(FAILED, "[Enable][ExceptionDump] failed."); - return FAILED); - session_id_ = session_id; train_graph_flag_ = ParseTrainGraphFlag(); thread_run_flag_.store(true); diff --git a/ge/init/gelib.cc b/ge/init/gelib.cc index f7296144..132d4680 100644 --- a/ge/init/gelib.cc +++ b/ge/init/gelib.cc @@ -38,6 +38,7 @@ #include "graph/common/ge_call_wrapper.h" #include "graph/ge_context.h" #include "graph/ge_global_options.h" +#include "graph/load/model_manager/model_manager.h" #include "graph/manager/graph_mem_manager.h" #include "graph/manager/host_mem_manager.h" #include "graph/manager/graph_var_manager.h" @@ -196,6 +197,12 @@ Status GELib::SystemInitialize(const map &options) { // In train and infer, profiling is always needed. InitProfiling(this->options_); + auto model_manager = ModelManager::GetInstance(); + GE_CHECK_NOTNULL(model_manager); + GE_IF_BOOL_EXEC(model_manager->EnableExceptionDump(options) != SUCCESS, + REPORT_CALL_ERROR("E19999", "ModelManager EnableExceptionDump failed."); + GELOGE(FAILED, "[Enable][ExceptionDump] failed."); + return FAILED); // 1.`is_train_mode_` means case: train // 2.`(!is_train_mode_) && (options_.device_id != kDefaultDeviceIdForInfer)` means case: online infer // these two case with logical device id