Add IPC domain rank detection#824
Merged
Merged
Conversation
Expose the number of ranks in each GPU IPC domain through Bootstrap and Python bindings, using NVML fabric information on CUDA when available and falling back to host-local ranks otherwise. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new “IPC domain” concept to Bootstrap, exposing the number of ranks that share a GPU IPC domain (using NVML GPU fabric info on CUDA when available, otherwise falling back to host-local grouping), and wires it through to the Python bindings.
Changes:
- Add
Bootstrap::getNranksPerIpcDomain()API with TcpBootstrap implementation that groups ranks by an IPC-domain hash. - Implement CUDA IPC-domain hashing via NVML GPU fabric info with fallback to host hash.
- Expose the new API in Python bindings and add a basic mp_unit test.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/mp_unit/mp_unit_tests.hpp | Declares the new IPC-domain bootstrap test helper. |
| test/mp_unit/bootstrap_tests.cc | Adds a simple assertion-based test for the new IPC-domain API and updates the MPI test bootstrap to override it. |
| src/core/utils_internal.cc | Adds NVML-based fabric hashing (CUDA) and exposes getIpcDomainHash() with fallback behavior. |
| src/core/include/utils_internal.hpp | Declares getIpcDomainHash() for internal callers. |
| src/core/bootstrap/bootstrap.cc | Adds base default and TcpBootstrap implementation of getNranksPerIpcDomain(). |
| python/mscclpp/_core/comm.py | Exposes IPC-domain rank count on the Python Comm wrapper. |
| python/csrc/core_py.cpp | Binds get_n_ranks_per_ipc_domain into the Python extension module. |
| include/mscclpp/core.hpp | Extends the public C++ Bootstrap API with getNranksPerIpcDomain(). |
| CMakeLists.txt | Links NVML on CUDA builds to support the new NVML-based query path. |
Contributor
Author
|
/azp run mscclpp-ut |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Empyreus
reviewed
Jun 29, 2026
Empyreus
approved these changes
Jun 29, 2026
caiomcbr
reviewed
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose the number of ranks in each GPU IPC domain through Bootstrap and Python bindings, using NVML fabric information on CUDA when available and falling back to host-local ranks otherwise.