Skip to content

[SYCL][Graph] Fix issue when updating HostTasks with whole graph update #17645

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

Merged
merged 2 commits into from
Apr 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions sycl/source/detail/graph_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,14 @@ void exec_graph_impl::update(
this, Nodes, AllocaQueue, UpdateRequirements, MExecutionEvents);

MExecutionEvents.push_back(UpdateEvent);

if (MContainsHostTask) {
// If the graph has HostTasks, the update has to be blocking. This is
// needed because HostTask nodes (and all the nodes that depend on
// HostTasks), are scheduled using a separate thread. This wait call
// acts as a synchronization point for that thread.
UpdateEvent->wait(UpdateEvent);
}
} else {
// For each partition in the executable graph, call UR update on the
// command-buffer with the nodes to update.
Expand Down