Skip to content

feature(opencl): enable bindless image support for OpenCL frontend#956

Open
juanchuletas wants to merge 1 commit into
intel:masterfrom
juanchuletas:bindless-images-ocl
Open

feature(opencl): enable bindless image support for OpenCL frontend#956
juanchuletas wants to merge 1 commit into
intel:masterfrom
juanchuletas:bindless-images-ocl

Conversation

@juanchuletas

Copy link
Copy Markdown

Enable BindlessHeapsHelper initialization for the OpenCL frontend by querying hardware capability via releaseHelper instead of returning false unconditionally in getGlobalBindlessHeapConfiguration.

Add opt-in bindless image creation through CL_MEM_BINDLESS_IMAGE_INTEL property. When set, Image::create allocates a bindless slot in the global Surface State Heap using the shared BindlessHeapsHelper infrastructure already used by the Level Zero frontend.

Signed-off-by: juan.garcia.cpp@gmail.com

Context

I am working on sycl_ext_oneapi_bindless_images in intel/llvm (PR #22257). The Unified Runtime OpenCL adapter returns UR_RESULT_ERROR_UNSUPPORTED_FEATURE for all bindless image entry points because the OpenCL has no bindless support.

This PR is the first step: enabling the shared BindlessHeapsHelper infrastructure for the OpenCL frontend and adding opt-in bindless slot allocation for images via CL_MEM_BINDLESS_IMAGE_INTEL.

Validated on Intel Arc A770:

  • Image creation with CL_MEM_BINDLESS_IMAGE_INTEL allocates a slot in the global SSH
  • Image creation without the property does not allocate a bindless slot
  • All existing ULTs pass

Remaining work:

Handle retrieval API so applications can query the bindless handle
Extension string registration is needed kind of cl_intel_bindless_images

Enable BindlessHeapsHelper initialization for the OpenCL frontend by
querying hardware capability via releaseHelper instead of returning
false unconditionally in getGlobalBindlessHeapConfiguration.

Add opt-in bindless image creation through CL_MEM_BINDLESS_IMAGE_INTEL
property. When set, Image::create allocates a bindless slot in the
global Surface State Heap using the shared BindlessHeapsHelper
infrastructure already used by the Level Zero frontend.

Signed-off-by: juan.garcia.cpp@gmail.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant