mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #282] Redundant atomics in internode_ll #206
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#206
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 @itayalroy on GitHub (Jul 6, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/282
Hi guys, just wondering about this part in low latency dispatch kernel:
Why do we need
nvshmemi_ibgda_amo_nonfetch_addwhen writing to the remote recv counter? it looks like each counter is written to only once by a single thread- can't we use a regular DMA write instead? Does this atomic write guarantee some remote execution order that a regular RDMA write doesn't?@sphish commented on GitHub (Jul 7, 2025):
Yes, the RDMA atomic operation guarantees that this operation will only become visible after all previous write operations have completed.
@zhangboyue commented on GitHub (Jul 8, 2025):
Thanks for the reply, I'm caught by memory order questions of this piece of code. And it makes perfect sense if AMO 'fences' all previous write operations. Is it defacto standard or defined by official RDMA memory model ? I've search a while, but got little clues.
@sphish commented on GitHub (Jul 8, 2025):
@zhangboyue This rule is from InfiniBand Architecture Specification.
@zhangboyue commented on GitHub (Jul 8, 2025):
Peta's of thanks.
@ghghliu commented on GitHub (Sep 26, 2025):
From the relevant parts of IB spec you mentioned, WRITE WITH IMMEDIATE can also serve as a fence for the preceding WRITE. Could you explain the considerations for choosing ATOMIC operations instead of WRITE WITH IMMEDIATE?
o9-20: An application shall not depend on the contents of an RDMA WRITE buffer at the responder until one of the following has occurred:
• Arrival and Completion of the last RDMA WRITE request packet when used with Immediate data.
@sphish commented on GitHub (Oct 10, 2025):
@ghghliu Mainly because NVSHMEM does not have
write_with_imm.