|
|
@@ -104,6 +104,10 @@ int InnerContext::IsValid() const { |
|
|
MS_LOG(ERROR) << "Device list is empty."; |
|
|
MS_LOG(ERROR) << "Device list is empty."; |
|
|
return RET_NOT_SUPPORT; |
|
|
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()) { |
|
|
if (!IsUserSetCpu()) { |
|
|
MS_LOG(ERROR) << "CPU context should be set."; |
|
|
MS_LOG(ERROR) << "CPU context should be set."; |
|
|
return RET_NOT_SUPPORT; |
|
|
return RET_NOT_SUPPORT; |
|
|
|