Skip to content

[SYCL][L0] Use L0 info for PI_DEVICE_INFO_IMAGE*_MAX_* #6246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 7, 2022
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: 5 additions & 15 deletions sycl/plugins/level_zero/pi_level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2772,25 +2772,15 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
return ReturnValue(pi_uint64{DoubleFPValue});
}
case PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH:
// Until Level Zero provides needed info, hardcode default minimum values
// required by the SYCL specification.
return ReturnValue(size_t{8192});
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims2D});
case PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT:
// Until Level Zero provides needed info, hardcode default minimum values
// required by the SYCL specification.
return ReturnValue(size_t{8192});
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims2D});
case PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH:
// Until Level Zero provides needed info, hardcode default minimum values
// required by the SYCL specification.
return ReturnValue(size_t{2048});
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims3D});
case PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT:
// Until Level Zero provides needed info, hardcode default minimum values
// required by the SYCL specification.
return ReturnValue(size_t{2048});
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims3D});
case PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH:
// Until Level Zero provides needed info, hardcode default minimum values
// required by the SYCL specification.
return ReturnValue(size_t{2048});
return ReturnValue(size_t{Device->ZeDeviceImageProperties->maxImageDims3D});
case PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE:
return ReturnValue(
size_t{Device->ZeDeviceImageProperties->maxImageBufferSize});
Expand Down