EPv2: get_rdma_gbs() get half bandwidth in LACP bonding environments

Open Beginner friendly
#614 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python

Research direction

Start in deep_ep/utils/envs.py:246 at get_rdma_gbs() and inspect how ibstat output feeds the bandwidth and SM calculation. Verify the EP_RDMA_GBS override path, including its conversion, and confirm that setting it bypasses ibstat detection and produces the correct bandwidth for LACP environments.

Written by the indexing model from the issue text.

Description

Hi,

We found the get_rdma_gbs() function in #605 deep_ep/utils/envs.py:246 uses ibstat to detect the RDMA NIC bandwidth, which is then used to calculate the number of SMs.

However, in LACP bonding environments, ibstat reports only half of the actual bandwidth, leading to incorrect SM calculation.

To avoid this problem, we can set the environment variable (such as EP_RDMA_GBS ) to manually specify the correct bandwidth, bypassing ibstat detection.

diff --git a/deep_ep/utils/envs.py b/deep_ep/utils/envs.py
index f6e34d9..1710c36 100644
--- a/deep_ep/utils/envs.py
+++ b/deep_ep/utils/envs.py
@@ -255,6 +255,10 @@ def get_rdma_gbs(nic_name: str = _DEFAULT_NIC_NAME) -> float:
     """
     # noinspection PyBroadException
     try:
+        rate = int(os.getenv('EP_RDMA_GBS', 0))
+        if rate != 0:
+            return rate / 8
+
         result = subprocess.run(['ibstat'], capture_output=True, text=True, check=True)
         output = result.stdout

1.patch

Thank you.

Dominant language
Cuda
Stars
10.2k
Forks
1.4k
Avg merge
2d 17h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from deepseek-ai/DeepEP

All issues in deepseek-ai/DeepEP

Similar issues

More Networking issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.