forked from mindspore-Ecosystem/mindspore
fix mix target with gpu target
This commit is contained in:
parent
dae35e0a71
commit
e283c32899
|
@ -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.";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue