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] Breadth-first schedule #182

Open
wants to merge 9 commits into
base: sycl-graph-develop
Choose a base branch
from

Conversation

Wee-Free-Scot
Copy link

@Wee-Free-Scot Wee-Free-Scot commented May 22, 2023

The intent is to change the "reversed depth-first" scheduling/ordering (as implemented in topology_sort) to a strict breadth-first scheduling/ordering. The schedule is now computed by building a multimap of nodes in layers.

Draft documentation wording for the change of schedule ordering:

"Breadth-first traversal when scheduling a graph maximizes the number of independent kernels that are submitted concurrently, which enables more efficient work scheduling on massively parallel devices by overlapping kernel launch overheads with independent computation and data movement actions."

A side-effect is to change the trigger that creates the schedule so the executable graph no longer needs an internal reference to the modifiable graph from which it was created. The schedule is now created during the constructor for the executable graph rather than a later call to a method on the modifiable graph.

@reble reble requested review from Bensuo, EwanC and reble May 22, 2023 15:19
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.

I have a bunch of superficial comments on this PR, and I'm seeing a build fail, but fundamentally I'm okay with using the breadth-first approach.

A quick description (can just append to PR description) of why this algorithm is preferable would be useful though, since we may want to document this implementation detail in #183 and justify why it's the default to other internal & external stakeholders.

sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
sycl/source/detail/graph_impl.hpp Outdated Show resolved Hide resolved
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