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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
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.

Blocked by issue #2671

@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
Comment on lines +8408 to +8410
pUpdateKernelLaunchLocal.hCommand =
reinterpret_cast<ur_exp_command_buffer_command_object_t *>(
pUpdateKernelLaunchLocal.hCommand)
->handle;
Copy link
Contributor Author

@EwanC EwanC Feb 6, 2025

Choose a reason for hiding this comment

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

This needs to loop over every pUpdateKernelLaunchLocal element in the list and do this translation but can't because of https://oneapi-src.github.io/unified-runtime/core/CONTRIB.html#limitations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #2671 to track this

@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
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.
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.

1 participant