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

Output shape verification for reduce ops #2374

Merged
merged 5 commits into from
Mar 6, 2025

Conversation

azecevicTT
Copy link
Contributor

Ticket

Closes #2369

Problem description

Some erroneous shapes would pass verification and only fail in the runtime due to wrong interpretation of dim_arg when its value is nullopt. There is an example in the linked issue.

What's changed

  • Added verification when dim_arg is nullopt in TTNN
  • Added a shape verification in TTIR
  • Added negative tests

Checklist

  • New/Existing tests provide coverage for changes

Copy link
Contributor

@sdjordjevicTT sdjordjevicTT left a comment

Choose a reason for hiding this comment

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

Great catch! Thanks for fixing this!

Copy link
Contributor

@svuckovicTT svuckovicTT left a comment

Choose a reason for hiding this comment

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

Nice catch!

@azecevicTT azecevicTT force-pushed the azecevic/reduction-verifier branch from 09c6aba to f118a37 Compare March 6, 2025 16:47
Copy link
Contributor

@vroubtsovTT vroubtsovTT left a comment

Choose a reason for hiding this comment

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

looks good, would be great to make some of the error message strings contain the offending inputs as commented

@azecevicTT azecevicTT merged commit a255eee into main Mar 6, 2025
33 checks passed
@azecevicTT azecevicTT deleted the azecevic/reduction-verifier branch March 6, 2025 19:41
odjuricicTT pushed a commit that referenced this pull request Mar 8, 2025
### Ticket
Closes #2369

### Problem description
Some erroneous shapes would pass verification and only fail in the
runtime due to wrong interpretation of `dim_arg` when its value is
`nullopt`. There is an example in the linked issue.

### What's changed
- Added verification when `dim_arg` is nullopt in TTNN
- Added a shape verification in TTIR
- Added negative tests

### Checklist
- [x] New/Existing tests provide coverage for changes
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.

Reduction op fails to catch wrong output shape
4 participants