-
Couldn't load subscription status.
- Fork 87
Fix collapse slices rewrite rules to handle unknown dims #2583
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
Conversation
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes collapse slices rewrite rules to properly handle unknown dimensions by updating the onnx-ir dependency from 0.1.9 to 0.1.10. The fix addresses issue #2577 where the slice optimization logic incorrectly processed tensors with unknown dimension sizes.
- Updates onnx-ir dependency to version 0.1.10 to access new functionality
- Adds unknown dimension check in slice shape comparison logic
- Ensures slice optimization is only applied when tensor dimensions are known
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Updates onnx_ir dependency minimum version to 0.1.10 |
| noxfile.py | Updates ONNX_IR constant to match new version requirement |
| onnxscript/rewriter/rules/common/_collapse_slices.py | Adds unknown dimension safety check in _same_shape function |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2583 +/- ##
=======================================
Coverage 70.07% 70.07%
=======================================
Files 223 223
Lines 26266 26268 +2
Branches 2602 2603 +1
=======================================
+ Hits 18405 18407 +2
Misses 6950 6950
Partials 911 911 ☔ View full report in Codecov by Sentry. |
c5f6df6 to
62de1f0
Compare
Fixes #2577