fix bug: can not acquire mscontext in lite310

This commit is contained in:
xiao_yao1994 2022-01-12 17:13:27 +08:00
parent 3dc4999b68
commit 0d75261734
1 changed files with 1 additions and 1 deletions

View File

@ -72,9 +72,9 @@ GraphRunner::GraphRunner(const GraphRunnerOptions &options)
}
}
#ifdef ENABLE_D
auto ms_context = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(ms_context);
#ifdef ENABLE_D
if (ms_context->backend_policy() == "ge") {
// register the callback function
if (sess_->RegisterCallBackFunc(callbacks::kCheckPoint, callbacks::CheckpointSaveCallback) != ge::GRAPH_SUCCESS) {