fix: check for new submission before releasing TSP nodes in wait call.

Related-To: NEO-8318

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2023-08-31 10:42:16 +00:00
committed by Compute-Runtime-Automation
parent 5833d65bc0
commit f1fc273cfc
3 changed files with 54 additions and 4 deletions

View File

@@ -1291,9 +1291,13 @@ WaitStatus CommandQueue::waitForAllEngines(bool blockedQueue, PrintfHandler *pri
}
}
waitStatus = waitUntilComplete(taskCount, activeBcsStates, flushStamp->peekStamp(), false, cleanTemporaryAllocationsList, waitedOnTimestamps);
auto taskCountToWait = taskCount;
handlePostCompletionOperations(false);
waitStatus = waitUntilComplete(taskCountToWait, activeBcsStates, flushStamp->peekStamp(), false, cleanTemporaryAllocationsList, waitedOnTimestamps);
TakeOwnershipWrapper<CommandQueue> queueOwnership(*this);
handlePostCompletionOperations(this->taskCount != taskCountToWait);
if (printfHandler) {
if (!printfHandler->printEnqueueOutput()) {
@@ -1382,8 +1386,6 @@ bool CommandQueue::migrateMultiGraphicsAllocationsIfRequired(const BuiltinOpPara
}
void CommandQueue::handlePostCompletionOperations(bool checkQueueCompletion) {
TakeOwnershipWrapper<CommandQueue> queueOwnership(*this);
if (checkQueueCompletion && !isCompleted(this->taskCount, this->bcsStates)) {
return;
}