Repository navigation
Use a no-op order manager for in-order queues - #2299
Open
ndgrigorian wants to merge 2 commits into
Open
ndgrigorian wants to merge 2 commits into
ndgrigorian wants to merge 2 commits into
Conversation
ndgrigorian
force-pushed
the
no-op-order-manager-for-in-order-queues
branch
from
April 26, 2026 23:00
3784662 to
849b0af
Compare
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2299/index.html |
ndgrigorian
force-pushed
the
no-op-order-manager-for-in-order-queues
branch
from
April 26, 2026 23:38
849b0af to
115b184
Compare
Collaborator
ndgrigorian
marked this pull request as ready for review
April 29, 2026 16:02
ndgrigorian
requested review from
antonwolfy and
vlad-perevezentsev
as code owners
April 29, 2026 16:02
Collaborator
Author
|
@antonwolfy @vlad-perevezentsev Please experiment with it as well |
antonwolfy
reviewed
May 5, 2026
antonwolfy
reviewed
May 5, 2026
Wraps ext_oneapi_get_last_event() from sycl_ext_oneapi_in_order_queue_events, with DPCTLQueue_GetLastEvent and DPCTLQueue_GetLastEvent_Available in the C-API. Builds without the extension report it as unavailable.
_InOrderManager keeps only the most recently added events, and submitted_events is the queue's last event when get_last_event is available. It is cached like _SequentialOrderManager, so clear() and thread exit wait on the queue.
ndgrigorian
force-pushed
the
no-op-order-manager-for-in-order-queues
branch
from
November 2, 2026 08:19
6db4cd7 to
2d6d8ea
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As pointed out in #2293, an in-order queue already orders the tasks submitted to it, including tasks submitted by extensions that do not use
SequentialOrderManager. What the order manager did not do for such a queue is account for those tasks:SequentialOrderManager[q].wait()returned before them, andsubmitted_eventsdid not include them, so work on another queue depending onsubmitted_eventscould race with them.This PR:
SyclQueue.get_last_event(), wrappingext_oneapi_get_last_event()from the DPC++sycl_ext_oneapi_in_order_queue_eventsextensionSequentialOrderManager[q]return an_InOrderManagerfor in-order queues. It keeps only the most recentlyadded events.
submitted_eventsis the queue's last event whenget_last_eventis available, and the most recently added computation events otherwise.wait()waits on the queue._InOrderManagerin the thread-local map, soclear()at exit and thread exit wait on in-order queues as they do on out-of-order ones.SequentialOrderManager[q]asOrderManagerProtocol.