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

[SYCL][Graph] Add a shortcut for adding leaves as dependencies #339

Closed
wants to merge 1 commit into from

Conversation

mfrancepillois
Copy link
Collaborator

@mfrancepillois mfrancepillois commented Nov 1, 2023

Adds a node property that allows users to easily add all leaves of a graph as dependencies when creating a node with the explicit API.
Updates the spec with this new feature.
Adds unitests that check this behaviour.

@mfrancepillois mfrancepillois added the Graph Implementation Related to DPC++ implementation and testing label Nov 1, 2023
Copy link

github-actions bot commented Nov 2, 2023

✅ With the latest revision this PR passed the C/C++ code formatter.

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.

LGTM, minor comments

sycl/include/sycl/ext/oneapi/experimental/graph.hpp Outdated Show resolved Hide resolved
sycl/include/sycl/ext/oneapi/experimental/graph.hpp Outdated Show resolved Hide resolved
sycl/include/sycl/ext/oneapi/experimental/graph.hpp Outdated Show resolved Hide resolved
Comment on lines 491 to 492
adding all leaves of a graph as dependencies.
Therefore the created node will depend on all the current leaves in the graph.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
adding all leaves of a graph as dependencies.
Therefore the created node will depend on all the current leaves in the graph.
adding all leaves of a graph as dependencies of the newly created node.

Copy link
Owner

Choose a reason for hiding this comment

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

Do we need to specify when we actually evaluate the node dependencies? For a multi-threaded scenario the set of leaves wouldn't necessarily be constant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I merged the two sentences in one but I kept the notion of "current" leaves.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

IMO, in a multi-threading scenario this property could lead to an indeterminate graph since the order of adding nodes is not deterministic, but it cannot lead to an invalid state of the graph.

Adds a node property that allows users to easily add all leaves of a graph as dependencies when creating a node with the explicit API.
Updates the spec with this new feature.
Adds unitests that check this behaviour.
@mfrancepillois
Copy link
Collaborator Author

Upstream PR intel#11855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph Implementation Related to DPC++ implementation and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants