-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][Graph] Support for sycl_ext_oneapi_enqueue_barrier extension #11418
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] Support for sycl_ext_oneapi_enqueue_barrier extension #11418
Conversation
Adds support to handle barrier enqueuing with Record&Replay API. Barriers are implemented as empty nodes enforcing the required dependencies. Adds tests that check 1) correctness of graph structure when barriers have been enqueued, 2) processing behavior, 3) exception throwing if barriers are used within explicit API. Notes: 1) Multi-queues barrier is not supported since it does not make sense with asynchronous graph execution. 2) Barriers can only be used with Record&Replay API, since barriers rely on events to enforce dependencies. Co-authored-by: Ben Tracy <[email protected]> --------- Co-authored-by: Ben Tracy <[email protected]>
Co-authored-by: Ben Tracy <[email protected]>
Hi @intel/llvm-reviewers-runtime, could we have a review of this please |
// (B2) | ||
// /|\ | ||
// / | \ | ||
// (6) (7) (8) (those nodes also have as a precedessor) |
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.
NIT: those nodes also have barrier as a predecessor?
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.
Thanks. The sentence should have been "those nodes also have B1 as a predecessor".
We fixed it.
Does it mean that Or does it forbid any mixing of the queues, including the following code? sycl::event e = q1.ext_oneapi_submit_barrier();
q2.ext_oneapi_submit_barrier({e}); |
The sentence was not accurate. Indeed, the implementation supports both cases you mentioned. We added tests (unitests) to verify these use cases. We also updated the PR description to better explain the limitations of our implementation. |
@intel/llvm-gatekeepers could you please merge this PR? |
// \ | / | ||
// \ | / | ||
// (B) | ||
// / \ |
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.
It looks like post-commit doesn't like these \
despite them being in comments. @mfrancepillois - Could you please address this issue ASAP?
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.
I've managed to reproduce this locally, will open a fix PR
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.
Turns out it's the trailing whitespace character that triggers the warning #11493
Can see it show in godbolt too https://godbolt.org/z/veeYvs6de if you add a whitespace character to the end of a line
Fixes post commit CI fail https://github.com/intel/llvm/actions/runs/6470268418/job/17566091513 ``` /__w/llvm/llvm/src/sycl/unittests/Extensions/CommandGraph.cpp:1459:12: error: backslash and newline separated by space [-Werror,-Wbackslash-newline-escape] 1459 | // /|\ | ^ 1 error generated. ``` This was occuring due to a trailing whitespace character in the comment that was introduced in #11418 (comment)
The following features defined in the specification as unsupported, have working implementations upstream. * intel#11418 * intel#11505 * intel#11556
The following features are defined in the specification as unsupported, but have working implementations merged upstream. This PR updates the graphs specification to reflect that and removes some trailing whitespace. * intel#11418 * intel#11505 * intel#11556 * intel#11855
Adds support to handle barrier enqueuing with Record&Replay API. Barriers are implemented as empty nodes enforcing the required dependencies.
Adds tests that check:
Notes: