Skip to content
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

Refactor command update API to take a list of configurations #2666

Closed
wants to merge 3 commits into from

Conversation

EwanC
Copy link
Contributor

@EwanC EwanC commented Feb 5, 2025

Update the urCommandBufferUpdateKernelLaunchExp API for updating commands in a command-buffer to take a list of commands.

The current API operates on a single command, this means that the SYCL-Graph update(std::vector<nodes>) API needs to serialize the list into N calls to the UR API. Given that both OpenCL clUpdateMutableCommandsKHR and Level-Zero
zeCommandListUpdateMutableCommandsExp can operate on a list of commands, this serialization at the UR layer of the stack introduces extra host API calls.

This PR improves the urCommandBufferUpdateKernelLaunchExp API so that a list of commands is passed all the way from SYCL to the native backend API.

As highlighted in #2671 this patch requires the handle translation auto generated code to be able to handle a list of structs, which is not currently the case. This is PR includes a API specific temporary workaround in the mako file which will unblock this PR until a more permanent solution is completed.

DPC++ PR intel/llvm#17019

@github-actions github-actions bot added loader Loader related feature/bug conformance Conformance test suite issues. specification Changes or additions to the specification experimental Experimental feature additions/changes/specification level-zero L0 adapter specific issues cuda CUDA adapter specific issues hip HIP adapter specific issues opencl OpenCL adapter specific issues native-cpu Native CPU adapter specific issues command-buffer Command Buffer feature addition/changes/specification labels Feb 5, 2025
@EwanC EwanC force-pushed the ewan/update_list branch 6 times, most recently from de05080 to c14f5ef Compare February 6, 2025 10:35
@EwanC EwanC changed the title Refactor command update API to take a list of configurations WIP - Refactor command update API to take a list of configurations Feb 6, 2025
@EwanC EwanC force-pushed the ewan/update_list branch 4 times, most recently from 4993b39 to 7c4a9af Compare February 6, 2025 12:30
@EwanC EwanC force-pushed the ewan/update_list branch 3 times, most recently from 75f908b to e9c7851 Compare February 7, 2025 12:58
@EwanC EwanC changed the title WIP - Refactor command update API to take a list of configurations Refactor command update API to take a list of configurations Feb 7, 2025
EwanC added a commit to reble/llvm that referenced this pull request Feb 14, 2025
Uses PR oneapi-src/unified-runtime#2666 to
pass a list of updates to UR in a single host call per
UR command-buffer in the graph, rather than
making N calls to UR for N nodes to update.
EwanC added a commit to reble/llvm that referenced this pull request Feb 14, 2025
Uses PR oneapi-src/unified-runtime#2666 to
pass a list of updates to UR in a single host call per
UR command-buffer in the graph, rather than
making N calls to UR for N nodes to update.
EwanC added a commit to reble/llvm that referenced this pull request Feb 14, 2025
Uses PR oneapi-src/unified-runtime#2666 to
pass a list of updates to UR in a single host call per
UR command-buffer in the graph, rather than
making N calls to UR for N nodes to update.
EwanC added a commit to reble/llvm that referenced this pull request Feb 17, 2025
Uses PR oneapi-src/unified-runtime#2666 to
pass a list of updates to UR in a single host call per
UR command-buffer in the graph, rather than
making N calls to UR for N nodes to update.
EwanC and others added 2 commits February 18, 2025 09:17
Update the `urCommandBufferUpdateKernelLaunchExp` API for updating
commands in a command-buffer to take a list of commands.

The current API operates on a single command, this means that the
SYCL-Graph `update(std::vector<nodes>)` API needs to serialize
the list into N calls to the UR API. Given that both OpenCL
`clUpdateMutableCommandsKHR` and Level-Zero
`zeCommandListUpdateMutableCommandsExp` can operate on a list of
commands, this serialization at the UR layer of the stack
introduces extra host API calls.

This PR improves the `urCommandBufferUpdateKernelLaunchExp` API
so that a list of commands is passed all the way from SYCL to the
native backend API.
To workaround oneapi-src#2671
where the spec generator cannot translate handles inside a list of
structs, add a special case to the Mako file so that we can handle
the new entry-point.

This is a temporary measure until the work refactoring handle
translation is complete.

Co-authored-by: Ross Brunton <[email protected]>
EwanC added a commit to reble/llvm that referenced this pull request Feb 18, 2025
Uses PR oneapi-src/unified-runtime#2666 to
pass a list of updates to UR in a single host call per
UR command-buffer in the graph, rather than
making N calls to UR for N nodes to update.
@EwanC EwanC marked this pull request as ready for review February 18, 2025 14:34
@EwanC EwanC requested review from a team as code owners February 18, 2025 14:34
@EwanC EwanC requested a review from reble February 18, 2025 14:34
@EwanC
Copy link
Contributor Author

EwanC commented Feb 19, 2025

Closing this PR as after the UR repo move all changes are in intel/llvm#17019

@EwanC EwanC closed this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command-buffer Command Buffer feature addition/changes/specification conformance Conformance test suite issues. cuda CUDA adapter specific issues experimental Experimental feature additions/changes/specification hip HIP adapter specific issues level-zero L0 adapter specific issues loader Loader related feature/bug native-cpu Native CPU adapter specific issues opencl OpenCL adapter specific issues specification Changes or additions to the specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants