From e8be74d86d6d859d67eb777838d9e3bc8e0c53bf Mon Sep 17 00:00:00 2001 From: Jade-Cho Date: Wed, 4 Dec 2024 17:22:35 +0900 Subject: [PATCH] [GPU] Fix perf regression due to PR #27573 + Remove unecessary memory copy. --- .../intel_gpu/src/plugin/sync_infer_request.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/plugins/intel_gpu/src/plugin/sync_infer_request.cpp b/src/plugins/intel_gpu/src/plugin/sync_infer_request.cpp index ae12ed087bc02d..f87f9af5275722 100644 --- a/src/plugins/intel_gpu/src/plugin/sync_infer_request.cpp +++ b/src/plugins/intel_gpu/src/plugin/sync_infer_request.cpp @@ -465,21 +465,6 @@ void SyncInferRequest::wait() { iremote_tensor_ptr->copy_from(plugin_tensor.ptr); } } - } else if (!is_dynamic && is_remote_tensor_impl && output_memory) { - auto& stream = m_graph->get_network()->get_stream(); - auto user_mem = remote_tensor_impl_ptr->get_original_memory(); - if (user_mem->get_allocation_type() == cldnn::allocation_type::cl_mem - && output_memory->get_allocation_type() != cldnn::allocation_type::cl_mem) { - auto plugin_tensor = m_plugin_outputs.at(port_idx); - if (is_convert_required(plugin_tensor.ptr->get_element_type(), iremote_tensor_ptr->get_element_type())) { - auto& stream = m_graph->get_network()->get_stream(); - convert_and_copy(plugin_tensor.ptr.get(), iremote_tensor_ptr.get(), stream); - } else { - iremote_tensor_ptr->copy_from(plugin_tensor.ptr); - } - } else { - copy_events.push_back(output_memory->copy_to(stream, *user_mem, false)); - } } else if (is_remote_tensor_impl && is_dynamic) { auto& stream = m_graph->get_network()->get_stream(); auto user_mem = remote_tensor_impl_ptr->get_original_memory();