mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #527] [CLOSED] Fix the MultiStages for intranode combine and the offset_int4 for int… #613
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#613
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/527
Author: @cyhdmjzzy
Created: 12/19/2025
Status: ❌ Closed
Base:
main← Head:main📝 Commits (1)
e5e9222Fix the MultiStages for intranode combine and the offset_int4 for internode_ll combine📊 Changes
2 files changed (+10 additions, -5 deletions)
View changed files
📝
csrc/kernels/internode_ll.cu(+1 -1)📝
csrc/kernels/intranode.cu(+9 -4)📄 Description
internode_ll.cu:
Wouldn't the lane_id * kNumSendUnrolls part cause a discrepancy?
elect_one_sync()always elects lane 0, so it's equivalent to:const auto& offset_int4 = (iter_idx + 1) * 32 * kNumSendUnrollshttps://github.com/deepseek-ai/DeepEP/issues/525
https://github.com/deepseek-ai/DeepEP/issues/359
Each invocation of
tma_store_1dissues a TMA bulk_group, and multiple TMA bulk_groups issued by the same thread execute serially (see NVIDIA PTX documentation: 9.7.9.27.2.2. Data Movement and Conversion Instructions: cp.async.bulk.wait_group). Becauseelect_one_sync()always selects lane 0, thetma_store_1dinsideif (elect_one_sync())will be issued serially by the same lane, preventing a true MultiStage pipeline. Assigning the first kNumStages lanes to distinct stages enables genuine MultiStage concurrency.Furthermore, the inline assembly in
tma_store_wait—asm volatile("cp.async.bulk.wait_group.read %0;" ::"n"(N) : "memory")— waits for the number of remaining TMA bulk_group read-to-shared-memory transactions initiated by the current executing thread to drop to N. If the first kNumStages lanes each own one stage, then a lane that issuestma_store_1donly needs to wait for the single TMA bulk_group it issued in the previous iteration that writes its corresponding stage in shared memory.Finally, the
__syncwarp()immediately aftertma_store_wait()is unnecessary, becausetma_store_fence()followed by__syncwarp()is sufficient for visibility.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.