Browse Source

!16039 [MS][LITE]No error is reported when GPU and NPU inference is configured.

From: @mengyuanli
Reviewed-by: @zhanghaibo5,@zhang_xue_tong
Signed-off-by: @zhang_xue_tong
pull/16039/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
0f727cb062
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      mindspore/lite/src/inner_context.cc

+ 4
- 0
mindspore/lite/src/inner_context.cc View File

@@ -104,6 +104,10 @@ int InnerContext::IsValid() const {
MS_LOG(ERROR) << "Device list is empty.";
return RET_NOT_SUPPORT;
}
if (this->device_list_.size() > 2) {
MS_LOG(ERROR) << "Not support device list more than 2.";
return RET_NOT_SUPPORT;
}
if (!IsUserSetCpu()) {
MS_LOG(ERROR) << "CPU context should be set.";
return RET_NOT_SUPPORT;


Loading…
Cancel
Save