From aa8ab38156fc21dab8e0016e918a2c14e75df005 Mon Sep 17 00:00:00 2001 From: Michal Mrozek Date: Mon, 21 Jul 2025 10:36:21 +0000 Subject: [PATCH] performance: remove redundant vector Related-To: NEO-15498 Signed-off-by: Michal Mrozek --- level_zero/api/core/ze_mutable_cmdlist_api_entrypoints.h | 7 +------ .../core/source/mutable_cmdlist/mutable_cmdlist_imp.cpp | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/level_zero/api/core/ze_mutable_cmdlist_api_entrypoints.h b/level_zero/api/core/ze_mutable_cmdlist_api_entrypoints.h index ee5282d4a4..a84954ea04 100644 --- a/level_zero/api/core/ze_mutable_cmdlist_api_entrypoints.h +++ b/level_zero/api/core/ze_mutable_cmdlist_api_entrypoints.h @@ -68,12 +68,7 @@ ze_result_t ZE_APICALL zeCommandListUpdateMutableCommandKernelsExp( uint64_t *pCommandId, ze_kernel_handle_t *phKernels) { hCommandList = toInternalType(hCommandList); - hCommandList = toInternalType(hCommandList); - std::vector translatedKernels{}; - for (auto i = 0u; i < numKernels; i++) { - translatedKernels.push_back(toInternalType(phKernels[i])); - } - return L0::MCL::MutableCommandList::fromHandle(hCommandList)->updateMutableCommandKernelsExp(numKernels, pCommandId, translatedKernels.data()); + return L0::MCL::MutableCommandList::fromHandle(hCommandList)->updateMutableCommandKernelsExp(numKernels, pCommandId, phKernels); } } // namespace L0 diff --git a/level_zero/core/source/mutable_cmdlist/mutable_cmdlist_imp.cpp b/level_zero/core/source/mutable_cmdlist/mutable_cmdlist_imp.cpp index 98be446019..7286a0f33a 100644 --- a/level_zero/core/source/mutable_cmdlist/mutable_cmdlist_imp.cpp +++ b/level_zero/core/source/mutable_cmdlist/mutable_cmdlist_imp.cpp @@ -613,7 +613,7 @@ ze_result_t MutableCommandListImp::updateMutableCommandKernelsExp(uint32_t numKe PRINT_DEBUG_STRING(NEO::debugManager.flags.PrintMclData.get(), stderr, "MCL updateMutableCommandKernelsExp cmdlist: %p numKernels: %u\n", this, numKernels); for (uint32_t id = 0; id < numKernels; id++) { auto commandId = pCommandId[id]; - auto kernelHandle = phKernels[id]; + auto kernelHandle = toInternalType(phKernels[id]); auto kernel = Kernel::fromHandle(kernelHandle); AppendMutation &selectedAppend = this->mutations[(commandId - 1)]; if (!kernelInstructionMutationEnabled(selectedAppend.mutationFlags)) {