mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #353] [MERGED] fix combine timeout due to delayed forwarder min head update #533
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#533
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/353
Author: @ZhiyiHu1999
Created: 8/6/2025
Status: ✅ Merged
Merged: 8/26/2025
Merged by: @LyricZhao
Base:
main← Head:fix/combine_timeout_due_to_lacking_forwarder_min_head_update📝 Commits (2)
fecd746fix combine timeout due to forwarder min head update4603442Update head before and after combine_token; add assertion for nvl_buffer_size_per_rdma_rank📊 Changes
1 file changed (+4 additions, -1 deletions)
View changed files
📝
csrc/kernels/internode.cu(+4 -1)📄 Description
This PR provides a fix for #314.
The configuration that causes the combine timeout in #314 is:
num_sms = 48
nvl_chunk_size = 32
nvl_buffer_size = 80
rdma_chunk_size = 20
rdma_buffer_size = 128
In
kNVLAndRDMAForwarder, we first readexpected_head, then compare with thetail, combine the token, issue RDMA send, finally updateforwarder_nvl_headwithexpected_head + 1, then the coordinator updates themin_head.In the above configuration, a rare case will happen: in the first iteration of the below 'for' loop, some threads will be trapped in the while loop comparing
nvl_tailandnvl_head. As we update theforwarder_nvl_headat the end of the iteration, even ifeapected_headis larger than theforwarder_nvl_head, it won't get updated, same formin_head.github.com/deepseek-ai/DeepEP@26cf250a33/csrc/kernels/internode.cu (L1646-L1664)So, I just simply update
forwarder_nvl_headwithexpected_head(notexpected_head + 1in the fix) for the rare cases.Besides, for the
kRDMAReceiver, the design is to updaterdma_receiver_rdma_headwithexpected_head, before consuming the token. So maybe an update forrdma_receiver_rdma_headwithexpected_head + 1should be added after the token consuming in the last 'for' loop iteration. I guess there may be rare cases where this could potentially cause a timeout. But I haven't found a configuration for that.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.