Skip to content

Add local memory parameter update functionality to sycl graphs. #382

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 5 commits into
base: sycl
Choose a base branch
from

Conversation

fabiomestre
Copy link
Collaborator

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.

Copy link
Collaborator

@EwanC EwanC left a comment

Choose a reason for hiding this comment

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

Comments are all trivial editorial details from a pass reading this over

Copy link
Collaborator

@EwanC EwanC left a comment

Choose a reason for hiding this comment

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

This looks good, we could maybe also have an examples in sycl/doc/syclgraph/SYCLGraphUsageGuide.md to help show the new dynamic classes and aid stakeholder review.

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 force-pushed the fabio/local_accessor_update_spec branch from 670e1ea to 372f06f Compare January 21, 2025 12:01
- 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.

sycl_ext::dynamic_parameter dynParam(myGraph, ptrX);

sycl_ext::node kernelNode = myGraph.add([&](handler& cgh) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

variable is called defined as Graph not myGraph

sycl_ext::dynamic_parameter dynParam(myGraph, ptrX);

sycl_ext::node kernelNode = myGraph.add([&](handler& cgh) {
CGH.parallel_for(range<1>(Size), [=](item<1> Id) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

variable is defined as cgh not CGH

Updates the dynamic parameter class to require underlying type
to be device copyable.
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