-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed threading issues with usm and kernel execution
Usm adds some extra event handling so that any freeing of usm memory is safe. There is some attempt already to make this thread safe but this leaves windows where we have added events to the usm allocations but we have not actually added the kernel execution to the queue. This can mean the functions such as clMemBlockingFreeINTEL can end up waiting on an event in a queue too early. A previous fix tried to reuse the context mutex, but this had issues as this cannot be above a queue mutex. For this reason we have added a new usm mutex which is expected to be above all other queue/context mutexes and can last longer. The USM mutex is placed above both the usm event creation and the push to the queue, which means that the usm deletion correctly waits.
- Loading branch information
Showing
5 changed files
with
36 additions
and
10 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
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