-
Notifications
You must be signed in to change notification settings - Fork 790
[SYCL] Optimize urEnqueueEventsWaitWithBarrier for in-order queues #10995
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
Conversation
Don't insert zeCommandListAppendWaitOnEvents/zeCommandListAppendSignalEvent for queue::ext_oneapi_submit_barrier() if we have in-order queue and all events in the waitlist are from the same queue.
if (!EventWaitList.Length) | ||
return true; | ||
|
||
auto Queue = EventWaitList.UrEventList[0]->UrQueue; |
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.
is this the same queue from the original scope, in line 169 below? if so, maybe we can just pass it to the lambda?
is that the same queue from the original scope?
if (Queue->isInOrderQueue() &&
EmptyOrAllEventsFromSameQueue(EventWaitList) &&
Queue->LastCommandEvent && !Queue->LastCommandEvent->IsDiscarded) {
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.
Fixed.
// For in-order queue and wait-list which is empty or has events from | ||
// the same queue just use the last command event as the barrier event. | ||
if (Queue->isInOrderQueue() && | ||
EmptyOrAllEventsFromSameQueue(EventWaitList) && |
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 think you need to pass queue, as this can only be optimized if events on waitlist have the same que as LastCommandEvent, if events are coming from other queue , even though it is the same, the Last Event wouldn't represent proper status as we need to wait on those.
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.
Yes, I agree, fixed.
@sergey-semenov Friendly ping. |
…ntel#10995) Don't insert zeCommandListAppendWaitOnEvents/zeCommandListAppendSignalEvent for queue::ext_oneapi_submit_barrier() if we have in-order queue and all events in the waitlist are from the same queue.
Don't insert zeCommandListAppendWaitOnEvents/zeCommandListAppendSignalEvent for queue::ext_oneapi_submit_barrier() if we have in-order queue and all events in the waitlist are from the same queue.