Use ncclx::Hints for NCCLx-specific config#1017
Open
pavanbalaji wants to merge 4 commits intometa-pytorch:mainfrom
Open
Use ncclx::Hints for NCCLx-specific config#1017pavanbalaji wants to merge 4 commits intometa-pytorch:mainfrom
pavanbalaji wants to merge 4 commits intometa-pytorch:mainfrom
Conversation
Contributor
|
@pavanbalaji has exported this pull request. If you are a Meta employee, you can view the originating Diff in D95972679. |
6f09c20 to
88bdc2a
Compare
pavanbalaji
added a commit
to pavanbalaji/torchcomms-1
that referenced
this pull request
Mar 11, 2026
Summary: Pull Request resolved: meta-pytorch#1017 In populateNcclConfigFromHints, NCCLx-specific parameters (ncclAllGatherAlgo, lazySetupChannels, fastInitMode) were being set directly on the ncclConfig_t struct fields. This bypasses the ncclx::Hints API which is the intended mechanism for passing NCCLx-specific configuration. Change upstream NCCL config fields (blocking, cgaClusterSize, minCTAs, etc.) to continue being set directly on the config struct, while NCCLx-specific fields are now passed via an ncclx::Hints object attached to config.hints. Also update isFastInitEnable/useFastInit to check the hints object for fastInitMode since it is no longer set directly on the config struct. Reviewed By: minsii Differential Revision: D95972679
88bdc2a to
4fcae89
Compare
pavanbalaji
added a commit
to pavanbalaji/torchcomms-1
that referenced
this pull request
Mar 11, 2026
Summary: Pull Request resolved: meta-pytorch#1017 In populateNcclConfigFromHints, NCCLx-specific parameters (ncclAllGatherAlgo, lazySetupChannels, fastInitMode) were being set directly on the ncclConfig_t struct fields. This bypasses the ncclx::Hints API which is the intended mechanism for passing NCCLx-specific configuration. Change upstream NCCL config fields (blocking, cgaClusterSize, minCTAs, etc.) to continue being set directly on the config struct, while NCCLx-specific fields are now passed via an ncclx::Hints object attached to config.hints. Also update isFastInitEnable/useFastInit to check the hints object for fastInitMode since it is no longer set directly on the config struct. Reviewed By: minsii Differential Revision: D95972679
4fcae89 to
b69ec64
Compare
Summary: Each public comm-creation API now immediately creates a guaranteed non-null internalConfigPtr (using the user-passed config or a default) and calls ncclxParseCommConfig on it. This ensures each communicator gets a freshly allocated ncclx::Config with sole ownership, preventing a double-free when callers reuse the same ncclConfig_t for multiple comms. Public APIs updated: ncclCommInitRank, ncclCommInitAll, ncclCommInitRankConfig, ncclCommInitRankScalable, ncclCommSplit, ncclCommShrink, and ncclCommGrow (v2_29). Inside ncclxParseCommConfig, assert that config is non-null and ncclxConfig is still at NCCL_CONFIG_UNDEF_PTR, rather than silently returning or doing an idempotency check. Removed ncclxParseCommConfig call from ncclCommInitChildComm (private helper) since the public caller already did it. Reviewed By: minsii Differential Revision: D95714601
Summary: Add unit tests exercising ncclxParseCommConfig, covering flat ncclConfig_t fields, hints-based configuration, default values, idempotency, and conflict detection between flat fields and hints. Applied identically to v2_27, v2_28, and v2_29. Reviewed By: minsii Differential Revision: D95714600
Summary: Strip the "ncclx::" prefix in Hints::set() and Hints::get() so that callers can use either "fastInitMode" or "ncclx::fastInitMode" interchangeably. The prefix is stripped before key matching, storage, and lookup, so the internal map always uses bare key names (compatible with ncclxParseCommConfig). Reviewed By: minsii Differential Revision: D95972681
Summary: In populateNcclConfigFromHints, NCCLx-specific parameters (ncclAllGatherAlgo, lazySetupChannels, fastInitMode) were being set directly on the ncclConfig_t struct fields. This bypasses the ncclx::Hints API which is the intended mechanism for passing NCCLx-specific configuration. Change upstream NCCL config fields (blocking, cgaClusterSize, minCTAs, etc.) to continue being set directly on the config struct, while NCCLx-specific fields are now passed via an ncclx::Hints object attached to config.hints. Also update isFastInitEnable/useFastInit to check the hints object for fastInitMode since it is no longer set directly on the config struct. Reviewed By: minsii Differential Revision: D95972679
b69ec64 to
8e0d3fe
Compare
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.
Summary:
In populateNcclConfigFromHints, NCCLx-specific parameters
(ncclAllGatherAlgo, lazySetupChannels, fastInitMode) were being
set directly on the ncclConfig_t struct fields. This bypasses the
ncclx::Hints API which is the intended mechanism for passing
NCCLx-specific configuration.
Change upstream NCCL config fields (blocking, cgaClusterSize,
minCTAs, etc.) to continue being set directly on the config
struct, while NCCLx-specific fields are now passed via an
ncclx::Hints object attached to config.hints.
Also update isFastInitEnable/useFastInit to check the hints
object for fastInitMode since it is no longer set directly on
the config struct.
Differential Revision: D95972679