fix: request instruction cache invalidation on module destroy

Invalidation is requested on both linux and windows,
on Csr's that used Isa allocation.

Related-To: NEO-10045
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2024-01-24 15:42:31 +00:00
committed by Compute-Runtime-Automation
parent 64175d8bb6
commit c51b656d2c
12 changed files with 188 additions and 7 deletions

View File

@@ -304,6 +304,10 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushImmediateTask(
flushData.estimatedSize += MemorySynchronizationCommands<GfxFamily>::getSizeForFullCacheFlush();
}
if (requiresInstructionCacheFlush) {
flushData.estimatedSize += MemorySynchronizationCommands<GfxFamily>::getSizeForInstructionCacheFlush();
}
auto &csrCommandStream = getCS(flushData.estimatedSize);
flushData.csrStartOffset = csrCommandStream.getUsed();
@@ -312,6 +316,11 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushImmediateTask(
MemorySynchronizationCommands<GfxFamily>::addStateCacheFlush(csrCommandStream, device.getRootDeviceEnvironment());
}
if (requiresInstructionCacheFlush) {
MemorySynchronizationCommands<GfxFamily>::addInstructionCacheFlush(csrCommandStream);
requiresInstructionCacheFlush = false;
}
dispatchImmediateFlushPipelineSelectCommand(flushData, csrCommandStream);
dispatchImmediateFlushFrontEndCommand(flushData, device, csrCommandStream);
dispatchImmediateFlushStateComputeModeCommand(flushData, csrCommandStream);
@@ -540,9 +549,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
}
if (requiresInstructionCacheFlush) {
PipeControlArgs args;
args.instructionCacheInvalidateEnable = true;
MemorySynchronizationCommands<GfxFamily>::addSingleBarrier(commandStreamCSR, args);
MemorySynchronizationCommands<GfxFamily>::addInstructionCacheFlush(commandStreamCSR);
requiresInstructionCacheFlush = false;
}
@@ -942,7 +949,7 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
}
if (requiresInstructionCacheFlush) {
size += MemorySynchronizationCommands<GfxFamily>::getSizeForSingleBarrier(false);
size += MemorySynchronizationCommands<GfxFamily>::getSizeForInstructionCacheFlush();
}
if (debugManager.flags.ForcePipeControlPriorToWalker.get()) {