-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][Graph] Fix issues with sycl_ext_oneapi_graph subgraphs #10822
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
Conversation
* [SYCL][Graph] Duplicate sub-graph nodes Duplicates the nodes of a sub-graph when added to its parents to enable multiple parents. As a result nodes of the initial sub-graph and the one of the main graph are no longer the exact same (shared_pointer) but two different nodes with similar content. A few unitests have been updated accordingly and an equal operator has been added to node_impl to ease comparison between nodes.
* [SYCL][Graph] Enable empty nodes in Subgraphs The implementation uses the list of scheduled nodes to add a subgraph to a main graph. However, since empty nodes are not scheduled, empty nodes were not listed in this list, resulting in inconsistent graphs when subgraph with empty node(s) were added to a main graph. This PR fixes this issue by forcing to list empty nodes when creating the list for inserting subgraph. It also adds unitests to check that subgraphs with empty nodes are correctly added to a main graph. * [SYCL][Graph] Enable empty nodes in Subgraphs Changes the definition of MSchedule as it now contains all types of nodes (including empty nodes). Empty nodes are now filtered out when creating the commandbuffer and/or enqueuing nodes to only keep their dependencies. This PR updates a few unitests to make them compliant to the new schedule list definition. * Update sycl/source/detail/graph_impl.cpp Co-authored-by: Ben Tracy <[email protected]> --------- Co-authored-by: Ben Tracy <[email protected]>
…location policy (#303)
CI fail for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a nit, but otherwise LGTM!
auto Successor = NodesMap[NextNode]; | ||
NodeCopy->registerSuccessor(Successor, NodeCopy); | ||
} else { | ||
assert("Node duplication failed. A duplicated node is missing."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused MacOS build failure in post commit. Fixing in #10977.
This PR addresses some issues with the sycl_ext_oneapi_graph extension regarding sub-graphs. A sub-graph is when an executable
command_graph
is added as a node in another graph.Currently, adding an executable graph object as a subgraph permanently connects the child graph's root nodes to the parent graph. This affects subsequent independent submissions of the executable child graph object and later additions as a subgraph node. This is incorrect behaviour, as the previous uses as a sub-graph should have no effect on the state of the executable graph object.
Fixed in this PR by duplicating the nodes of a subgraph when added to a parent, enabling multiple parents. As a result, nodes of the initial subgraph and the one of the main graph are no longer the exact same (shared_pointer) but two different nodes with similar content.
Authors
Co-authored-by: Maxime France-Pillois [email protected]