mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #94] Question about the global synchronization/barrier in internode notify_dispatch #86
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#86
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 @songhexiang on GitHub (Mar 26, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/94
Hi, deepep team.
There are 3 global synchronization/barrier in internode notify_dispatch.
I roughly understand that the purpose of the second global barrier is to ensure all the rdma operations have been successfully completed and the data has been written to the memory of the destination rdma ranks.
So what is the purpose of the other two global barrier? one is at the beginning of the function, and the other is at the end.
As far as I know, a global barrier in nvshmem is a collective communication, and is time-consuming. In the profile file you provided, it also proves that notify_dispatch takes about 1ms.
So my question is, is there a chance to remove the global barrier at the beginning and end of the notify_dispatch?
@LyricZhao @sphish friendly ping
@LyricZhao commented on GitHub (Mar 26, 2025):
The first barrier ensures the last dispatch/combine is finished, as we are cleaning the head/tail/other metadata, otherwise the unfinished ranks will read illegal things.
The last barriers ensures the head/tail/other metadata are cleaned before actually running the dispatch/combine, otherwise the faster ranks will read uncleaned metadata.
There is some space to optimize for these parts, but may need some refactor, we plan to do it maybe several months later.
@songhexiang commented on GitHub (Mar 26, 2025):
Thanks for your prompt response!
@songhexiang commented on GitHub (Mar 26, 2025):
Can I understand that notify_dispatch and dispatch share the same rdma buffer(void* rdma_buffer_ptr) and nvlink buffer(void** buffer_ptrs). These two global barriers are used to ensure that the rdma buffer and nvlink buffer are cleaned up for the next opertion.
@LyricZhao commented on GitHub (Mar 26, 2025):
Yes, the data buffer is reused as you said. But another reason is that one of the notify's responsibility is to clean head/tail/metadata for later dispatch.
@Autumn1998 commented on GitHub (Apr 17, 2025):
Hi teams:
After the
notify_dispatch, there is a CPU synchronize using wile loop which could cause problem when make DeepEP overlap with other compute kernels. what's more, sometimesnotify_dispatchoccupy several milliseconds which is much longer than normal (~100us), so I have some related questions:notify_dispatchconsumed more time than normal case?Thanks~
@terminator123 commented on GitHub (Oct 16, 2025):
same question,have you got the answer ?
@xingzhu-HU commented on GitHub (Dec 17, 2025):
wait for answer too