Skip to content

Conversation

@evkotov
Copy link
Contributor

@evkotov evkotov commented Dec 17, 2025

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:

  1. SymbolicPropagation sets SkipInvalidation flag on all output tensors
  2. SimplifyShapeOfSubGraph runs AbsSinking which replaces Concat inputs
  3. invalidate_values() is blocked by SkipInvalidation, so bounds remain stale
  4. Downstream nodes receive old bounds with invalid values

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

  • symbolic_optimizations.cpp: Add ClearSkipInvalidation pass, register it before SimplifyShapeOfSubGraph

Tickets:

  • 175062

@evkotov evkotov self-assigned this Dec 17, 2025
@evkotov evkotov requested review from a team as code owners December 17, 2025 15:51
@evkotov evkotov added the category: transformations OpenVINO Runtime library - Transformations label Dec 17, 2025
@github-actions github-actions bot added category: Core OpenVINO Core (aka ngraph) category: CPP API OpenVINO CPP API bindings labels Dec 17, 2025
/// \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();
Copy link
Contributor

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

Copy link
Contributor Author

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();
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed it

@github-actions github-actions bot removed category: Core OpenVINO Core (aka ngraph) category: CPP API OpenVINO CPP API bindings labels Dec 18, 2025
@evkotov evkotov changed the title Add force_invalidate_values() to bypass SkipInvalidation flag Fix stale bounds in SymbolicOptimizations by clearing SkipInvalidation before SimplifyShapeOfSubGraph Dec 18, 2025
@evkotov evkotov requested a review from praasz December 18, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: transformations OpenVINO Runtime library - Transformations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants