Skip to content

[draft] Handle dynamic dimensions in Squeeze shape inference#14882

Closed
mbencer wants to merge 5 commits intoSamsung:masterfrom
mbencer:mbencer/SqueezeDynDim
Closed

[draft] Handle dynamic dimensions in Squeeze shape inference#14882
mbencer wants to merge 5 commits intoSamsung:masterfrom
mbencer:mbencer/SqueezeDynDim

Conversation

@mbencer
Copy link
Contributor

@mbencer mbencer commented Mar 24, 2025

This commit skip verification of squeezed dimension if such dimension is dynamic.

ONE-DCO-1.0-Signed-off-by: Mateusz Bencer m.bencer@partner.samsung.com

Issue: #14791

mbencer added 4 commits March 24, 2025 08:34
This commit skip verification of squeezed dimension if such dimension is dynamic.

ONE-DCO-1.0-Signed-off-by: Mateusz Bencer <m.bencer@partner.samsung.com>
This commit excludes Squeeze_dynamic_000 because TestDataGenerator does not support unknown dimensions.

ONE-DCO-1.0-Signed-off-by: Mateusz Bencer <m.bencer@partner.samsung.com>
This commit adds TFLiteRecipe for dynamic shape Squeeze.

ONE-DCO-1.0-Signed-off-by: Mateusz Bencer <m.bencer@partner.samsung.com>
This commit adds Squeeze_dynamic_000 to circle2circle-dredd-recipe-test.

ONE-DCO-1.0-Signed-off-by: Mateusz Bencer <m.bencer@partner.samsung.com>
Add(Inf_Pad_000 PASS)
Add(Inf_StridedSlice_000 PASS)
Add(Inf_StridedSlice_001 PASS)
Add(Squeeze_dynamic_000 PASS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1/ plz follow naming convention
2/ add test.rule like others

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q) what do you want to test with this model?

Copy link
Contributor Author

@mbencer mbencer Mar 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1/ plz follow naming convention

done

2/ add test.rule like others

done

Q) what do you want to test with this model?

I want to test scenario (only shape inference) when squeezed dimension is unknown

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanshpark If you find a moment please take a look ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes in this PR looks OK. plz update related PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The related PRs are already updated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The related PRs are already updated

plz double check

ASSERT_EQ(1, shape.dim(2).value());
}

TEST(ShapeRuleTest, neg_squeeze_incorrect_dim)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TEST(ShapeRuleTest, neg_squeeze_incorrect_dim)
TEST(ShapeRuleTest, neg_squeeze_incorrect_dim_NEG)

@mbencer mbencer requested a review from seanshpark March 24, 2025 08:42
@mbencer mbencer force-pushed the mbencer/SqueezeDynDim branch from 0c3012d to 460b621 Compare March 27, 2025 08:58
@mbencer
Copy link
Contributor Author

mbencer commented Mar 31, 2025

All PRs were merged

@mbencer mbencer closed this Mar 31, 2025
@mbencer mbencer deleted the mbencer/SqueezeDynDim branch May 2, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants