Repository navigation
[SYCL] KernelCompiler . Align get_backend_content() behavior to spec. - #23634
Open
cperkinsintel wants to merge 3 commits into
Open
cperkinsintel wants to merge 3 commits into
cperkinsintel wants to merge 3 commits into
Conversation
… for L0, but this was overlooked and we instead return SPIR-V today. This PR fixes that and puts it under stricteter testing. Signed-off-by: Chris Perkins <chris.perkins@intel.com>
Signed-off-by: Chris Perkins <chris.perkins@intel.com>
Contributor
Author
|
@slawekptak friendly ping |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Binary extraction can assert or access out of bounds for Level Zero subdevices, return invalid content on unsupported backends, and fail when the selected device is incompatible with the image.
3 open issues
What changed in this PR
This PR aligns SYCL device-image backend content with the extension specification by returning backend-built binaries rather than SPIR-V for Level Zero and OpenCL.
Changes:
- Adds cached binary extraction and lazy program building while preserving stored native images.
- Updates interoperability tests to load executable/native binaries.
- Adds unit coverage and a Level Zero kernel-compiler regression test.
| File | Description |
|---|---|
| sycl/unittests/Extensions/DeviceImageBackendContent.cpp | Tests binary extraction, caching, stored native bytes, and selector bundles. |
| sycl/unittests/Extensions/CMakeLists.txt | Registers the new unit tests. |
| sycl/test-e2e/KernelCompiler/L0_return_binary_format.cpp | Verifies source-built native binaries can be reloaded and executed. |
| sycl/test-e2e/DeviceImageBackendContent/OCL_interop_test.cpp | Loads returned content as an OpenCL binary. |
| sycl/test-e2e/DeviceImageBackendContent/L0_interop_test.cpp | Loads returned content as a native Level Zero module. |
| sycl/source/kernel_bundle.cpp | Delegates backend-content retrieval to the image implementation. |
| sycl/source/detail/device_image_impl.hpp | Implements cached binary retrieval and lazy builds. |
Review effort: Balanced
slawekptak
approved these changes
Nov 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


ext_oneapi_get_backend_content() is specified to return native format for L0, but this was overlooked and we instead return SPIR-V today. This PR fixes that and puts it under stricteter testing.