Skip to content

[SYCL][Graph] Add local memory parameter update functionality #16712

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

Draft
wants to merge 6 commits into
base: sycl
Choose a base branch
from

Conversation

fabiomestre
Copy link
Contributor

Updates the sycl graph specification to add the dynamic_accessor, dynamic_local_accessor and dynamic_work_group_memory classes.

This adds the required functionality to support updating local memory parameters to sycl graph kernel nodes.

Additionally, it also moves the accessor update functionality from the dynamic_parameter class to the new dynamic_accessor class. This improves the cohesion of the API and removes the need to use placeholder accessors when updating buffer arguments in sycl graphs.

Updates the sycl graph specification to add the dynamic_accessor,
dynamic_local_accessor and dynamic_work_group_memory classes.

This adds the required functionality to support updating local
memory parameters to sycl graph kernel nodes.

Additionally, it also moves the accessor update functionality
from the dynamic_parameter class to the new dynamic_accessor
class. This improves the cohesion of the API and removes
the need to use placeholder accessors when updating buffer arguments
in sycl graphs.
@fabiomestre fabiomestre requested a review from gmlueck January 21, 2025 12:43
@fabiomestre
Copy link
Contributor Author

@gmlueck These are the proposed spec changes for the new dynamic classes. It would be great if you could review them.

There is also a PR that implements dynamic_local_accessor here: #16573 (review)

@EwanC EwanC changed the title Add local memory parameter update functionality to sycl graphs. [SYCL][Graph] Add local memory parameter update functionality Jan 28, 2025
- Specify new usage for dynamic parameters after compiler support is
  added.
- Update get() function to be used only in device code.
- Remove set_arg() overloads
- Clarify template parameters limitations and add static_asserts to
  class definition.
- Fix wording of work_group_memory parameters.
@gmlueck
Copy link
Contributor

gmlueck commented Feb 14, 2025

Let me know when you want me to review this again. I saw you pushed another commit, but I wasn't sure if you have more to come.

@fabiomestre
Copy link
Contributor Author

fabiomestre commented Feb 14, 2025

Let me know when you want me to review this again. I saw you pushed another commit, but I wasn't sure if you have more to come.

I pushed another commit after that but it's only updating the usage guide with a few more examples.

Feel free to review the PR again. I think I addressed all the unresolved comments.

Copy link
Contributor

@gmlueck gmlueck left a comment

Choose a reason for hiding this comment

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

I think this looks really good. I have one minor comment below, but I'm approving anyway. If you agree with my comment, it would be nice to address it before merging,

Updates the dynamic parameter class to require underlying type
to be device copyable.
martygrant pushed a commit that referenced this pull request Mar 28, 2025
…7314)

Implements dynamic_work_group_memory for SYCL-Graphs:
#16712

With this PR we're able to update work_group_memory size on subsequent
graph executions. We're also now able to use dynamic_work_group_memory
with both lambdas and free function kernels.
steffenlarsen pushed a commit that referenced this pull request May 27, 2025
- Implements the dynamic_local_accessor class with compiler support.
- Refactor the recently added dynamic_work_group_memory class to only
use one `impl` member variable. This brings it closer to the design of
other sycl classes and avoids future ABI break issues.
- There are 2 ABI breaking changes. However, they are both related to
the `dynamic_work_group_memory` class whose
[specification](#16712) has not been
merged yet and is not yet officially supported.
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.

2 participants