Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions source/adapters/level_zero/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,20 +1010,28 @@ ur_result_t urDeviceGetInfo(
Device->Platform->ZeMutableCmdListExt.Supported);
}
case UR_DEVICE_INFO_BINDLESS_IMAGES_SUPPORT_EXP: {
// On L0 bindless images are supported.
return ReturnValue(true);
bool DeviceIsDG2OrNewer =
Device->ZeDeviceIpVersionExt->ipVersion >= 0x030dc000;
return ReturnValue(DeviceIsDG2OrNewer &&
Device->ZeDeviceImageProperties->maxImageDims1D > 0 &&
Device->ZeDeviceImageProperties->maxImageDims2D > 0 &&
Device->ZeDeviceImageProperties->maxImageDims3D > 0);
}
case UR_DEVICE_INFO_BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP: {
// On L0 bindless images can not be backed by shared (managed) USM.
return ReturnValue(false);
}
case UR_DEVICE_INFO_BINDLESS_IMAGES_1D_USM_SUPPORT_EXP: {
// On L0 1D bindless image USM are supported.
return ReturnValue(true);
bool DeviceIsDG2OrNewer =
Device->ZeDeviceIpVersionExt->ipVersion >= 0x030dc000;
return ReturnValue(DeviceIsDG2OrNewer &&
Device->ZeDeviceImageProperties->maxImageDims1D > 0);
}
case UR_DEVICE_INFO_BINDLESS_IMAGES_2D_USM_SUPPORT_EXP: {
// On L0 2D bindless image USM are supported.
return ReturnValue(true);
bool DeviceIsDG2OrNewer =
Device->ZeDeviceIpVersionExt->ipVersion >= 0x030dc000;
return ReturnValue(DeviceIsDG2OrNewer &&
Device->ZeDeviceImageProperties->maxImageDims2D > 0);
}
case UR_DEVICE_INFO_IMAGE_PITCH_ALIGN_EXP:
case UR_DEVICE_INFO_MAX_IMAGE_LINEAR_WIDTH_EXP:
Expand Down
Loading