Skip to content

Conversation

ilmarkov
Copy link
Contributor

@ilmarkov ilmarkov commented Aug 13, 2025

Fix #18589
Fix #22840

Changes default parameter of rank argument to None instead of 0 in CustomAllreduce.free_shared_buffer. It has to be None as by default it the method will just get it from dist.get_rank()

$ torchrun --nproc_per_node=2 tests/distributed/test_ca_buffer_sharing.py
Rank 1 has pointers [131710626824192, 131710624727040]
Rank 0 has pointers [125588954152960, 125588956250112]
Rank 0 verified all buffers
Rank 1 verified all buffers
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Purpose

Test Plan

Test Result

(Optional) Documentation Update

Signed-off-by: ilmarkov <[email protected]>
Copy link
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 correctly fixes a bug in CustomAllreduce.free_shared_buffer by changing the default value of the rank parameter from 0 to None. The previous default value caused incorrect behavior in multi-process settings, where ranks other than 0 would attempt to free the buffer for rank 0 if the method was called without an explicit rank. With this change, the method now correctly retrieves the rank of the current process using dist.get_rank() when no rank is provided, which is the intended behavior. The fix is clean, targeted, and resolves the issue effectively.

@ilmarkov ilmarkov changed the title Fix test_ca_buffer_sharing [CI/]Fix tests/distributed/test_ca_buffer_sharing.py Aug 13, 2025
@ilmarkov ilmarkov changed the title [CI/]Fix tests/distributed/test_ca_buffer_sharing.py [CI] Fix tests/distributed/test_ca_buffer_sharing.py Aug 13, 2025
Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

Copy link
Member

@yewentao256 yewentao256 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@yewentao256 yewentao256 added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 13, 2025
@robertgshaw2-redhat robertgshaw2-redhat enabled auto-merge (squash) August 13, 2025 18:32
@robertgshaw2-redhat
Copy link
Collaborator

all failures are known and addressed by other PRs. This is good to merge

@simon-mo simon-mo disabled auto-merge August 14, 2025 03:09
@simon-mo simon-mo merged commit 1d20c34 into vllm-project:main Aug 14, 2025
42 of 46 checks passed
yiliu30 pushed a commit to yiliu30/vllm-fork that referenced this pull request Aug 19, 2025
divakar-amd pushed a commit to divakar-amd/vllm_upstream that referenced this pull request Aug 20, 2025
djmmoss pushed a commit to djmmoss/vllm that referenced this pull request Aug 21, 2025
…22849)

Signed-off-by: ilmarkov <[email protected]>
Co-authored-by: ilmarkov <[email protected]>
Co-authored-by: Wentao Ye <[email protected]>
Signed-off-by: Duncan Moss <[email protected]>
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
…22849)

Signed-off-by: ilmarkov <[email protected]>
Co-authored-by: ilmarkov <[email protected]>
Co-authored-by: Wentao Ye <[email protected]>
Signed-off-by: Xiao Yu <[email protected]>
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI Failure][NIGHTLY FIRE DRILL]: Distributed Test - A100 [Bug][Failing Test]: Distributed Tests (A100) - distributed/test_ca_buffer_sharing.py
5 participants