mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #113] some questions in ibgda #100
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#100
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 @Thunderbrook on GitHub (Apr 8, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/113
Hi, I have some questions about the following code in ibgda
(1) I personally understand that the purpose of threadfence here is to ensure that writing to the WQE and writing to the DB do not occur out of order. From the view of the NIC, should threadfence_system be used instead?
(2) I personally understand that all threads executing atomicCAS have different compare/swap values, so is it necessary to use "atomic" operations in this case?
Thanks
@sphish commented on GitHub (Apr 8, 2025):
The
ibgda_submit_requestscode here is simplified from NVSHMEM, and I'm also somewhat unclear about the synchronization semantics needed when GPUs and NICs interact with each other. However, NVSHMEM implements it this way, and I believe that as an internal NVIDIA team, they have more insight into these details and can ensure the safety of this approach. The following is just my personal understanding:(1) If we consider the NIC as another GPU device, the
threadfencehere is indeed not strong enough to guarantee that the written WQE is visible to other GPUs. However, I think there might be special mechanisms when the NIC reads WQEs, such as always bypassing the cache, in which casethreadfencewould be sufficient.(2) I think you are right, atomic op is not necessary, we can have a try.
@Thunderbrook commented on GitHub (Apr 8, 2025):
get it, very thanks for reply~