[GPU] Small fix for dynamic_shape_gather_opts pass (#21807) (#21882)

This commit is contained in:
Roman Lyamin 2023-12-28 14:48:38 +04:00 committed by GitHub
parent 7d948bf596
commit 112a16a056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -25,11 +25,11 @@ void dynamic_shape_gather_opts::run(program& p) {
continue;
auto idx_rank = impl_params->get_input_layout(1).get_partial_shape().size();
if (idx_rank > 1) {
if (idx_rank != 1) {
continue;
}
auto axis = impl_params->typed_desc<gather>()->axis;
if (impl_params->get_input_layout(0).get_partial_shape()[axis] == -1
if (impl_params->get_input_layout(0).get_partial_shape()[axis] == -1
|| impl_params->get_input_layout(1).get_partial_shape()[0] == -1
|| impl_params->get_input_layout(0).get_partial_shape()[axis] == impl_params->get_input_layout(1).get_partial_shape()[0]) {
// May be skipepd