Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request improves constant folding for Reshape operations by materializing shape inputs as constants when the output shape is known from shape inference. It also adds support for INT32 dtype shape inputs, which are common in TFLite models.
Changes:
- Added INT32 fallback support in
get_shape_value()for shape inputs (common in TFLite models) - Implemented
_try_materialize_reshape_shape()to create constant shape inputs from inferred output shapes - Updated
reshape()function to leverage shape materialization for optimization
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2807 +/- ##
==========================================
+ Coverage 70.50% 70.61% +0.11%
==========================================
Files 228 230 +2
Lines 27114 27246 +132
Branches 2726 2746 +20
==========================================
+ Hits 19116 19240 +124
- Misses 7065 7066 +1
- Partials 933 940 +7 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
a67ab69 to
3c550df
Compare
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
xadupre
approved these changes
Feb 13, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.