[Misc] Move GPUModelRunner.prepare_kernel_block_sizes to utils#35400
Merged
DarkLight1337 merged 2 commits intovllm-project:mainfrom Feb 27, 2026
Merged
[Misc] Move GPUModelRunner.prepare_kernel_block_sizes to utils#35400DarkLight1337 merged 2 commits intovllm-project:mainfrom
GPUModelRunner.prepare_kernel_block_sizes to utils#35400DarkLight1337 merged 2 commits intovllm-project:mainfrom
Conversation
Collaborator
Author
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the prepare_kernel_block_sizes and select_common_block_size methods from GPUModelRunner into the vllm.v1.worker.utils module. This is a good change that improves code organization by centralizing utility functions that do not depend on the runner's state. The implementation correctly moves the logic and updates the call sites and tests accordingly. The changes are clean and I don't see any issues.
Collaborator
Author
|
@DarkLight1337 not sure if i'll be able to get a clean run given the state of CI |
MatthewBonanni
approved these changes
Feb 26, 2026
Collaborator
MatthewBonanni
left a comment
There was a problem hiding this comment.
Seems reasonable to me, thanks for doing this!
antonovsergey93
pushed a commit
to antonovsergey93/vllm
that referenced
this pull request
Feb 27, 2026
…m-project#35400) Signed-off-by: NickLucche <nlucches@redhat.com>
Copilot AI
pushed a commit
to machov/vllm
that referenced
this pull request
Mar 10, 2026
…m-project#35400) Signed-off-by: NickLucche <nlucches@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per title, move this method into utils.
I have use for grabbing kernel_block_sizes from kv_cache_config (without having to iterate all physical tensors) outside of the model runner.
This way we can have a centralized function for calculating block sizes from backends.
Furthermore we should strive to keep the runner code as lean as possible, moving this method which doesn't actually use any of the state of the class just makes sense imo.