-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[Bugfix][EP+DP] Fix internode check #19112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Tyler Michael Smith <tysmith@redhat.com>
Signed-off-by: Tyler Michael Smith <tysmith@redhat.com>
👋 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 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 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @tlrmchlsmth, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request addresses an issue in the A2A communicators where the is_internode
check was not functioning correctly. The in_the_same_node_as
function returns a list of booleans, but it was being treated as a single boolean value, causing is_intranode
to always evaluate to true. I have corrected this by ensuring that is_internode
is determined by checking if all ranks in the CPU group are on the same node. Additionally, I have removed a temporary workaround that was previously implemented.
Highlights
- Bug Fix: Corrects the logic for determining
is_internode
in A2A communicators by ensuring that all ranks are checked to be on the same node. - Code Removal: Removes a temporary workaround related to disabling pplx-a2a intranode communication.
- Assertion Removal: Removes unnecessary assertions related to
self.intranode
in_make_all2all_kwargs
.
Changelog
- vllm/distributed/device_communicators/all2all.py
- Removes the temporary workaround that disabled pplx-a2a intranode communication (lines 87-89 before diff, line 87 after diff).
- Removes assertions related to
self.intranode
in_make_all2all_kwargs
(line 181 before diff, removed after diff). - Removes assertions related to
self.intranode
in_make_all2all_kwargs
(line 246 before diff, removed after diff).
- vllm/distributed/device_communicators/base_device_communicator.py
- Corrects the logic for setting
self.internode
to properly check if all ranks are on the same node (lines 52-53 before diff, line 52 after diff).
- Corrects the logic for setting
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
A boolean's true or false,
A list of booleans? A farce!
Internode's plight,
Now shining bright,
Fixed logic sets a new course.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This PR provides a crucial bugfix for the is_internode
check in A2A communicators. The identified issue with in_the_same_node_as
returning a list and its previous incorrect usage as a single boolean is well-addressed. The fix self.internode = not all(in_the_same_node_as(...))
is correct and elegant.
The associated cleanups in all2all.py
, such as removing the hardcoded self.internode = True
hack and the now-redundant assertions, are also well-executed and improve code clarity.
Overall, the changes are of high quality and directly resolve the reported problem.
A minor note on the PR description: the link https://github.com/vllm-project/vllm/pull/19034
seems to be a placeholder or typo, as it doesn't point to an existing PR. It might be helpful to update this if it refers to a specific past PR that introduced the hack.
Summary of Findings
- Clarity of
internode
calculation: Invllm/distributed/device_communicators/base_device_communicator.py
, the calculationself.internode = not all(in_the_same_node_as(cpu_group, source_rank=0))
is correct. A brief comment explaining thatin_the_same_node_as
returns a list of booleans and whynot all()
is used could enhance readability for future maintainers. This was not added as a review comment due to severity settings (this is a 'low' severity suggestion).
Merge Readiness
The pull request effectively addresses a critical bug in determining inter-node vs. intra-node communication. The code changes are clear, correct, and include necessary cleanups. The core fix in base_device_communicator.py
is sound.
From a code perspective, this PR appears ready for merging. However, given the critical nature of distributed communication, thorough testing across various multi-node and single-node multi-GPU configurations is essential to confirm the fix. The PR description currently lacks details on the test plan and results.
I am not authorized to approve pull requests, but based on the code review, if testing confirms the fix, it should be safe to merge.
DP=2 + TP=2 + EP
is broken on This PR fixes it 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the great investigation! sorry for the oversight.
Signed-off-by: Tyler Michael Smith <tysmith@redhat.com> Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
Purpose
This PR fixes the check for
is_internode
in the A2A communicators.The function
in_the_same_node_as(cpu_group, source_rank=0)
returns a list of bools but it was being used as if it returned a single bool. Since the list is is not empty,is_intranode
would alway be true.Also removes the hack from #19034
Test Plan + Result
Successfully ran DSv2 Coder Lite with DP8 on one 8xH200 node and DP16 across two