mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #703] fix(legacy): order work after ready-index publication #718
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#718
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/703
Author: @youchengsong
Created: 7/27/2026
Status: 🔄 Open
Base:
main← Head:fix-legacy-ready-fence📝 Commits (1)
d49e2c5fix(legacy): order work after ready-index publication📊 Changes
1 file changed (+4 additions, -3 deletions)
View changed files
📝
csrc/kernels/legacy/ibgda_device.cuh(+4 -3)📄 Description
Summary
Restore the post-publication ordering point used by NVSHMEM after
ibgda_submit_requestsadvancesready_idx.DeepEP already uses
__threadfence()before the CAS to order WQE payloadwrites before ready-index publication. This change adds the separate fence
after the successful CAS so subsequent post-send work remains ordered after
that publication.
The added
memory_fence_cta()emits the samefence.acq_rel.ctainstruction used by NVSHMEM's
IBGDA_MFENCE()at the corresponding point:https://github.com/NVIDIA/nvshmem/blob/v3.7.2-0/src/include/non_abi/device/pt-to-pt/ibgda_device.cuh#L1648-L1670
Scope
The functional change is one fence in the legacy IBGDA submission helper.
It does not change:
This PR is protocol-ordering hardening and does not claim that this omitted
fence alone explains every observed legacy progress failure.
Validation
sm_103with CUDA 13.0.88,NVSHMEM 3.7.2, NCCL 2.30.7, and PyTorch 2.11;
sm_103cubin;bash ./format.sh;git diff --check upstream/main...HEAD;memory_fence_cta()isfence.acq_rel.cta, matching NVSHMEM's ordering primitive.The change also merges cleanly with the current head of #677; the two
patches address independent parts of the submission path.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
EP_BUFFER_DEBUG=0turning on Python-side debug output #730