Files
compute-runtime/opencl/source/command_queue/gpgpu_walker_xe3p_and_later.inl
Mateusz Jablonski 814afc90fe feature: Add initial support for CRI
Related-To: NEO-16649

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2025-12-15 12:12:42 +01:00

42 lines
1.4 KiB
C++

/*
* Copyright (C) 2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
template <>
template <typename WalkerType>
void NEO::GpgpuWalkerHelper<NEO::Family>::setupTimestampPacketFlushL3(WalkerType &walkerCmd, NEO::CommandQueue &commandQueue, const FlushL3Args &args) {
if constexpr (std::is_same_v<WalkerType, typename NEO::Family::COMPUTE_WALKER_2>) {
bool l2Flush = args.usingSharedObjects;
bool l2TransientFlush = args.usingSystemAllocation || args.containsPrintBuffer;
bool pendingL2Flush = l2Flush || l2TransientFlush;
bool flushInPostSync = args.signalEvent || args.blocking || args.containsPrintBuffer;
if (debugManager.flags.RedirectFlushL3HostUsmToExternal.get()) {
l2Flush = l2TransientFlush;
l2TransientFlush = false;
}
if (debugManager.flags.ForceFlushL3AfterPostSyncForExternalAllocation.get()) {
flushInPostSync = true;
l2Flush = true;
}
if (debugManager.flags.ForceFlushL3AfterPostSyncForHostUsm.get()) {
flushInPostSync = true;
l2TransientFlush = true;
}
if (flushInPostSync) {
auto &postSyncData = walkerCmd.getPostSync();
postSyncData.setL2Flush(l2Flush);
postSyncData.setL2TransientFlush(l2TransientFlush);
} else if (pendingL2Flush) {
commandQueue.setPendingL3FlushForHostVisibleResources(true);
}
}
}