Skip to content

Conversation

@nikita-savelyevv
Copy link
Collaborator

@nikita-savelyevv nikita-savelyevv commented Jul 10, 2025

Changes

  • Replaced boolean enable_flexible_group_size with a group_size_fallback_mode enum. Possible values are NONE, IGNORE, ADJUST. Meaning:
    • ERROR: raise exception if can't divide by group size.
    • IGNORE: node with invalid group size won't be compressed at all.
    • ADJUST: the same as with enable_flexible_group_size=True on develop, i.e. compute new group size if possible, otherwise compress to backup precision.
  • Renamed min_flexible_group_size to min_adjusted_group_size.

Set group_size_fallback_mode to IGNORE by default.

Users are informed the following way depending on the selected fallback mode:

  • ERROR: exception is raised with a suggestion to set group_size_fallback_mode to IGNORE or ADJUST.
  • IGNORE: a info message is logged that some nodes will be ignored.
  • ADJUST: an info message is logged that some nodes will have an adjusted group size value / compressed to backup mode.

Reason for changes

UX improvement: now the default behavior won't result in an exception.

Related tickets

167337

Tests

Adopted the tests introduced in #3556.

@nikita-savelyevv nikita-savelyevv changed the title Introduce GroupSizeFallbackMode instead of enable_flexible_group_size [WC] GroupSizeFallbackMode instead of enable_flexible_group_size Jul 10, 2025
@github-actions github-actions bot added the API Public API-impacting changes label Jul 10, 2025
@nikita-savelyevv nikita-savelyevv marked this pull request as ready for review July 10, 2025 14:35
@nikita-savelyevv nikita-savelyevv requested a review from a team as a code owner July 10, 2025 14:35
@nikita-savelyevv
Copy link
Collaborator Author

Need some time to clarify the IGNORE case

@nikita-savelyevv nikita-savelyevv marked this pull request as draft July 11, 2025 10:11
@nikita-savelyevv nikita-savelyevv force-pushed the ns/flexible-group-size-pt2 branch from e82a7e5 to dbe0a76 Compare July 12, 2025 09:38
@nikita-savelyevv nikita-savelyevv marked this pull request as ready for review July 12, 2025 09:40
@nikita-savelyevv
Copy link
Collaborator Author

Need some time to clarify the IGNORE case

Done

Copy link

@alexsu52 alexsu52 left a comment

Choose a reason for hiding this comment

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

LGTM

@alexsu52 alexsu52 merged commit de884e0 into openvinotoolkit:develop Jul 15, 2025
20 checks passed
alexsu52 pushed a commit that referenced this pull request Jul 16, 2025
### Changes

Follow up to #3583. Decided to tweak a log message a little bit.
nikita-savelyevv pushed a commit to AlexanderDokuchaev/nncf that referenced this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Public API-impacting changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants