mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 04:23:00 +08:00
Increment reference count when creating sub device
Resolves: NEO-4362 Change-Id: I8f667ff4baa368d3504da0b3ffd2db39a4d00d68 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
ffed348f3b
commit
5c3412ede1
@@ -306,7 +306,9 @@ cl_int CL_API_CALL clCreateSubDevices(cl_device_id inDevice,
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < subDevicesCount; i++) {
|
||||
outDevices[i] = pInDevice->getDeviceById(i);
|
||||
auto pClDevice = pInDevice->getDeviceById(i);
|
||||
pClDevice->retainApi();
|
||||
outDevices[i] = pClDevice;
|
||||
}
|
||||
|
||||
return CL_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user