mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #705] fix: correctly detect RDMA bandwidth for bonded NICs #720
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#720
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/705
Author: @cynton503
Created: 7/27/2026
Status: 🔄 Open
Base:
main← Head:fix/rdma-bond-speed-detection📝 Commits (1)
13fb806fix: correctly detect RDMA bandwidth for bonded NICs📊 Changes
1 file changed (+39 additions, -0 deletions)
View changed files
📝
deep_ep/utils/envs.py(+39 -0)📄 Description
Summary
Fix incorrect RDMA bandwidth detection for bonded NIC devices (e.g.,
mlx5_bond_*), which causes suboptimal SM allocation and reduced dispatch/combine throughput.Problem
In RDMA LAG (bond) mode,
ibstatreports only a single logical port with per-port rate:The existing
get_rdma_gbs()parses this single port rate and computes400 / 8 = 50 GB/s. However, dual-port CX7/CX8 NICs in bond mode aggregate two 400 Gb/s physical ports, so the actual available bandwidth is800 / 8 = 100 GB/s.This under-reported bandwidth causes
get_theoretical_num_sms()to recommend fewer SMs than optimal, directly reducing dispatch/combine kernel performance.Changes
get_net_device_speed_gbs(): maps IB device to its network interface via sysfs (/sys/class/infiniband/<dev>/ports/<port>/gid_attrs/ndevs/0), then reads the kernel-reported aggregated link speed from/sys/class/net/<iface>/speed(in Mbps).get_rdma_gbs()with a three-level detection priority:EP_OVERRIDE_RDMA_GBSenvironment variable — manual override, consistent withEP_OVERRIDE_RDMA_SLconventionbond)ibstatRate parsing — original fallback for non-bond devices or when sysfs is unavailableValidation
Verified on a multi-node cluster with CX8 dual-port NICs in RDMA LAG mode (
EP_NIC_NAME=mlx5_bond_0):Compatibility
bondibstatparsing (returns 0 on any failure)EP_OVERRIDE_RDMA_GBS=<value_in_GBs>takes highest priority for any device type🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.