[PR #1270] [CLOSED] [TE/topology]Implement PCIe Root Complex detection for optimal GPU-InfiniBand pairing #2122

Closed
opened 2026-10-29 21:32:57 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/Mooncake/pull/1270
Author: @luketong777
Created: 12/24/2025
Status: ❌ Closed

Base: main ← Head: add_pcie_root


📝 Commits (4)

  • 4711f93 Add PCIe root complex aware HCA selection
  • ffad9d0 fix func getCommonParent
  • 081fe99 fix func discoverCudaTopology
  • fc13492 Format: Adjust code formatting for clang-format compliance

📊 Changes

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

View changed files

📝 mooncake-transfer-engine/src/topology.cpp (+79 -2)

📄 Description

Description

This feature identifies and determines whether GPU devices and InfiniBand (IB) devices are located under the same PCIe Root Complex.

  1. PCIe Topology Discovery
    The isSamePcieRootComplex function determines whether two PCI devices are under the same root complex
    Uses getCommonParent and isPciRootComplex functions for path analysis
  2. Device Association Optimization
    In the discoverCudaTopology function, prioritizes IB devices that share the same PCIe root with the GPU
    Establishes mapping relationships from GPUs to optimal IB devices to optimize data transfer paths

Type of Change

  • Types
    • Bug fix
    • New feature
      • Transfer Engine
      • Mooncake Store
      • Mooncake EP
      • Integration
      • P2P Store
      • Python Wheel
    • Breaking change
    • CI/CD
    • Documentation update
    • Other

How Has This Been Tested?

I have tested the PCIe root identification functionality using simulated parameters, covering basic functional scenarios and edge cases. However, this feature still requires validation testing in a real hardware environment where GPU and IB devices are located under the same PCIe root complex.

Checklist

  • I have performed a self-review of my own code.
  • I have updated the documentation.
  • I have added tests to prove my changes are effective.

🔄 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/kvcache-ai/Mooncake/pull/1270 **Author:** [@luketong777](https://github.com/luketong777) **Created:** 12/24/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `add_pcie_root` --- ### 📝 Commits (4) - [`4711f93`](https://github.com/kvcache-ai/Mooncake/commit/4711f93626f3636939921d8a3cbca117d1ea9275) Add PCIe root complex aware HCA selection - [`ffad9d0`](https://github.com/kvcache-ai/Mooncake/commit/ffad9d09db353e6147658b0131423987709877e3) fix func getCommonParent - [`081fe99`](https://github.com/kvcache-ai/Mooncake/commit/081fe99a315b35214bbc5589036282063b01e55b) fix func discoverCudaTopology - [`fc13492`](https://github.com/kvcache-ai/Mooncake/commit/fc1349260ac093c182f4196a74cbb03559d086d2) Format: Adjust code formatting for clang-format compliance ### 📊 Changes **1 file changed** (+79 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `mooncake-transfer-engine/src/topology.cpp` (+79 -2) </details> ### 📄 Description ## Description This feature identifies and determines whether GPU devices and InfiniBand (IB) devices are located under the same PCIe Root Complex. 1. **PCIe Topology Discovery** The isSamePcieRootComplex function determines whether two PCI devices are under the same root complex Uses getCommonParent and isPciRootComplex functions for path analysis 2. **Device Association Optimization** In the discoverCudaTopology function, prioritizes IB devices that share the same PCIe root with the GPU Establishes mapping relationships from GPUs to optimal IB devices to optimize data transfer paths <!-- A clear and concise description of the changes. Link to any relevant issues. --> ## Type of Change * Types - [ ] Bug fix - [x] New feature - [x] Transfer Engine - [ ] Mooncake Store - [ ] Mooncake EP - [ ] Integration - [ ] P2P Store - [ ] Python Wheel - [ ] Breaking change - [ ] CI/CD - [ ] Documentation update - [ ] Other ## How Has This Been Tested? I have tested the PCIe root identification functionality using simulated parameters, covering basic functional scenarios and edge cases. However, this feature still requires validation testing in a real hardware environment where GPU and IB devices are located under the same PCIe root complex. <!-- Please describe the tests you've run to verify your changes. --> ## Checklist - [ ] I have performed a self-review of my own code. - [ ] I have updated the documentation. - [ ] I have added tests to prove my changes are effective. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:32:57 +00:00
Sign in to join this conversation.
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
kvcache-ai/Mooncake#2122
No description provided.