From 7c97bc4b73723350702f4aa6912f4ffb48e17bcb Mon Sep 17 00:00:00 2001 From: Dmitry Matveev Date: Thu, 31 Oct 2024 01:33:07 +0000 Subject: [PATCH] NPUW: Eliminate unnecessary kvcache tensors copy --- .../intel_npu/src/plugin/npuw/just_sync_infer_request.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/intel_npu/src/plugin/npuw/just_sync_infer_request.cpp b/src/plugins/intel_npu/src/plugin/npuw/just_sync_infer_request.cpp index 26363e66e55d2a..0e0b96582a663c 100644 --- a/src/plugins/intel_npu/src/plugin/npuw/just_sync_infer_request.cpp +++ b/src/plugins/intel_npu/src/plugin/npuw/just_sync_infer_request.cpp @@ -597,7 +597,7 @@ void ov::npuw::JustInferRequest::bind_global_parameters(std::size_t idx) { LOG_BLOCK(); if (!is_spatial_param(sub_in_idx)) { // Input parameter is non-spatial, do normal handling - if (do_copy || m_input_allocated.count(g_tnsr->data()) == 0) { + if (m_input_allocated.count(g_tnsr->data()) == 0 && do_copy) { LOG_DEBUG("Will be copied"); copy_list.emplace_back(g_tnsr, s_port); } else {