Skip to content

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Sep 22, 2025

Problem

As an optimization in ext_oneapi_submit_barrier, for in-order queue, when waitlist is empty, we return the last event, if it is available. However, after #18277, we no longer store last event and instead submit a marker to get the last event. And this caused performance regression in some of our internal benchmarks.

Solution
Don't return last event and instead submit a barrier with empty waitlist.

@uditagarwal97 uditagarwal97 self-assigned this Sep 22, 2025
@uditagarwal97 uditagarwal97 marked this pull request as ready for review September 22, 2025 21:49
@uditagarwal97 uditagarwal97 requested a review from a team as a code owner September 22, 2025 21:49
@uditagarwal97
Copy link
Contributor Author

@jbrodman @vinser52 fyi.

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

I am a little surprised that a marker event would be slower than actually submitting a barrier. Of course, the adapters/backends could be optimizing the barriers on in-order queues themselves, i.e. by storing the latest event themselves or by submitting markers internally. As such, I am all for dropping the complexity from the runtime.

@againull
Copy link
Contributor

I am a little surprised that a marker event would be slower than actually submitting a barrier. Of course, the adapters/backends could be optimizing the barriers on in-order queues themselves, i.e. by storing the latest event themselves or by submitting markers internally. As such, I am all for dropping the complexity from the runtime.

Yes, L0 adapter has the same optimization, that's why removing optimization from sycl level restores performance, because markers are not inserted, but optimization is still in place at adapter level.
Optimization was introduced at sycl level to have same benefit for all backends.

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