From f8d0e8c47c5be32b2e5e44e4449a337fcbc130fb Mon Sep 17 00:00:00 2001 From: Andrew Kwangwoong Park Date: Tue, 6 Aug 2024 02:52:42 +0900 Subject: [PATCH] Revert "[GPU] Avoid crop buffer fusing when dynamic shape and squeeze/unsqueeze reshape mode" (#25895) ### Details: - This revert https://github.com/openvinotoolkit/openvino/pull/25700 - As support for Crop->Reshape(Squeeze/Unsqueeze modes) buffer optimization was added by https://github.com/openvinotoolkit/openvino/pull/25836 ### Tickets: - 146626 --- .../src/graph/graph_optimizer/prepare_buffer_fusing.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_buffer_fusing.cpp b/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_buffer_fusing.cpp index e0fc57d05f06e6..b5502b8a365ba7 100644 --- a/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_buffer_fusing.cpp +++ b/src/plugins/intel_gpu/src/graph/graph_optimizer/prepare_buffer_fusing.cpp @@ -484,10 +484,10 @@ bool crop_in_place_optimization::match(const program_node& node, if (node.is_dynamic() && (user->is_type() || user->is_type())) return false; if (user->is_type()) { - auto& reshape_node = user->as(); - // runtime buffer fusing is only handled when there is only one reshape user and reshape mode is base - if (node.is_dynamic() && (node.get_users().size() != 1 || reshape_node.get_primitive()->mode != reshape::reshape_mode::base)) + // runtime buffer fusing is only handled when there is only one reshape user + if (node.is_dynamic() && node.get_users().size() != 1) return false; + auto& reshape_node = user->as(); if (can_reshape_be_optimized(reshape_node) && (!node.is_dynamic() || !reshape_node.is_runtime_propagatable_padding())) return false;