-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Improve events cleanup for immediate command lists (#7715)
Currently we call zeEventQueryStatus every time before removing an event from an immediate command list. There are several improvements which can be done: 1. Currently we synchronize immediate command lists in synchronize() under queue lock. So we can just remove all events from all command lists right there without checking the status. 2. If we know that some event is completed and queue is in-order then we can cleanup all preceding events in the command list including that event without checking the status. Currently we don't check for completed events in different command lists, this is an area for improvement. Introduced new CleanupEventsInImmCmdLists function to do that. Additionally made this function autonomous so that it can cleanup events in the immediate command lists of the queue for any case. Made resetCommandLists to call CleanupEventsInImmCmdLists to have single point of entry. 3. We can avoid calling zeEventQueryStatus by checking LastCommandEvent for in-order queues and by checking Completed flag. 4. Also if we end up walking over command list and checking status then break early as soon as first non-completed event is found.
- Loading branch information
Showing
2 changed files
with
187 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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