From 1d45562fe3aa12f59d72a37249b6bdfe5af6c052 Mon Sep 17 00:00:00 2001 From: Kamil Kopryk Date: Wed, 6 Aug 2025 12:40:53 +0000 Subject: [PATCH] fix: flush l3 if print buffer is present Related-To: NEO-13163 Signed-off-by: Kamil Kopryk --- .../command_queue/hardware_interface_xehp_and_later.inl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opencl/source/command_queue/hardware_interface_xehp_and_later.inl b/opencl/source/command_queue/hardware_interface_xehp_and_later.inl index ef06b2044c..60b24285e0 100644 --- a/opencl/source/command_queue/hardware_interface_xehp_and_later.inl +++ b/opencl/source/command_queue/hardware_interface_xehp_and_later.inl @@ -106,7 +106,8 @@ inline void HardwareInterface::programWalker( if constexpr (heaplessModeEnabled) { auto &productHelper = rootDeviceEnvironment.getHelper(); - bool flushL3AfterPostSyncForHostUsm = kernelSystemAllocation || kernel.hasPrintfOutput(); + auto containsPrintBuffer = kernel.hasPrintfOutput(); + bool flushL3AfterPostSyncForHostUsm = kernelSystemAllocation || containsPrintBuffer; bool flushL3AfterPostSyncForExternalAllocation = kernel.isUsingSharedObjArgs(); if (debugManager.flags.RedirectFlushL3HostUsmToExternal.get() && flushL3AfterPostSyncForHostUsm) { @@ -114,7 +115,7 @@ inline void HardwareInterface::programWalker( flushL3AfterPostSyncForExternalAllocation = true; } - if (walkerArgs.event != nullptr || walkerArgs.blocking) { + if (walkerArgs.event != nullptr || walkerArgs.blocking || containsPrintBuffer) { GpgpuWalkerHelper::template setupTimestampPacketFlushL3(&walkerCmd, productHelper, flushL3AfterPostSyncForHostUsm, flushL3AfterPostSyncForExternalAllocation); } }