bugfix(MC2): refactor the comm group of MC2 to be compatible with PP#7291
bugfix(MC2): refactor the comm group of MC2 to be compatible with PP#7291MengqingCao merged 7 commits intovllm-project:mainfrom
Conversation
Summary of ChangesHello, 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! This pull request addresses a critical bug in the MC2 communication group setup within the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe 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 by creating a comment using either
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 Limitations & Feedback Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. 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. Footnotes
|
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
There was a problem hiding this comment.
Code Review
This pull request refactors the creation of the _MC2 communication group to make it compatible with pipeline parallelism (PP). The change adjusts the rank grouping logic to be based on pipeline stages by leveraging vllm_all_ranks and a transpose operation. This is intended to resolve a crash when using a combination of data, expert, and pipeline parallelism. The changes are focused on this refactoring. After a thorough review, I have not identified any high or critical severity issues.
4ca0b21 to
f825e20
Compare
578446f to
13fe30f
Compare
c52171e to
5e19e12
Compare
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
https://github.com/vllm-project/vllm-ascend/actions/runs/23234531290/job/67535195887 |
3f6f672 to
49b2c25
Compare
Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
…X to be compatible with PP Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
…llm-project#7291) ### What this PR does / why we need it? This PR refactors the communication group of MC2 to keep it consistent with vllm's EP group, making it compatible with PP. - vLLM version: v0.17.0 - vLLM main: vllm-project/vllm@4034c3d --------- Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
…llm-project#7291) ### What this PR does / why we need it? This PR refactors the communication group of MC2 to keep it consistent with vllm's EP group, making it compatible with PP. - vLLM version: v0.17.0 - vLLM main: vllm-project/vllm@4034c3d --------- Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
…llm-project#7291) ### What this PR does / why we need it? This PR refactors the communication group of MC2 to keep it consistent with vllm's EP group, making it compatible with PP. - vLLM version: v0.17.0 - vLLM main: vllm-project/vllm@4034c3d --------- Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
1. Fix intermediate tensor shape in dummy_run when SP+PP enabled (from b390e0e, PR vllm-project#5416): - Divide intermediate tensor tokens by tp_size when enable_sp() - Allocate self.intermediate_tensors with max_tokens / tp_size - Prevents extra all-gather on non-first PP ranks causing OOM 2. Refactor MC2 communication group for PP compatibility (adapted from 71df17f, PR vllm-project#7291): - Reshape all_ranks to 4D: (ExternalDP, DP, PP, TP) - MC2 group_ranks now uses EP-like layout via transpose(1,2) so ranks within the same PP stage are grouped together - Update P_TP alltoall group construction for PP dimension Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
What this PR does / why we need it?
This PR refactors the communication group of MC2 to keep it consistent with vllm's EP group, making it compatible with PP.
How was this patch tested?
Prior to this fix, starting the service with the above command would cause an immediate crash; after the modification, the parallel combination of DP+EP+PP now works properly.