Skip to content

Fix internode dispatch args - #641

Merged
sphish merged 2 commits into
deepseek-ai:mainfrom
MARD1NO:fix_internode_dispatch_args
May 22, 2026
Merged

sphish merged 2 commits into
deepseek-ai:mainfrom
MARD1NO:fix_internode_dispatch_args

Conversation

@MARD1NO

@MARD1NO MARD1NO commented May 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@sphish

sphish commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@sphish
sphish merged commit a1b3af3 into deepseek-ai:main May 22, 2026
MengYu10151 pushed a commit to MengYu10151/DeepEP that referenced this pull request Jul 6, 2026
Merge 8 upstream commits including:
- fence.proxy.async.shared::cta for TMA load (deepseek-ai#642)
- Fix single-node intra EP init (deepseek-ai#630)
- Fix internode dispatch args (deepseek-ai#641)
- Symmetric memory refactor with CPU buffer support
- NCCL SO name resolution fix for pip wheels (deepseek-ai#627)
- Various other updates (deepseek-ai#637, deepseek-ai#674)

Conflicts resolved:
- buffer.hpp: merged cpu_comm/cpu_buffer params with has_nvlink param
- nccl.cu: merged symmetric alloc refactor with has_nvlink and debug prints
- elastic.py: merged NCCL comm handle refactor with NVLink detection logic
- setup.py: adopted upstream dynamic NCCL lib name resolution

Co-Authored-By: Claude Opus 4.6 <[email protected]>
markw14 pushed a commit to markw14/DeepEP that referenced this pull request Aug 7, 2026
BACKPORT of upstream a1b3af3 ("Fix internode dispatch args", deepseek-ai#641) to the
epv2-release branch, which still carries the bug 13 commits behind main.
NOT for upstream main -- main is already fixed. Kept here only because our
container builds from epv2-release.

The legacy shim calls runtime.internode_dispatch() with 19 arguments while the
compiled binding takes 20 (csrc/legacy/buffer.hpp:889):

    int expert_alignment, int num_worst_tokens, const Config& config, ...

num_worst_tokens sits between expert_alignment and config, so both call sites
raise on every rank:

    TypeError: internode_dispatch(): incompatible function arguments

dispatch() itself already has the parameter and forwards it correctly on the
intranode path; only the internode path was missed. Passing 0 preserves the
previous behaviour and matches what main does.

Reproduced on 2 and 4 nodes, 16/32 ranks, H100 + RoCE, NCCL 2.30.7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants