diff --git a/src/plugins/intel_gpu/src/graph/gemm.cpp b/src/plugins/intel_gpu/src/graph/gemm.cpp index dd311148a89696..8bd31ba282db22 100644 --- a/src/plugins/intel_gpu/src/graph/gemm.cpp +++ b/src/plugins/intel_gpu/src/graph/gemm.cpp @@ -178,17 +178,23 @@ std::vector gemm_inst::transform_input_layouts(const std::shared_ptr pad_lower, pad_upper; + std::vector pad_lower, pad_upper, pad_mask; for (size_t i = 0; i < input_rank; i++) { pad_lower.push_back(pad._lower_size[i]); pad_upper.push_back(pad._upper_size[i]); + pad_mask.push_back(pad._dynamic_dims_mask[i]); } size_t ones_to_add = std::max(output_rank, static_cast(4)) - input_rank; pad_lower.insert(pad_lower.begin(), ones_to_add, 0); pad_upper.insert(pad_upper.begin(), ones_to_add, 0); + pad_mask.insert(pad_mask.begin(), ones_to_add, 0); - return padding(pad_lower, pad_upper); + padding::DynamicDimsMask updated_pad_mask; + for (size_t i = 0; i < pad_mask.size(); i++) { + updated_pad_mask[i] = pad_mask[i]; + } + return padding(pad_lower, pad_upper, updated_pad_mask); }; auto input0_pshape = input_layouts[0].get_partial_shape();