SWDEV-269654 - Fix HIP stream busy query

- Avoid GPU wait on the marker submission and update the command
batch after HSA signal callback upon HSA barrier completion.

Change-Id: I5c1c97212aefc2ae4b99aa9e2a81627ee9a38c1c


[ROCm/clr commit: 6966d8098e]
This commit is contained in:
German Andryeyev
2021-02-03 10:13:22 -05:00
parent c039f3fc2c
commit e60c7aa890
6 changed files with 158 additions and 58 deletions
@@ -227,7 +227,7 @@ Command* HostQueue::getLastQueuedCommand(bool retain) {
if (AMD_DIRECT_DISPATCH) {
// The batch update must be lock protected to avoid a race condition
// when multiple threads submit/flush/update the batch at the same time
ScopedLock sl(lock());
ScopedLock sl(vdev()->execution());
// Since the lastCmdLock_ is acquired, it is safe to read and retain the lastEnqueueCommand.
// It is guaranteed that the pointer will not change.