From e283c3289926242c4968ed7d07d303d81b3f7ad8 Mon Sep 17 00:00:00 2001 From: kswang Date: Fri, 12 Jun 2020 15:17:15 +0800 Subject: [PATCH] fix mix target with gpu target --- mindspore/ccsrc/vm/backend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/vm/backend.cc b/mindspore/ccsrc/vm/backend.cc index fe84bfbff..3fde263c9 100644 --- a/mindspore/ccsrc/vm/backend.cc +++ b/mindspore/ccsrc/vm/backend.cc @@ -349,7 +349,7 @@ void MsBackend::CreateOtherSession(const std::string &target) { if (other_sess_ != nullptr && other_device_ == target) { return; } - other_sess_ = session::SessionFactory::Get().Create(kCPUDevice); + other_sess_ = session::SessionFactory::Get().Create(target); if (other_sess_ == nullptr) { MS_LOG(EXCEPTION) << "Session create failed!, please make sure target device:" << target << " is available."; } -- GitLab