From 453d01efb29215182c6ea5bafcde868bba065d90 Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Tue, 19 Sep 2023 16:32:54 +0000 Subject: [PATCH] performance: remove extra loop processing command lists in execute call Related-To: NEO-7828 Signed-off-by: Zbigniew Zdanowicz --- level_zero/core/source/cmdqueue/cmdqueue_hw.inl | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl index f60fa6aee2..daf7f66aec 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.inl +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.inl @@ -220,11 +220,6 @@ ze_result_t CommandQueueHw::executeCommandListsRegular( this->assignCsrTaskCountToFenceIfAvailable(hFence); this->dispatchTaskCountPostSyncRegular(ctx.isDispatchTaskCountPostSyncRequired, child); - for (auto i = 0u; i < numCommandLists; ++i) { - auto commandList = static_cast(CommandList::fromHandle(commandListHandles[i])); - commandList->storeReferenceTsToMappedEvents(false); - } - auto submitResult = this->prepareAndSubmitBatchBuffer(ctx, child); this->csr->setPreemptionMode(ctx.statePreemption); @@ -287,10 +282,6 @@ ze_result_t CommandQueueHw::executeCommandListsCopyOnly( this->programLastCommandListReturnBbStart(child, ctx); - for (auto i = 0u; i < numCommandLists; ++i) { - auto commandList = static_cast(CommandList::fromHandle(phCommandLists[i])); - commandList->storeReferenceTsToMappedEvents(false); - } this->dispatchTaskCountPostSyncByMiFlushDw(ctx.isDispatchTaskCountPostSyncRequired, child); this->makeCsrTagAllocationResident(); @@ -575,6 +566,7 @@ void CommandQueueHw::setupCmdListsAndContextParams( for (auto i = 0u; i < numCommandLists; i++) { auto commandList = static_cast(CommandList::fromHandle(phCommandLists[i])); commandList->setCsr(this->csr); + commandList->storeReferenceTsToMappedEvents(false); commandList->incRegularCmdListSubmissionCounter(); auto &commandContainer = commandList->getCmdContainer();