mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #693] Pipeline direct NVLink dispatch with triple-buffered prefetch #711
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#711
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/693
Author: @usernamehaha2022
Created: 7/22/2026
Status: 🔄 Open
Base:
main← Head:main📝 Commits (3)
b9ef9b3perf: double-buffer direct NVLink dispatchd2be99aperf: prefetch direct dispatch tokens across NVLink stores45c96fafix: keep dispatch TMA buffer count in sync📊 Changes
2 files changed (+81 additions, -18 deletions)
View changed files
📝
csrc/kernels/elastic/dispatch.hpp(+13 -2)📝
deep_ep/include/deep_ep/impls/dispatch.cuh(+68 -16)📄 Description
Summary
This PR pipelines direct NVLink dispatch using three shared-memory TMA buffers per dispatch warp.
Previously, a dispatch warp prepared tokens sequentially around remote S2G stores. With this change, the next token's hidden data, scale factors, metadata, and routing information are prefetched while previous remote stores remain in flight.
At steady state, the three buffers are used for:
Before recycling the oldest buffer,
tma_store_wait<1>()reduces the number of outstanding store groups to one. This keeps buffer reuse safe without fully draining all remote stores between tokens.The shared-memory calculation now accounts for all three staging buffers, and direct NVLink dispatch is limited to at most 14 dispatch warps. The non-NVLink path remains single-buffered.
Validation
Tested on 8 x NVIDIA H100 GPUs with direct NVLink dispatch.
Average across 8 ranks:
mainWith rank unbalanced ratio set to 1.5:
main🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.