!28952 [MS][LITE]fix bug: can not acquire mscontext on Ascend310

Merge pull request !28952 from xiaoyao/master
This commit is contained in:
i-robot 2022-01-13 06:17:46 +00:00 committed by Gitee
commit d1ca2fdae0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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) {