Skip to content

[SYCL] KernelCompiler . Align get_backend_content() behavior to spec. - #23634

Open
cperkinsintel wants to merge 3 commits into
intel:syclfrom
cperkinsintel:cperkins-backend-content-native
Open

cperkinsintel wants to merge 3 commits into
intel:syclfrom
cperkinsintel:cperkins-backend-content-native

Conversation

@cperkinsintel

Copy link
Copy Markdown
Contributor

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.

… 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>
@cperkinsintel
cperkinsintel marked this pull request as ready for review October 27, 2026 18:05
@cperkinsintel
cperkinsintel requested a review from a team as a code owner October 27, 2026 18:05
@cperkinsintel

Copy link
Copy Markdown
Contributor Author

@slawekptak friendly ping

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

This branch has not been deployed

No deployments
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.

3 participants