fix: program partition offset for secondary csr

Related-To: HSD-18039998563

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-09-18 16:22:31 +00:00
committed by Compute-Runtime-Automation
parent 08cc1a6286
commit 7a56424c2c

View File

@@ -116,7 +116,6 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
if (this->isCopyOnlyCommandQueue) {
ret = this->executeCommandListsCopyOnly(ctx, numCommandLists, phCommandLists, hFence, parentImmediateCommandlistLinearStream);
} else if (this->heaplessStateInitEnabled) {
ctx.globalInit = false;
ret = this->executeCommandListsRegularHeapless(ctx, numCommandLists, phCommandLists, hFence, parentImmediateCommandlistLinearStream);
} else {
ret = this->executeCommandListsRegular(ctx, numCommandLists, phCommandLists, hFence, parentImmediateCommandlistLinearStream);
@@ -176,6 +175,8 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandListsRegularHeapless(
this->makeCsrTagAllocationResident();
this->programActivePartitionConfig(ctx.isProgramActivePartitionConfigRequired, *streamForDispatch);
if (instructionCacheFlushRequired) {
NEO::MemorySynchronizationCommands<GfxFamily>::addInstructionCacheFlush(*streamForDispatch);
this->csr->setInstructionCacheFlushed();
@@ -253,6 +254,7 @@ size_t CommandQueueHw<gfxCoreFamily>::estimateStreamSizeForExecuteCommandListsRe
for (uint32_t i = 0; i < numCommandLists; i++) {
auto cmdList = CommandList::fromHandle(commandListHandles[i]);
linearStreamSizeEstimate += estimateCommandListSecondaryStart(cmdList);
linearStreamSizeEstimate += this->estimateCommandListPrimaryStart(ctx.globalInit);
ctx.spaceForResidency += estimateCommandListResidencySize(cmdList);
}
@@ -268,6 +270,11 @@ size_t CommandQueueHw<gfxCoreFamily>::estimateStreamSizeForExecuteCommandListsRe
linearStreamSizeEstimate += NEO::MemorySynchronizationCommands<GfxFamily>::getSizeForFullCacheFlush();
}
auto csrHw = reinterpret_cast<NEO::CommandStreamReceiverHw<GfxFamily> *>(this->csr);
if (ctx.isProgramActivePartitionConfigRequired) {
linearStreamSizeEstimate += csrHw->getCmdSizeForActivePartitionConfig();
}
return linearStreamSizeEstimate;
}