From 09f1f9119989a37b243de99a163588ccbcf1569b Mon Sep 17 00:00:00 2001 From: Roman Lyamin Date: Fri, 16 Aug 2024 08:59:03 +0400 Subject: [PATCH] [GPU] Fixed axes normalization for squeeze (#26082) ### Tickets: - *[149721](https://jira.devtools.intel.com/browse/CVS-149721)* --- src/plugins/intel_gpu/src/plugin/ops/reshape.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/intel_gpu/src/plugin/ops/reshape.cpp b/src/plugins/intel_gpu/src/plugin/ops/reshape.cpp index a95e00725736e6..7e98d79583cc07 100644 --- a/src/plugins/intel_gpu/src/plugin/ops/reshape.cpp +++ b/src/plugins/intel_gpu/src/plugin/ops/reshape.cpp @@ -31,8 +31,10 @@ static void CreateCommonReshapeOp(ProgramBuilder& p, const std::shared_ptr output_pattern = {}; if (second_const_input != nullptr) { output_pattern = second_const_input->cast_vector(); - if (mode == cldnn::reshape::reshape_mode::unsqueeze || mode == cldnn::reshape::reshape_mode::squeeze) { + if (mode == cldnn::reshape::reshape_mode::unsqueeze) { ov::util::try_normalize_axes(output_pattern, op->get_output_partial_shape(0).rank(), *op); + } else if (mode == cldnn::reshape::reshape_mode::squeeze) { + ov::util::try_normalize_axes(output_pattern, op->get_input_partial_shape(0).rank(), *op); } }