A more reasonable way to obtain RDMA devices#36
Merged
weixiao-huang merged 15 commits intoMoonshotAI:mainfrom Oct 20, 2025
Merged
A more reasonable way to obtain RDMA devices#36weixiao-huang merged 15 commits intoMoonshotAI:mainfrom
weixiao-huang merged 15 commits intoMoonshotAI:mainfrom
Conversation
…nd port specifications for RDMA devices. https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/env.html#id8
…nt-engine into detect_RDMA_devices
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new NCCL_IB_HCA parser to support more sophisticated RDMA device selection, including exact match (=), exclude (^) prefix, and port specifications (:) syntax as documented in NVIDIA's NCCL user guide.
Key changes:
- Replaced simple substring matching with comprehensive parsing logic in
_parse_NCCL_IB_HCA() - Added helper function
_resolve_device_specs()to handle device name resolution and port specifications - Implemented comprehensive test coverage for various parsing scenarios
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| checkpoint_engine/ps.py | Refactored RDMA device selection logic by replacing inline filtering with dedicated parsing functions that support NCCL_IB_HCA syntax |
| tests/test_rdma_parser.py | Added comprehensive test suite covering basic parsing, pattern matching, error cases, and device allocation scenarios |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…nt-engine into detect_RDMA_devices
Collaborator
|
cc @whybeyoung plz have a look |
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.
resolve: #35
_parse_NCCL_IB_HCA method added, supporting exact match( "=" ), exclude( "^" ) prefix. Port specifications( ":" ) is not supported because mooncake transfer engine doesn't support it yet.
https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/env.html#id8