!2054 fix mix target with gpu target

Merge pull request !2054 from kisnwang/mix-target-check
This commit is contained in:
mindspore-ci-bot 2020-06-12 15:59:08 +08:00 committed by Gitee
commit c27d4157b5
1 changed files with 1 additions and 1 deletions

View File

@ -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.";
}