(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
This commit is contained in:
کامیت شده توسط
Vladislav Sytchenko
والد
481d526859
کامیت
2a223ecec6
@@ -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");
|
||||
|
||||
|
||||
مرجع در شماره جدید
Block a user