[PR #713] Handle missing bandwidth in SM estimation #726

Open
opened 2026-10-27 21:05:39 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/713
Author: @Mr-Neutr0n
Created: 8/3/2026
Status: 🔄 Open

Base: main ← Head: fix/sm-estimate-missing-bandwidth


📝 Commits (3)

  • 1577218 Handle missing bandwidth in SM estimation
  • d17262c test: isolate DeepEP module stubs
  • fd6949e Address review suggestions for bandwidth fallback

📊 Changes

2 files changed (+111 additions, -3 deletions)

View changed files

📝 deep_ep/buffers/ep.py (+14 -3)
➕ tests/utils/test_elastic_host.py (+97 -0)

📄 Description

Problem

ElasticBuffer.get_theoretical_num_sms divides modeled traffic by detected RDMA and NVLink bandwidth. Both detection helpers use 0 to report that bandwidth detection failed, so a hybrid topology can raise ZeroDivisionError before returning an SM estimate.

Fix

  • treat traffic over an unknown-bandwidth link as unbounded transfer time when selecting the bottleneck
  • retain the conservative full-device SM count when the selected bottleneck bandwidth is unavailable
  • leave known-bandwidth modeling unchanged

Regression coverage

The host-only test models a 16-rank hybrid topology with both bandwidth detectors returning 0. Current main raises; this branch returns all 132 device SMs. Its fake DeepEP modules are restored after loading so the test does not pollute the wider process.

Validation

  • python -m unittest tests.utils.test_elastic_host
  • ruff check tests/utils/test_elastic_host.py
  • Python compilation and git diff --check

Prepared with OpenAI Codex assistance; I reproduced the zero-bandwidth failure and reviewed the fallback behavior.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepEP/pull/713 **Author:** [@Mr-Neutr0n](https://github.com/Mr-Neutr0n) **Created:** 8/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/sm-estimate-missing-bandwidth` --- ### 📝 Commits (3) - [`1577218`](https://github.com/deepseek-ai/DeepEP/commit/15772189282948ff6a2c1561d589e51dfde92c34) Handle missing bandwidth in SM estimation - [`d17262c`](https://github.com/deepseek-ai/DeepEP/commit/d17262c2485286b5bdc9400cbedf38e80b1b7111) test: isolate DeepEP module stubs - [`fd6949e`](https://github.com/deepseek-ai/DeepEP/commit/fd6949e93faa9fc06037ecf7d045b215be03e0c4) Address review suggestions for bandwidth fallback ### 📊 Changes **2 files changed** (+111 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `deep_ep/buffers/ep.py` (+14 -3) ➕ `tests/utils/test_elastic_host.py` (+97 -0) </details> ### 📄 Description ## Problem `ElasticBuffer.get_theoretical_num_sms` divides modeled traffic by detected RDMA and NVLink bandwidth. Both detection helpers use `0` to report that bandwidth detection failed, so a hybrid topology can raise `ZeroDivisionError` before returning an SM estimate. ## Fix - treat traffic over an unknown-bandwidth link as unbounded transfer time when selecting the bottleneck - retain the conservative full-device SM count when the selected bottleneck bandwidth is unavailable - leave known-bandwidth modeling unchanged ## Regression coverage The host-only test models a 16-rank hybrid topology with both bandwidth detectors returning `0`. Current `main` raises; this branch returns all 132 device SMs. Its fake DeepEP modules are restored after loading so the test does not pollute the wider process. ## Validation - `python -m unittest tests.utils.test_elastic_host` - `ruff check tests/utils/test_elastic_host.py` - Python compilation and `git diff --check` Prepared with OpenAI Codex assistance; I reproduced the zero-bandwidth failure and reviewed the fallback behavior. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#726
No description provided.