Skip to content

Commit b9f4919

Browse files
[SYCL][Level Zero] Fix PI_DEVICE_INFO_MAX_COMPUTE_UNITS for sub-sub-devices (#7711)
Previously it was returning the number of the compute units in the root device. That happened because sub-sub-device is PI level abstraction, not Level Zero one.
1 parent 5777e1f commit b9f4919

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,6 +2782,12 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
27822782
Device->ZeDeviceProperties->numEUsPerSubslice *
27832783
Device->ZeDeviceProperties->numSubslicesPerSlice *
27842784
Device->ZeDeviceProperties->numSlices;
2785+
2786+
bool RepresentsCSlice =
2787+
Device->QueueGroup[_pi_queue::queue_type::Compute].ZeIndex >= 0;
2788+
if (RepresentsCSlice)
2789+
MaxComputeUnits /= Device->RootDevice->SubDevices.size();
2790+
27852791
return ReturnValue(pi_uint32{MaxComputeUnits});
27862792
}
27872793
case PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS:

0 commit comments

Comments
 (0)