[SYCL] Improve enqueue function host task#21679
Open
KornevNikita wants to merge 5 commits intointel:syclfrom
Open
[SYCL] Improve enqueue function host task#21679KornevNikita wants to merge 5 commits intointel:syclfrom
KornevNikita wants to merge 5 commits intointel:syclfrom
Conversation
Spec: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc SYCL headers patch: intel#21456 This is the second part of the host_task enqueue function implementation. L0 provides an API to launch host tasks - zeCommandListAppendHostFunction. This is API is used by the urEnqueueHostTaskExp UR function. This patch switch enqueue function host_task to use this API if it's possible.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SYCL experimental sycl_ext_oneapi_enqueue_functions host_task path to prefer the Unified Runtime urEnqueueHostTaskExp API (backed by Level Zero zeCommandListAppendHostFunction) when supported, and adds an e2e test intended to validate the UR call path via tracing output.
Changes:
- Route enqueue-functions
host_tasksubmissions through a new internal handler entry point that tags host tasks as originating from the enqueue-functions API. - In host-task dispatch, query
UR_DEVICE_INFO_ENQUEUE_HOST_TASK_SUPPORT_EXPand callurEnqueueHostTaskExpwhen available. - Add an e2e test that checks UR tracing for the device-info query and
urEnqueueHostTaskExp.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sycl/test-e2e/EnqueueFunctions/native_host_task.cpp | Adds an e2e trace-based test for urEnqueueHostTaskExp usage. |
| sycl/source/handler.cpp | Adds SetHostTaskFromExtEnqueueFunctions to tag host tasks created by enqueue-functions. |
| sycl/source/detail/scheduler/commands.cpp | Attempts to enqueue ext host tasks via urEnqueueHostTaskExp when supported. |
| sycl/source/detail/host_task.hpp | Tracks host-task origin (core API vs enqueue-functions API). |
| sycl/include/sycl/handler.hpp | Adds internal plumbing (HandlerAccess) for enqueue-functions host task submission. |
| sycl/include/sycl/ext/oneapi/experimental/enqueue_functions.hpp | Switches enqueue-functions host_task to use the new internal handler entry point. |
Contributor
Author
|
@uditagarwal97 out of draft, take a look please |
| }); | ||
| } | ||
| } | ||
| Q.wait(); |
Contributor
There was a problem hiding this comment.
Sorry, why this change?
uditagarwal97
approved these changes
Apr 8, 2026
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.
Spec: https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_enqueue_functions.asciidoc
SYCL headers patch: #21456
This is the second part of the host_task enqueue function implementation. L0 provides an API to launch host tasks - zeCommandListAppendHostFunction. This is API is used by the urEnqueueHostTaskExp UR function. This patch switches enqueue function host_task to use this API if it's possible.