(SWDEV-210228)

Don't error when querying the number of devices if there are no devices present in the system.

We should just return 0 for the number of devices in this case and let the application handle this situation.

Change-Id: I20614ade5e649f3ce9ddd970d4b38bfe296f6cdb
이 커밋은 다음에 포함됨:
Vladislav Sytchenko 작성하고 Vladislav Sytchenko가 2020-04-01 13:36:44 -04:00를 커밋함
1 부모 481d526859
커밋 2a223ecec6
1 파일이 변경됨
+1 -1
+1 -1
파일 보기
@@ -399,7 +399,7 @@ bool Device::getDeviceIDs(cl_device_type deviceType, uint32_t numEntries, cl_dev
uint32_t* numDevices, bool offlineDevices) {
if (numDevices != nullptr && devices == nullptr) {
*numDevices = (uint32_t)amd::Device::numDevices(deviceType, offlineDevices);
return (*numDevices > 0) ? true : false;
return true;
}
assert(devices != nullptr && "check the code above");