-
Notifications
You must be signed in to change notification settings - Fork 734
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 Graphs and empty barriers #13066
Labels
Comments
The problem appears even in less pathological cases: sycl::queue q1{ctx, dev, {sycl::property::queue::in_order()}};
sycl::queue q2{ctx, dev, {sycl::property::queue::in_order()}};
const std::vector<sycl::queue> queuesToRecord{q1, q2};
// TODO: Allocate buf_h and buf_d...
// TODO: Start recording the graph
sycl::event ev = q1.copy(buf_h, buf_d, n);
// Now, we want all future operations in q2 to wait for the copy to complete...
q2.ext_oneapi_submit_barrier({ev}); // Ooops, throws! |
EwanC
added a commit
to reble/llvm
that referenced
this issue
Mar 28, 2024
Fix for intel#13066 The special case for using barriers on an in-order queue is that the last event/node submitted to the queue is used as an event for the barrier to depend on. Looking at the last command submitted to the queue isn't correct for a graph, because previous commands submitted to a graph could have been added explicitly or from recording another queue. Therefore, there is not guaranteed that the last command submitted by the in-order queue is correct dependency for the barrier node in the graph.
Thanks for the bug report, proposed fix - #13193 |
martygrant
pushed a commit
that referenced
this issue
Apr 1, 2024
Fix for #13066 The special case for using barriers on an in-order queue is that the last event/node submitted to the queue is used as an event for the barrier to depend on. Looking at the last command submitted to the queue isn't correct for a graph, because previous commands submitted to a graph could have been added explicitly or from recording another queue. Therefore, there is not guaranteed that the last command submitted by the in-order queue is correct dependency for the barrier node in the graph. --------- Co-authored-by: Ori Sky <4142775+ori-sky@users.noreply.github.com>
Thanks for the fix, @EwanC! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Trying to record an empty barrier while recording a graph throws an exception. The same pattern works fine when not recording a graph.
By itself, this operation is meaningless. However, it might appear in more complex code, like the following:
I don't see anything in either https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/supported/sycl_ext_oneapi_enqueue_barrier.asciidoc or https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc prohibiting such use, so I believe it should be allowed.
To reproduce
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: