mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #525] [Question] Question on cpy_src_int4_ptr + offset_int4 #335
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#335
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?
Originally created by @cyhdmjzzy on GitHub (Dec 18, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/525
First, I would like to express my great admiration for the authors who have created such an excellent project.
About the code in csrc/kernels/internode_ll.cu, I have a question regarding line 870's
cpy_src_int4_ptr + offset_int4. First,tma_load_1d(or
tma_load_and_arrive) is used to transferkNumTMABufferBytesbytes of data from globalmemory to shared memory for the current warp's
next_stage_idxin a single TMA operation,where
kNumTMABufferBytesrepresents the int4 data for 32 threads (one warp) for one stage,with each lane responsible for
kNumSendUnrollsint4s. However, inoffset_int4 = i + 32 * kNumSendUnrolls,iis lane-dependent (specifically,i = lane_id * kNumSendUnrollsat thestart of the loop). If
elect_one_sync()at line 867 selects a thread in the warp that isnot lane=0, for example lane=2, then
cpy_src_int4_ptr + offset_int4was intended to offsetto the next stage's data for 32 threads (i.e.,
32 * kNumSendUnrollsint4s), but it wouldskip the
kNumSendUnrollsint4s corresponding to lanes 0 and 1. How should this beunderstood? Why is
(i + 32 * kNumSendUnrolls)used to represent the data fornext_stage_idxthat needs to be written from global memory to shared memory?My personal humble opinion is that line 869 should perhaps be changed to the following to be more reasonable:
I believe I must be misunderstanding something, but I cannot figure it out. I very much look forward to your reply. Thank you very much.
@cyhdmjzzy commented on GitHub (Dec 19, 2025):
It turns out someone had asked this before: https://github.com/deepseek-ai/DeepEP/issues/359
@polarstormx commented on GitHub (Sep 18, 2026):
Closing as a duplicate of #359, as confirmed in the author's comment.