feat: support data parallel (DP) for DeepSeek-V3.2 Python model executor. - #2258
Open
yingxudeng wants to merge 3 commits into
Open
feat: support data parallel (DP) for DeepSeek-V3.2 Python model executor.#2258yingxudeng wants to merge 3 commits into
yingxudeng wants to merge 3 commits into
Conversation
yingxudeng
force-pushed
the
feat/deepseek-v32-python-dp
branch
4 times, most recently
from
August 18, 2026 12:29
8fb01fe to
90a5951
Compare
yingxudeng
marked this pull request as ready for review
August 18, 2026 12:32
yingxudeng
requested review from
DongheJin,
DragonFive,
JimHsiung,
Kang-Meng,
liujinguang0125,
liutongxuan,
ustcfy,
xiao-yu-chen,
yinjiawei01 and
zhang-minchao
as code owners
August 18, 2026 12:32
yingxudeng
force-pushed
the
feat/deepseek-v32-python-dp
branch
2 times, most recently
from
August 18, 2026 14:40
e375d65 to
0c15f12
Compare
yingxudeng
force-pushed
the
feat/deepseek-v32-python-dp
branch
from
August 19, 2026 07:24
0c15f12 to
6d9486d
Compare
zhang-minchao
left a comment
Collaborator
There was a problem hiding this comment.
发现两处需要在合入前处理的 DP 正确性/性能问题。
… mismatch. DP mode (dp_size > 1) must not fall back to eager for decode steps, as divergent execution paths across ranks would deadlock HCCL collectives. This change raises RuntimeError instead of silently returning False when graph execution is declined, and fixes an MLA-specific bug where the C++ engine sends kv_seq_lens_host_values with global DP batch length while block_table only contains local rank sequences.
yingxudeng
force-pushed
the
feat/deepseek-v32-python-dp
branch
from
August 19, 2026 08:20
6d9486d to
bdf93f5
Compare
- Expose dp_is_decode from C++ metadata to Python so graph runners can detect when not all DP ranks are in decode phase and fall back to eager, preventing collective hang during asymmetric capture. - In eager DP path, use all_gather_variable to collect only valid tokens (compact) instead of pad-to-max, avoiding O(dp_size * max_tokens) amplification through gate/MoE/shared-experts. - Remove the hard RuntimeError in executor.py that blocked DP decode eager fallback, enabling eager-mode precision debugging. - Update tests to cover both graph (fixed-shape) and eager (compact) gather paths.
yingxudeng
force-pushed
the
feat/deepseek-v32-python-dp
branch
from
August 19, 2026 13:15
ffbbc6d to
4bf6175
Compare
zhang-minchao
approved these changes
Aug 19, 2026
Collaborator
Author
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.

Description
Related Issues
Change Type
Pull Request Checklist
Thank you for contributing to xLLM. Before requesting review, please make sure the following items are complete.
PR Title and Commit Messages
<type>: <subject>.Pre-commit Checks
pre-commitby runningpip install pre-commitor an equivalent command.pre-commit install.pre-commit run --all-filesand fixed any reported issues.Self Review
.agents/skills/code-review/references/custom-code-style.md, especially code written or assisted by AI.mainbranch.Build and Test Coverage
python setup.py build testhas passed on a CUDA machine.python setup.py build testhas passed on an NPU machine.python setup.py build testhas passed on an MLU machine.Reviewer Notes