Skip to content

Conversation

Yosshi999
Copy link
Contributor

Description

Early return causes wrong shape inference. When input has dynamic axes and Squeeze-11' axes is missing, output shape was always inferred as scalar. This will lead to validation error in downstream nodes.

Motivation and Context

Fix #6313

Signed-off-by: Yosshi999 <Yosshi999@users.noreply.github.com>
Signed-off-by: Yosshi999 <Yosshi999@users.noreply.github.com>
@Yosshi999 Yosshi999 requested review from a team as code owners August 22, 2024 17:33
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.23%. Comparing base (83194ed) to head (2d905f5).
Report is 465 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6314      +/-   ##
==========================================
+ Coverage   56.95%   57.23%   +0.27%     
==========================================
  Files         506      507       +1     
  Lines       30467    31404     +937     
  Branches     4592     4691      +99     
==========================================
+ Hits        17353    17974     +621     
- Misses      12285    12577     +292     
- Partials      829      853      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Yosshi999 <Yosshi999@users.noreply.github.com>
Copy link
Contributor

@gramalingam gramalingam left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@gramalingam gramalingam added this pull request to the merge queue Sep 3, 2024
Merged via the queue into onnx:main with commit 2e1c2e6 Sep 3, 2024
40 checks passed
linshokaku pushed a commit to linshokaku/onnx that referenced this pull request Oct 2, 2024
)

### Description
<!-- - Describe your changes. -->
Early return causes wrong shape inference. When input has dynamic axes
and Squeeze-11' axes is missing, output shape was always inferred as
scalar. This will lead to validation error in downstream nodes.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve? -->
<!-- - If it fixes an open issue, please link to the issue here. -->
Fix onnx#6313

---------

Signed-off-by: Yosshi999 <Yosshi999@users.noreply.github.com>
Signed-off-by: Linsho Kaku <linsho@preferred.jp>
sevenc-nanashi added a commit to sevenc-nanashi/onnxruntime-builder that referenced this pull request Dec 22, 2024
@ramkrishna2910 ramkrishna2910 added the module: shape inference Issues related to shape inference label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: shape inference Issues related to shape inference
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Squeeze-11's output shape is mistakenly inferred when input has dynamic axes and squeezing axes is not specified
3 participants