fix: include all devices when creating OCL context from type

Related-To: NEO-15086, GSD-11201
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-05-29 11:23:15 +00:00
committed by Compute-Runtime-Automation
parent 04965470fb
commit 88820a414f
2 changed files with 7 additions and 6 deletions

View File

@@ -494,12 +494,12 @@ cl_context CL_API_CALL clCreateContextFromType(const cl_context_properties *prop
}
DEBUG_BREAK_IF(numDevices <= 0);
cl_device_id device = nullptr;
std::vector<cl_device_id> devices(numDevices, nullptr);
retVal = clGetDeviceIDs(pPlatform, deviceType, 1, &device, nullptr);
retVal = clGetDeviceIDs(pPlatform, deviceType, numDevices, devices.data(), nullptr);
DEBUG_BREAK_IF(retVal != CL_SUCCESS);
ClDeviceVector deviceVector(&device, 1);
ClDeviceVector deviceVector(devices.data(), numDevices);
context = Context::create<Context>(properties, deviceVector, funcNotify, userData, retVal);
} while (false);