[GH-ISSUE #33] Why doesn't it lead to a deadlock when only some threads call nvshmem_barrier_all? #32

Closed
opened 2026-10-26 09:52:52 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @MoringKing on GitHub (Mar 1, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/33

nvshmem_barrier_all is used to synchronize all PE globally, but this function is called only when thread_id is equal to 32. Will it cause deadlock?
Image

Originally created by @MoringKing on GitHub (Mar 1, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/33 nvshmem_barrier_all is used to synchronize all PE globally, but this function is called only when thread_id is equal to 32. Will it cause deadlock? <img width="894" alt="Image" src="https://github.com/user-attachments/assets/4cf35430-da0e-400a-b006-9385890faa8d" />
Author
Owner

@LyricZhao commented on GitHub (Mar 3, 2025):

No, nvshmem_barrier_all can be called with only one thread (there's also some API warp/block-level API like nvshmemx_barrier_all_block). For more details, please refer to https://docs.nvidia.com/nvshmem/api/index.html.

<!-- gh-comment-id:2693143722 --> @LyricZhao commented on GitHub (Mar 3, 2025): No, `nvshmem_barrier_all` can be called with only one thread (there's also some API warp/block-level API like `nvshmemx_barrier_all_block`). For more details, please refer to https://docs.nvidia.com/nvshmem/api/index.html.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#32
No description provided.