Skip to content

Added cross-stream grouping to batches and nireqs in optimizer#779

Merged
pbartosik merged 4 commits intomainfrom
opti-batching
Apr 23, 2026
Merged

Added cross-stream grouping to batches and nireqs in optimizer#779
pbartosik merged 4 commits intomainfrom
opti-batching

Conversation

@pbartosik
Copy link
Copy Markdown
Contributor

Description

Please include a summary of the changes and the related issue. List any dependencies that are required for this change.

Fixes # (issue)

Any Newly Introduced Dependencies

Please describe any newly introduced 3rd party dependencies in this change. List their name, license information and how they are used in the project.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

  • I agree to use the MIT license for my code changes.
  • I have not introduced any 3rd party components incompatible with MIT.
  • I have not included any company confidential information, trade secret, password or security token.
  • I have performed a self-review of my code.

Copy link
Copy Markdown
Contributor

@oonyshch oonyshch left a comment

Choose a reason for hiding this comment

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

in the grouping logic for both BatchGenerator and NireqGenerator
the if instance_id: checks might fail for empty string values, causing elements with the same empty instance_id to be ungrouped when they should share the same batch/nireq group.

upd: @walidbarakat corrected me right
LGTM then :)

Comment thread scripts/optimizer/processors/inference.py
Comment thread scripts/optimizer/processors/inference.py
Copy link
Copy Markdown
Contributor

@walidbarakat walidbarakat left a comment

Choose a reason for hiding this comment

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

LGTM ...

@pbartosik a reminder please to spend few sentences to explain the decision and impact of change. that would save time and effort for reviewers

@oonyshch instance grouping happens only when user explicitly set model-instance-id to be the same value/id, otherwise - if model-instance-id is not set or set to null - OV will set automatically the instance id to be unique. in other words, each instance id is unique and each instance/stream is a group consists of one member .. unless the user specify otherwise.

@pbartosik pbartosik merged commit 08db1dd into main Apr 23, 2026
54 checks passed
@pbartosik pbartosik deleted the opti-batching branch April 23, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants