Browse Source

!7052 fix run pynative throw open tsd failed error

Merge pull request !7052 from chujinjin/fix_run_pynative_throw_open_tsd_failed
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
0e8b56c1e5
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      mindspore/ccsrc/pipeline/pynative/pynative_execute.cc

+ 5
- 0
mindspore/ccsrc/pipeline/pynative/pynative_execute.cc View File

@@ -1068,6 +1068,11 @@ py::tuple PynativeExecutor::RunOpInner(const OpExecInfoPtr &op_exec_info) {
#if (!defined ENABLE_GE)
auto ms_context = MsContext::GetInstance();
MS_EXCEPTION_IF_NULL(ms_context);
if (!context::IsTsdOpened(ms_context)) {
if (!context::OpenTsd(ms_context)) {
MS_LOG(EXCEPTION) << "Open tsd failed";
}
}
if (ms_context->backend_policy() == "ms") {
backend_policy = kMsBackendMsPrior;
} else {


Loading…
Cancel
Save