[PR #543] Fix check_nvlink_connections called with None group #626

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

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/543
Author: @yurekami
Created: 12/25/2025
Status: 🔄 Open

Base: main ← Head: fix-nvlink-check-none-group


📝 Commits (1)

  • c803674 Fix check_nvlink_connections called with None group

📊 Changes

1 file changed (+1 additions, -2 deletions)

View changed files

📝 deep_ep/buffer.py (+1 -2)

📄 Description

Summary

  • Fixed a bug where check_nvlink_connections(group) was called before validating that group is not None
  • This caused an AttributeError when users used the comm (mpi4py) parameter instead of group

Problem

# In Buffer.__init__:
check_nvlink_connections(group)  # Called here, but group can be None!

if group is not None:
    # ... handle group
elif comm is not None:
    # ... handle comm

When group=None and comm is provided, check_nvlink_connections would fail trying to call group.size().

Solution

Moved check_nvlink_connections(group) inside the if group is not None: block.

Changes

  • deep_ep/buffer.py - Moved NVLink check after None validation

Test plan

  • Create Buffer with group=None, comm=<mpi4py comm> and verify no AttributeError
  • Create Buffer with valid group and verify NVLink check still runs

🤖 Generated with Claude Code


🔄 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/543 **Author:** [@yurekami](https://github.com/yurekami) **Created:** 12/25/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-nvlink-check-none-group` --- ### 📝 Commits (1) - [`c803674`](https://github.com/deepseek-ai/DeepEP/commit/c8036741d86e20a46530f74887993eca36e4ce97) Fix check_nvlink_connections called with None group ### 📊 Changes **1 file changed** (+1 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `deep_ep/buffer.py` (+1 -2) </details> ### 📄 Description ## Summary - Fixed a bug where `check_nvlink_connections(group)` was called before validating that `group` is not `None` - This caused an `AttributeError` when users used the `comm` (mpi4py) parameter instead of `group` ## Problem ```python # In Buffer.__init__: check_nvlink_connections(group) # Called here, but group can be None! if group is not None: # ... handle group elif comm is not None: # ... handle comm ``` When `group=None` and `comm` is provided, `check_nvlink_connections` would fail trying to call `group.size()`. ## Solution Moved `check_nvlink_connections(group)` inside the `if group is not None:` block. ## Changes - `deep_ep/buffer.py` - Moved NVLink check after None validation ## Test plan - [ ] Create Buffer with `group=None, comm=<mpi4py comm>` and verify no AttributeError - [ ] Create Buffer with valid `group` and verify NVLink check still runs 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <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#626
No description provided.