Skip to content

Commit 9ecc74b

Browse files
[SYCL][L0] Use L0 info for PI_DEVICE_INFO_IMAGE*_MAX_* (#6246)
1 parent d1f1698 commit 9ecc74b

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2772,25 +2772,15 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
27722772
return ReturnValue(pi_uint64{DoubleFPValue});
27732773
}
27742774
case PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH:
2775-
// Until Level Zero provides needed info, hardcode default minimum values
2776-
// required by the SYCL specification.
2777-
return ReturnValue(size_t{8192});
2775+
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims2D});
27782776
case PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT:
2779-
// Until Level Zero provides needed info, hardcode default minimum values
2780-
// required by the SYCL specification.
2781-
return ReturnValue(size_t{8192});
2777+
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims2D});
27822778
case PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH:
2783-
// Until Level Zero provides needed info, hardcode default minimum values
2784-
// required by the SYCL specification.
2785-
return ReturnValue(size_t{2048});
2779+
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims3D});
27862780
case PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT:
2787-
// Until Level Zero provides needed info, hardcode default minimum values
2788-
// required by the SYCL specification.
2789-
return ReturnValue(size_t{2048});
2781+
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims3D});
27902782
case PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH:
2791-
// Until Level Zero provides needed info, hardcode default minimum values
2792-
// required by the SYCL specification.
2793-
return ReturnValue(size_t{2048});
2783+
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims3D});
27942784
case PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE:
27952785
return ReturnValue(
27962786
size_t{Device->ZeDeviceImageProperties->maxImageBufferSize});

0 commit comments

Comments
 (0)