mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
fix: check for new bcs submission before releasing queue resources
Related-To: NEO-9005 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a033df33ff
commit
e2387a450b
@@ -1291,9 +1291,25 @@ WaitStatus CommandQueue::waitForAllEngines(bool blockedQueue, PrintfHandler *pri
|
||||
|
||||
waitStatus = waitUntilComplete(taskCountToWait, activeBcsStates, flushStamp->peekStamp(), false, cleanTemporaryAllocationsList, waitedOnTimestamps);
|
||||
|
||||
TakeOwnershipWrapper<CommandQueue> queueOwnership(*this);
|
||||
{
|
||||
TakeOwnershipWrapper<CommandQueue> queueOwnership(*this);
|
||||
|
||||
handlePostCompletionOperations(this->taskCount != taskCountToWait);
|
||||
/*
|
||||
Check if queue resources cleanup after wait is possible.
|
||||
If new submission happened during wait, we need to query completion (without waiting).
|
||||
*/
|
||||
|
||||
bool checkCompletion = (this->taskCount != taskCountToWait);
|
||||
|
||||
for (auto &state : activeBcsStates) {
|
||||
if (this->bcsStates[EngineHelpers::getBcsIndex(state.engineType)].taskCount != state.taskCount) {
|
||||
checkCompletion = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
handlePostCompletionOperations(checkCompletion);
|
||||
}
|
||||
|
||||
if (printfHandler) {
|
||||
if (!printfHandler->printEnqueueOutput()) {
|
||||
|
||||
Reference in New Issue
Block a user