fix: flush L3 cache and wait for flush to complete when event is completed

Related-To: NEO-8395

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2024-01-15 15:45:45 +00:00
committed by Compute-Runtime-Automation
parent 556645e0c5
commit c49695fa6e
2 changed files with 55 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -722,8 +722,20 @@ bool Event::isCompleted() {
Range<CopyEngineState> states{&bcsState, bcsState.isValid() ? 1u : 0u};
if (cmdQueue->isCompleted(getCompletionStamp(), states) || this->areTimestampsCompleted()) {
if (cmdQueue->isCompleted(getCompletionStamp(), states)) {
gpuStateWaited = true;
} else {
if (this->areTimestampsCompleted()) {
if (cmdQueue->getGpgpuCommandStreamReceiver().getDcFlushSupport()) {
// also flush L3 and wait for cmd queue when L3 flush required
auto waitStatus = cmdQueue->waitUntilComplete(taskCount.load(), states, flushStamp->peekStamp(), false, true, false);
if (waitStatus == WaitStatus::ready) {
this->gpuStateWaited = true;
}
} else {
gpuStateWaited = true;
}
}
}
return gpuStateWaited;