[GH-ISSUE #6] how to limit the alltoall op in 4 nodes #4

Closed
opened 2026-10-26 09:52:16 +00:00 by bsakaguchi · 4 comments
Owner

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的实现代码有关系吗?

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的实现代码有关系吗?
Author
Owner

@LyricZhao commented on GitHub (Feb 25, 2025):

这一段的实现是和EP的实现代码有关系吗?

Yes.

You just give the correct topk_idx, and the all-to-all kernels will automatically do it. For example, if topk_idx[i] of token i indicate goes to Y experts in X nodes, the kernel will only send X RDMA messages and broadcast to Y experts via NVLink.

<!-- gh-comment-id:2680392330 --> @LyricZhao commented on GitHub (Feb 25, 2025): > 这一段的实现是和EP的实现代码有关系吗? Yes. You just give the correct `topk_idx`, and the all-to-all kernels will automatically do it. For example, if `topk_idx[i]` of token `i` indicate goes to $Y$ experts in $X$ nodes, the kernel will only send $X$ RDMA messages and broadcast to $Y$ experts via NVLink.
Author
Owner

@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!

<!-- gh-comment-id:2681223964 --> @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!
Author
Owner

@yanweian commented on GitHub (Feb 26, 2025):

这一段的实现是和EP的实现代码有关系吗?

Yes.

You just give the correct topk_idx, and the all-to-all kernels will automatically do it. For example, if topk_idx[i] of token i indicate goes to Y experts in X nodes, the kernel will only send X RDMA messages and broadcast to Y experts via NVLink.

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.

<!-- gh-comment-id:2684104977 --> @yanweian commented on GitHub (Feb 26, 2025): > > 这一段的实现是和EP的实现代码有关系吗? > > Yes. > > You just give the correct `topk_idx`, and the all-to-all kernels will automatically do it. For example, if `topk_idx[i]` of token `i` indicate goes to Y experts in X nodes, the kernel will only send X RDMA messages and broadcast to Y experts via NVLink. 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.
Author
Owner

@LyricZhao commented on GitHub (Feb 26, 2025):

We use CUDA IPC (memory semantics) for NVLink, so you just use normal ld instrs to read RDMA buffer (only once), and write into multiple NVL memory remote address using st instrs.
That's what we called "broadcast", nothing special.

<!-- gh-comment-id:2684298524 --> @LyricZhao commented on GitHub (Feb 26, 2025): We use CUDA IPC (memory semantics) for NVLink, so you just use normal `ld` instrs to read RDMA buffer (only **once**), and write into **multiple** NVL memory remote address using `st` instrs. That's what we called "broadcast", nothing special.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#4
No description provided.