mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #650] Add support to multi-plane NICs and multi-NIC per PE to DeepEP v1 #687
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#687
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?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepEP/pull/650
Author: @aahouzi
Created: 5/28/2026
Status: 🔄 Open
Base:
main← Head:multi-nic-fix📝 Commits (4)
20aa88bAdd support for multi-plane NICs / multi-NIC per PE532d7e2Merge branch 'deepseek-ai:main' into multi-nic-fix01e4c91Merge branch 'deepseek-ai:main' into multi-nic-fixd2a1fdcfix(legacy): use the v2 IBGDA device-state RC indexing in ibgda_get_rc📊 Changes
3 files changed (+27 additions, -14 deletions)
View changed files
📝
csrc/kernels/legacy/ibgda_device.cuh(+1 -3)📝
csrc/kernels/legacy/internode.cu(+14 -6)📝
csrc/kernels/legacy/internode_ll.cu(+12 -5)📄 Description
Description
On multi-plane NICs (e.g. CX-8 dual-plane) or multi-NIC per PE, enabling NVSHMEM's
NVSHMEM_IBGDA_ENABLE_MULTI_PORT=1was not enough to actually distribute traffic across planes in DeepEP, and reach full line rate of CX8, even thoughshmem_put_bwperftest was able to reach line rate of CX8 NICs.After some investigation, it seems that the DeepEP v1 kernels only addressed the first half of QP pool, so all RDMA traffic stayed on a single plane even when NVSHMEM had correctly allocated QPs on all available planes. So we end up with this scenario on a DGX B300 NVL8 + CX8 dual-plane cluster where only plane p0 of each of the 8 NICs is being utilized by DeepEP:
Solution
This PR fixes the QP selection logic in both legacy DeepEP v1 kernels (Internode + LL), so traffic is distributed equally across all available planes/NICs per PE. Also, the PR should work well for multi-NIC per PE scenarios.
With multi-port enabled, NVSHMEM allocates
num_rc_per_pe × num_devsQPs per peer, laid out as[NIC 0 QPs | NIC 1 QPs | ... | NIC N-1 QPs]. The new QP selection logic:expert_local_idx, and since different warp groups have different expert indices, traffic ends up spread across all NICs assigned per PE naturally. This requiresnum_local_experts >= num_devssince with fewer local experts than NICs, some NICs stay unused.The fix also is fully backward compatible, so if a user doesn't provide
NVSHMEM_IBGDA_ENABLE_MULTI_PORT=1, theqp_idreverts back to the original value it had for 1 NIC per PE.Also, users are not required to provide any NIC to PE mapping via
NVSHMEM_HCA_PE_MAPPING, as the default PCI-path of NVSHMEM can correctly detect when 2 NICs are closer to the same PE and assign it correctly whenever the user providesNVSHMEM_IBGDA_ENABLE_MULTI_PORT=1.Results
Setup: DGX B300 NVL8 with CX-8 dual-plane
Internode test for 2N and 8N:
num_local_experts={4,8}Requirements
NVSHMEM_IBGDA_ENABLE_MULTI_PORT=1num_rc_per_pe × num_devsQP pool.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.