-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cross queue dependency when command buffer already dispatched.
The UnitCL test USMBlockingFreeTest, MultipleQueueMultipleAlloc had previously been disabled due to sporadic fails. Tsan build showed that there was a dependency issue between the fill and copy commands. This test did something like the following: Q_A: Fill -> e[0] BufA 4096 Q_B: Fill -> e[1] BufB 4096 Q_C: e[0]->Memcpy from BufA 2048 Q_C: e[1]->Memcpy from BufB 2048 Much of the core dependencies for command buffers is done in _cl_command_queue::getCommandBufferPending(). In order to capture event dependencies, semaphores are waited on from pending or dispatched command buffers. The code would check events and then check to see if they were in pending command buffers and if so would add semaphores wait from them. If it could not find a pending command buffer it would add the wait on any running command buffers. This generally worked but for cross queues it was not checking the running command buffers of that queue. Additionally there is an early out for the case of a single pending command buffer but if there is any cross queue events, we cannot use this.
- Loading branch information
Showing
3 changed files
with
64 additions
and
33 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
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