Skip to content

[UR][Offload] Event waiting #19594

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 4 commits into from
Aug 11, 2025
Merged

[UR][Offload] Event waiting #19594

merged 4 commits into from
Aug 11, 2025

Conversation

RossBrunton
Copy link
Contributor

Implement urEventsWait[WithBarrier] and respect the waitlist of enqueue
functions.

@RossBrunton RossBrunton requested a review from a team as a code owner July 25, 2025 14:06
Implement urEventsWait[WithBarrier] and respect the waitlist of enqueue
functions.

// Create events on each active queue for an arbitrary thread to block on
// TODO: Can we efficiently check if each thread is "finished" rather than
// creating an event?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stream_queue_t::syncEvents has some optimizations to only sync streams that need to be

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stream_queue_t::syncEvents doesn't seem to exist. stream_queue_t::syncStreams does, but doesn't seem to exclude completed threads as far as I can tell.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

llvm/llvm-project#152304 Should make waiting on an empty queue basically a no-op.

@RossBrunton
Copy link
Contributor Author

@pbalcer @callumfare I think I've resolved all the concerns with this, can I get another look?

@RossBrunton
Copy link
Contributor Author

@intel/llvm-gatekeepers Please merge.

@callumfare When you're back, we can look at improving performance if required; I think there is discussion to have, but they probably make sense as part of another task and also possibly with liboffload changes.

@kbenzie kbenzie merged commit 945976c into intel:sycl Aug 11, 2025
59 of 61 checks passed
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.

4 participants