mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #59] AllToAll performance not improving #56
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#56
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 @cryoco on GitHub (Mar 8, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/59
Hello DeepEP developers, appreciate the solid works!


I conducted an all-to-all communication performance comparison experiment on 8 H100 nodes, using Megatron-LM's DeepEP Integration.
To eliminate the impact of pipeline parallelism bubbles and focus on comm performances, I use the first pipeline stage (8 layers with first-3-dense) of the DeepSeek V3 model only, instead of the full model.
I ran pretraining experiments with DeepEP enabled/disabled(other configurations are identical), and the throughputs were roughly the same, which is below the expectation.
I collected the nsys profile reports as follows:
DeepEP(with normal kernels) enabled:
DeepEP disabled:
There are no PPs so the SendRecv kernels represent the alltoall kernels.
It seems the combining alltoall comms are faster(13ms->5ms) with DeepEP, but dispatching becomes slower(13ms->16~18ms), and notify_dispatch/cached_notify costs roughly the same time as combining, which makes the e2e throughput not improve.
Any suggestions or insights are appreciated. Thanks!
@LyricZhao commented on GitHub (Mar 10, 2025):
https://github.com/deepseek-ai/DeepEP/blob/main/tests/test_internode.py? You may not use the best config in your cluster.notify_dispatch/cached_notifyis slow and we may optimize later. But they are also actually barriers, extreme longer time may be due to the computation kernel imbalance. If you are using random data to test, you may change it to a guaranteed balanced gate. Or you can check whether the arrival time of all 64 ranks is aligned.@cryoco commented on GitHub (Mar 13, 2025):
@LyricZhao Thanks for quick reply!
BTW, I noticed unexpected PCIe flow(about 20GiB/s) in cluster DCGM monitor. Wonder the reason.
@LyricZhao commented on GitHub (Mar 13, 2025):
Is the performance correct (should be around ~40 GB/s)?
Yep, I am not familar with Megatron. You better dive into that to see how many tokens each rank is receiving.
RDMA transmission path: GPU -> PCIe -> network card (send), network card -> PCIe -> GPU (recv). If the PCIe bandwidth is not enough for all GPUs/network card, it can be the bottleneck.
@cryoco commented on GitHub (Mar 15, 2025):
@LyricZhao
Nope, latency is around 8~12ms(both dispatch and combine) and BW around 5GB/s(not precise due to sampling interval but likely lower than 40GB/s)
I've done the check. The balancing is good. New discovery: Added while loop to dispatching in training, roughly like:
In the first few cycles, the latencies are around 10ms as before; But in the following loops, the latencies are as good as in the unittests(around 2ms). It seems in each dispatching and combining, it requires some "warming up" to reach ideal performance. Perhaps it is somehow related to the buffer caching mechanism in DeepEP?
@LyricZhao commented on GitHub (Mar 17, 2025):
No explicit warmup in DeepEP, the
__init__function will do all buffer setup at once. The only reason I come up with is that your network needs some warmup, e.g. each rank arrives not at the same timestamp (or the CPU speed is not the same, launching the kernels at different timestamp).