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();