mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #6] how to limit the alltoall op in 4 nodes #4
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepEP#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rubbberrabbit on GitHub (Feb 25, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/6
To effectively leverage the different bandwidths of IB and NVLink, we limit each
token to be dispatched to at most 4 nodes, thereby reducing IB traffic. For each token, when its
routing decision is made, it will first be transmitted via IB to the GPUs with the same in-node
index on its target nodes. Once it reaches the target nodes, we will endeavor to ensure that it is
instantaneously forwarded via NVLink to specific GPUs that host their target experts, without
being blocked by subsequently arriving tokens. In this way, communications via IB and NVLink
are fully overlapped, and each token can efficiently select an average of 3.2 experts per node
without incurring additional overhead from NVLink.
这一段的实现是和EP的实现代码有关系吗?
@LyricZhao commented on GitHub (Feb 25, 2025):
Yes.
You just give the correct
topk_idx, and the all-to-all kernels will automatically do it. For example, iftopk_idx[i]of tokeniindicate goes toYexperts inXnodes, the kernel will only sendXRDMA messages and broadcast toYexperts via NVLink.@rubbberrabbit commented on GitHub (Feb 25, 2025):
thx for explain, it is really helpful. It is grateful to see you guys' work continue the best!
@yanweian commented on GitHub (Feb 26, 2025):
Hi, the impl of the broadcast via NVLink is use multiple p2ps? or one broadcast? If use one broadcast, why 3.2 experts in "In this way, communications via IB and NVLink
are fully overlapped, and each token can efficiently select an average of 3.2 experts per node
without incurring additional overhead from NVLink."
Thanks.
@LyricZhao commented on GitHub (Feb 26, 2025):
We use CUDA IPC (memory semantics) for NVLink, so you just use normal
ldinstrs to read RDMA buffer (only once), and write into multiple NVL memory remote address usingstinstrs.That's what we called "broadcast", nothing special.