-
Notifications
You must be signed in to change notification settings - Fork 769
[Bindless][SYCL][UR] Create a sampled image with a single UR API #18384
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
base: sycl
Are you sure you want to change the base?
[Bindless][SYCL][UR] Create a sampled image with a single UR API #18384
Conversation
We no longer need to create a UR sampler object in order to create a sampled image. The backends can simply use the sampler description to create the sampled image.
544bf40
to
6693ade
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UR + CL LGTM
…ed-image-without-sampler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments and one missing error check, otherwise LGTM.
The following CI failures for Intel Arc A Series GPUs are unrelated. Failed Tests (4):
SYCL :: KernelAndProgram/cache_env_vars.cpp
SYCL :: KernelAndProgram/cache_env_vars_lin.cpp
SYCL :: KernelCompiler/opencl.cpp
SYCL :: KernelCompiler/sycl_cache_pm.cpp These appeared after rebasing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
…ed-image-without-sampler
…ed-image-without-sampler
…ed-image-without-sampler
The following CI failures for Intel Arc A Series GPUs are unrelated. Failed Tests (3):
SYCL :: Adapters/level_zero/interop-buffer-ownership.cpp
SYCL :: Adapters/level_zero/usm_device_read_only.cpp
SYCL :: Basic/buffer/buffer_create.cpp See issue #18463. |
@intel/llvm-gatekeepers This PR is ready to merge. |
We no longer need to create a UR sampler object in order to create a sampled image. The backends can simply use the sampler description to create the sampled image.
Note this is an ABI break in the currently still experimental bindless images extension for Unified Runtime.
Addresses the following issue: oneapi-src/unified-runtime#1463
Relevant discussion from oneapi-src/unified-runtime#2640 (comment)
Additionally, avoiding the allocation of a sampler object itself fixes memory leak(s) in all adapters where the UR sampler handle was never released which was caused by the use of the API in the SYCL RT only calling urSamplerCreate and not Release for the sampler associated with the image. Also, while HIP and Cuda do not further create backend specific sampler objects in the respective adapters, Level Zero was creating one that never got released upon freeing the image memory which lead to leaking the Level Zero sampler memory as well. Now that Level Zero can create a sampled image from a descriptor only, the sampler object is not needed altogether, allowing to rid of the above mentioned leaking memory allocations and simplify the runtime.