mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
Group created devices based on product family
Related-To: NEO-4208 Change-Id: Ida9ec309a83d609d85778ac8ef6d838651f04cbd Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
@@ -87,12 +87,19 @@ cl_int CL_API_CALL clGetPlatformIDs(cl_uint numEntries,
|
||||
retVal = CL_OUT_OF_HOST_MEMORY;
|
||||
break;
|
||||
}
|
||||
auto pPlatform = Platform::createFunc(*executionEnvironment.release());
|
||||
if (!pPlatform || !pPlatform->initialize(std::move(allDevices))) {
|
||||
retVal = CL_OUT_OF_HOST_MEMORY;
|
||||
auto groupedDevices = Platform::groupDevices(std::move(allDevices));
|
||||
for (auto &deviceVector : groupedDevices) {
|
||||
|
||||
auto pPlatform = Platform::createFunc(*executionEnvironment.release());
|
||||
if (!pPlatform || !pPlatform->initialize(std::move(deviceVector))) {
|
||||
retVal = CL_OUT_OF_HOST_MEMORY;
|
||||
break;
|
||||
}
|
||||
platformsImpl.push_back(std::move(pPlatform));
|
||||
}
|
||||
if (retVal != CL_SUCCESS) {
|
||||
break;
|
||||
}
|
||||
platformsImpl.push_back(std::move(pPlatform));
|
||||
}
|
||||
if (platforms) {
|
||||
// we only have one platform so we can program that directly
|
||||
|
||||
Reference in New Issue
Block a user