mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #18] Reasons for not calling NVSHMEM public APIs? #18
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#18
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 @abcdabcd987 on GitHub (Feb 25, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/18
First of all, this is an amazing work! Thank you so much for writing fantastic research papers in detail and open-sourcing the high performance building blocks!
As I was learning through the code base, I found that you folks wrote the kernels using NVSHMEM's IBGDA internals (
nvshmemi_ibgda_*). I'm very curious what are the advantages of these internals over the public APIs (likenvshmemx_putmem_nbi_warp).@LyricZhao commented on GitHub (Feb 26, 2025):
For microsecond-level performance, the public APIs are not very good. For example, to ensure correctness, the public ones do a lot of sync and atomic operations. But our impls make each QP for a expert and do a lot of other assumptions, which can make the code much easier.
Also, the public API is not convenient for AR enabled (maybe you should do a
quietoperation, which is slow), so for things like this, we can implement and co-design by rewriting these functions.There are other optimizations in the NVSHMEM patch, e.g. shuffling the QP indices, all these can improve performance.
@sphish commented on GitHub (Feb 26, 2025):
We aim to achieve finer-grained control over communication operations, as the native NVSHMEM interface has several limitations. One such limitation is the lack of support for fine-grained order-preserving operations. For example, when you need to send a flag after transmitting a piece of data, you can only rely on heavy operations like nvshmem_quiet(). Another example is our requirement to ensure each expert process exclusively uses a dedicated QP (Queue Pair), which cannot be achieved through NVSHMEM's native interfaces.
@abcdabcd987 commented on GitHub (Feb 26, 2025):
Thanks for explanation! Makes lots of sense.
I'm curious about this requirement. I know in the V3 paper, you use 1 expert per GPU. Do you support putting multiple experts on one GPU (for the low latency kernel)? And about dedicated QP, is it because you'd like to make sure that the GPU always uses the local NIC on the same PCIe switch, or is there some other consideration (like flow control etc.)
@sphish commented on GitHub (Feb 26, 2025):
In low-latency mode:
@sphish commented on GitHub (Feb 26, 2025):
And yes, we support putting multiple experts on one GPU.