feature: debug flag to flush tlb before copy

Related-To: HSD-18036669673

Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2024-02-14 17:15:49 +00:00
committed by Compute-Runtime-Automation
parent 8e0b23db84
commit 88c5872682
4 changed files with 27 additions and 1 deletions

View File

@@ -188,10 +188,11 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushBcsTask(LinearStream &c
uint64_t taskStartAddress = commandStreamTask.getGpuBase() + commandStreamTaskStart;
NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&(this->peekRootDeviceEnvironment()))};
if (dispatchBcsFlags.flushTaskCount) {
uint64_t postSyncAddress = getTagAllocation()->getGpuAddress();
TaskCountType postSyncData = peekTaskCount() + 1;
NEO::EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&(this->peekRootDeviceEnvironment()))};
NEO::MiFlushArgs args{waArgs};
args.commandWithPostSync = true;
args.notifyEnable = isUsedNotifyEnableForPostSync();
@@ -204,6 +205,14 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushBcsTask(LinearStream &c
programHardwareContext(commandStreamCSR);
if (debugManager.flags.FlushTlbBeforeCopy.get() == 1) {
MiFlushArgs tlbFlushArgs{waArgs};
tlbFlushArgs.commandWithPostSync = true;
tlbFlushArgs.tlbFlush = true;
EncodeMiFlushDW<GfxFamily>::programWithWa(commandStream, this->globalFenceAllocation->getGpuAddress(), 0, tlbFlushArgs);
}
if (globalFenceAllocation) {
makeResident(*globalFenceAllocation);
}
@@ -1192,6 +1201,14 @@ TaskCountType CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropert
BlitCommandsHelper<GfxFamily>::encodeProfilingStartMmios(commandStream, *blitProperties.outputTimestampPacket);
}
if (debugManager.flags.FlushTlbBeforeCopy.get() == 1) {
MiFlushArgs tlbFlushArgs{waArgs};
tlbFlushArgs.commandWithPostSync = true;
tlbFlushArgs.tlbFlush = true;
EncodeMiFlushDW<GfxFamily>::programWithWa(commandStream, this->globalFenceAllocation->getGpuAddress(), 0, tlbFlushArgs);
}
BlitCommandsHelper<GfxFamily>::dispatchBlitCommands(blitProperties, commandStream, waArgs);
auto dummyAllocation = rootDeviceEnvironment->getDummyAllocation();
if (dummyAllocation) {