fix: add deferred l3 flush tag in kernels

Related-To: NEO-13163
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2025-08-21 16:16:19 +00:00
committed by Compute-Runtime-Automation
parent 6e875f18ab
commit 2a3bd7cd03
10 changed files with 256 additions and 4 deletions

View File

@@ -107,9 +107,13 @@ inline void HardwareInterface<GfxFamily>::programWalker(
if constexpr (heaplessModeEnabled) {
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
auto containsPrintBuffer = kernel.hasPrintfOutput();
bool l3FlushDeferredIfNeeded = false;
bool flushL3AfterPostSyncForHostUsm = kernelSystemAllocation || containsPrintBuffer;
bool flushL3AfterPostSyncForExternalAllocation = kernel.isUsingSharedObjArgs();
l3FlushDeferredIfNeeded = flushL3AfterPostSyncForHostUsm || flushL3AfterPostSyncForExternalAllocation;
if (debugManager.flags.RedirectFlushL3HostUsmToExternal.get() && flushL3AfterPostSyncForHostUsm) {
flushL3AfterPostSyncForHostUsm = false;
flushL3AfterPostSyncForExternalAllocation = true;
@@ -127,6 +131,11 @@ inline void HardwareInterface<GfxFamily>::programWalker(
if (walkerArgs.event != nullptr || walkerArgs.blocking || containsPrintBuffer || forceFlushL3) {
GpgpuWalkerHelper<GfxFamily>::template setupTimestampPacketFlushL3<WalkerType>(&walkerCmd, productHelper, flushL3AfterPostSyncForHostUsm, flushL3AfterPostSyncForExternalAllocation);
l3FlushDeferredIfNeeded = false;
}
if (l3FlushDeferredIfNeeded) {
commandQueue.setL3FlushDeferredIfNeeded(true);
}
}
}