Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions deep_ep/utils/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ def get_rdma_gbs(nic_name: str = _DEFAULT_NIC_NAME) -> float:
match = re.search(pattern, output, re.DOTALL)
assert match
rate = int(match.group(1))

# Try to detect 802.3ad LACP bonding slaves and multiply by slave count
result = subprocess.run(f'cat /sys/class/infiniband/{nic_name}/device/net/*/upper_*/bonding/slaves',
shell=True, capture_output=True, text=True)
slave_count = len(result.stdout.strip().split())
if slave_count >= 2:
rate *= slave_count

return rate / 8
except Exception as e:
print(f'Failed to get RDMA connection speed: {e}')
Expand Down