Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[luci] Handle dynamic dimensions in Squeeze shape inference #14857

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbencer
Copy link
Contributor

@mbencer mbencer commented Mar 19, 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

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>
@seanshpark
Copy link
Contributor

Plz follow #14844 (comment) for this too

@mbencer
Copy link
Contributor Author

mbencer commented Mar 20, 2025

Plz follow #14844 (comment) for this too

I'm trying with TF recipe like:

operand {
  name: "ifm"
  type: FLOAT32
  shape { dim: 3 dim: 4 dim: 5 dim: 1}
  shape_signature { dim: 3 dim: 4 dim: 5 dim: -1 }
}
operand {
  name: "ofm"
  type: FLOAT32
  shape { dim: 3 dim: 4 dim: 5 }
}
operation {
  type: "Squeeze"
  squeeze_options { squeeze_dim: 3 }
  input: "ifm"
  output: "ofm"
}
input: "ifm"
output: "ofm"

But it fails on asserts in luci-interpreter Squeeze kernel because of dynamic dimension in input shape. It looks like only shape_signature is propagated there.

@seanshpark
Copy link
Contributor

I'm trying with TF recipe like:

this is tflite recipe, not TF

... on asserts in luci-interpreter Squeeze kernel ...

you may have to fix luci-interpreter too, as I know you are to support dynamic shapes.

Copy link
Contributor

@jinevening jinevening left a comment

Choose a reason for hiding this comment

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

Code itself looks good to me.

@mbencer
Copy link
Contributor Author

mbencer commented Mar 21, 2025

@seanshpark

this is tflite recipe, not TF

Right ;)

you may have to fix luci-interpreter too, as I know you are to support dynamic shapes.

I see but it looks like a bigger task. In the current state I'm specializing dynamic shape model to the static version via circle-resizer but still probably will be needed in the future. I'll think about it ;)

In the current moment I'm proposing introduce the Squeeze test based on tflite recipe in steps (the order is important):
#14864
#14865
#14866

But this PR should be merged at first.

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.

3 participants