mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #311] [MERGED] Add diagnosis module for efficient and precise location of slow rank #513
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#513
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?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepEP/pull/311
Author: @wangfakang
Created: 7/17/2025
Status: ✅ Merged
Merged: 7/30/2025
Merged by: @sphish
Base:
main← Head:feature-diagnose📝 Commits (9)
a36f480Add diagnosis module for precise identification of slow ranksf57ec84Add tests for the slow diagnosis module51ff557Merge branch 'main' into feature-diagnoseb7f2e2eUpdate some comments for diagnose52f6c16Update test case for diagnosed0bc08bStrip the diagnose module, thx LyricZhao and sphish.543b31efix conflicts333777aupdate variable name and cumulative wait recv cost, thx sphish.8c59276remove invalid comments.📊 Changes
6 files changed (+151 additions, -3 deletions)
View changed files
📝
csrc/deep_ep.cpp(+17 -0)📝
csrc/deep_ep.hpp(+2 -0)📝
csrc/kernels/api.cuh(+2 -0)📝
csrc/kernels/internode_ll.cu(+17 -0)📝
deep_ep/buffer.py(+11 -1)📝
tests/test_low_latency.py(+102 -2)📄 Description
Diagnostic proposal
Distributed large-scale EP is gradually becoming the main deployment strategy for MOE models. However, as the scale of EP increases, the risk of slowdowns in the Dispatch and Combine communication operators also rises. There are many factors, ranging from GPU hardware anomalies and imbalanced MOE computation to issues with communication links, all of which make the detection and localization of the DeepEP slow problems extremely challenging.
To address this, we have designed a diagnosis module. Each rank collects the average waiting time for receiving each token from other ranks and reports these statistics to rank 0. Based on the mean-normalized characteristics of the resulting analysis matrix, rank 0 can effectively detect and precisely localize slow anomalies in distributed communication. In addition, the impact of the overhead of this diagnostic module on performance can be ignored. Supports identifying:
Maintains a statistical matrix of average receive wait times: Matrix[src_rank, dst_rank], where each row represents a source rank and each column represents a destination rank. Example anomaly localization:
Test
The following test case simulates slow behavior: rank 2 sleeps for 1 ms before Dispatch, and rank 3 sleeps for 1 ms before Combine. With the diagnosis feature enabled, the abnormal ranks can be efficiently and accurately identified through the diagnostic logs.
MASTER_ADDR=x1 WORLD_SIZE=2 RANK=0 python ./test_low_latency.py --enable-diagnose
MASTER_ADDR=x1 WORLD_SIZE=2 RANK=1 python ./test_low_latency.py --enable-diagnose
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.