-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Fix stale bounds in SymbolicOptimizations by clearing SkipInvalidation before SimplifyShapeOfSubGraph #33288
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
base: master
Are you sure you want to change the base?
Conversation
| /// \brief Unconditionally unsets bound value descriptions, ignoring SkipInvalidation flag. | ||
| /// \note Use this method when graph structure changes (e.g., after replace_source_output) | ||
| /// to ensure bounds are properly recalculated even when SkipInvalidation is set. | ||
| void force_invalidate_values(); |
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.
The new public member should not be introduced.
It would be better to fix SkipInvalidation flag propagation , to remove it from nodes where bound has to be re-calculated
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.
I removed it
| // Since we modified the Concat inputs, bounds must be recalculated. | ||
| // Use force_invalidate_values() to ignore SkipInvalidation flag that may be set | ||
| // by SymbolicPropagation, ensuring bounds are properly recalculated. | ||
| concat->force_invalidate_values(); |
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.
As there function which can add this flag we can have dev API helper to remove it will also single line call.
Or maybe during propagation of this flag it should be not set here at all
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.
I removed it
Details:
This PR fixes an issue where VIT tests fail in optimum-intel due to stale bounds in Concat node after AbsSinking transformation.
Problem
When SymbolicOptimizations runs with full_run=true:
The root cause is that remove_skip_invalidation_rti() was called at the end of SymbolicOptimizations::run_on_model(), after SimplifyShapeOfSubGraph had already run with stale bounds.
Solution
Add ClearSkipInvalidation pass that calls remove_skip_invalidation_rti() before SimplifyShapeOfSubGraph. This removes SkipInvalidation flags and recalculates all bounds, ensuring that transformations like AbsSinking work with fresh data.
Changes
Tickets: