Skip to content

[Core]Extract is_last_rank in Ray for tpu to override#33012

Merged
DarkLight1337 merged 3 commits intovllm-project:mainfrom
Chenyaaang:pp-ray
Feb 27, 2026
Merged

[Core]Extract is_last_rank in Ray for tpu to override#33012
DarkLight1337 merged 3 commits intovllm-project:mainfrom
Chenyaaang:pp-ray

Conversation

@Chenyaaang
Copy link
Copy Markdown
Contributor

@Chenyaaang Chenyaaang commented Jan 24, 2026

Extract Ray's get_pp_group().is_last_rank as a separate method is_last_rank, so that TPU can override it.

@mergify mergify bot added the v1 label Jan 24, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a small but important refactoring in vllm/v1/executor/ray_utils.py. It extracts the logic for determining if a worker is the last rank in a pipeline parallel group, get_pp_group().is_last_rank, into a new method _is_last_rank() within the RayWorkerWrapper class. This change is well-motivated, as it enables platform-specific implementations, like for TPUs, to override this behavior. The implementation is clean and correct. I have no concerns with this pull request.

Signed-off-by: Chenyaaang <chenyangli@google.com>
Copy link
Copy Markdown
Collaborator

@kouroshHakha kouroshHakha left a comment

Choose a reason for hiding this comment

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

LGTM. it's a no op to the current implementation. Just a refactor.

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) February 14, 2026 03:29
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 14, 2026
@DarkLight1337 DarkLight1337 merged commit 06be535 into vllm-project:main Feb 27, 2026
48 checks passed
antonovsergey93 pushed a commit to antonovsergey93/vllm that referenced this pull request Feb 27, 2026
Copilot AI pushed a commit to machov/vllm that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants