Skip to content

Add conditional bounds invalidation in replace_output()#33622

Merged
dorloff merged 5 commits intoopenvinotoolkit:masterfrom
evkotov:CVS-175062-force-invalidation
Jan 21, 2026
Merged

Add conditional bounds invalidation in replace_output()#33622
dorloff merged 5 commits intoopenvinotoolkit:masterfrom
evkotov:CVS-175062-force-invalidation

Conversation

@evkotov
Copy link
Copy Markdown
Contributor

@evkotov evkotov commented Jan 15, 2026

Details:

  • Add ForceInvalidation dev API attribute to bypass SkipInvalidation when input source changes
  • Add have_same_bounds() and set_force_invalidation() helper functions to dev API
  • Modify replace_output() to conditionally invalidate bounds only when they differ

Summary

When a node's input is replaced, bounds should be invalidated only if the new source has different bounds. This fixes stale bounds after AbsSinking transformation while preserving OptimizeSymbolsUsedAsValues optimization.

The fix uses ForceInvalidation runtime attribute that:

  1. Is set on tensor when bounds differ between old and new source
  2. Overrides SkipInvalidation in invalidate_values()
  3. Is automatically removed after invalidation via extract()

Tickets:

@evkotov evkotov self-assigned this Jan 15, 2026
@evkotov evkotov added the category: transformations OpenVINO Runtime library - Transformations label Jan 15, 2026
@evkotov evkotov requested a review from a team as a code owner January 15, 2026 15:05
@github-actions github-actions bot added category: Core OpenVINO Core (aka ngraph) category: CPP API OpenVINO CPP API bindings and removed category: transformations OpenVINO Runtime library - Transformations labels Jan 15, 2026
@evkotov evkotov requested a review from mmikolajcz January 15, 2026 15:18
@praasz praasz self-assigned this Jan 16, 2026
@praasz praasz added this to the 2026.0 milestone Jan 16, 2026
@evkotov evkotov requested a review from a team as a code owner January 16, 2026 13:31
@evkotov evkotov requested a review from praasz January 16, 2026 13:31
@github-actions github-actions bot added category: transformations OpenVINO Runtime library - Transformations and removed category: CPP API OpenVINO CPP API bindings labels Jan 16, 2026
@evkotov evkotov force-pushed the CVS-175062-force-invalidation branch from 0fcb009 to 0a2dfdc Compare January 20, 2026 11:14
@dorloff dorloff added this pull request to the merge queue Jan 21, 2026
Merged via the queue into openvinotoolkit:master with commit 5cdcb93 Jan 21, 2026
209 checks passed
@evkotov evkotov deleted the CVS-175062-force-invalidation branch January 21, 2026 10:46
Naseer-010 pushed a commit to Naseer-010/openvino that referenced this pull request Feb 18, 2026
…kit#33622)

### Details:
- Add ForceInvalidation dev API attribute to bypass SkipInvalidation
when input source changes
- Add `have_same_bounds()` and `set_force_invalidation()` helper
functions to dev API
- Modify `replace_output()` to conditionally invalidate bounds only when
they differ

## Summary
When a node's input is replaced, bounds should be invalidated only if
the new source has different bounds. This fixes stale bounds after
AbsSinking transformation while preserving OptimizeSymbolsUsedAsValues
optimization.

The fix uses ForceInvalidation runtime attribute that:
1. Is set on tensor when bounds differ between old and new source
2. Overrides SkipInvalidation in `invalidate_values()`
3. Is automatically removed after invalidation via `extract()`

### Tickets:
 - CVS-175062
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: Core OpenVINO Core (aka ngraph) category: transformations OpenVINO Runtime library - Transformations Code Freeze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants