Skip to content

Commit

Permalink
[SYCL][Level Zero] Fix PI_DEVICE_INFO_MAX_COMPUTE_UNITS for sub-sub-d…
Browse files Browse the repository at this point in the history
…evices (#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.
  • Loading branch information
aelovikov-intel authored Dec 9, 2022
1 parent 5777e1f commit b9f4919
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sycl/plugins/level_zero/pi_level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2782,6 +2782,12 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
Device->ZeDeviceProperties->numEUsPerSubslice *
Device->ZeDeviceProperties->numSubslicesPerSlice *
Device->ZeDeviceProperties->numSlices;

bool RepresentsCSlice =
Device->QueueGroup[_pi_queue::queue_type::Compute].ZeIndex >= 0;
if (RepresentsCSlice)
MaxComputeUnits /= Device->RootDevice->SubDevices.size();

return ReturnValue(pi_uint32{MaxComputeUnits});
}
case PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS:
Expand Down

0 comments on commit b9f4919

Please sign in to comment.