[GH-ISSUE #614] EPv2: get_rdma_gbs() get half bandwidth in LACP bonding environments #372

Open
opened 2026-10-26 09:59:17 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @michaelchen1996 on GitHub (Apr 28, 2026).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/614

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.

Originally created by @michaelchen1996 on GitHub (Apr 28, 2026). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/614 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](https://github.com/user-attachments/files/27162415/1.patch) Thank you.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#372
No description provided.