Repository navigation
fix(rccl): Don't gate hierarchical CE on hierarchical AllGather sub-communicators - #12215
Closed
thomas-huber wants to merge 1 commit into
Closed
thomas-huber wants to merge 1 commit into
thomas-huber wants to merge 1 commit into
Conversation
…omms ncclHierCeAvailable required hierarchicalCommsInitialized, so hierarchical CE AllGather and AlltoAll were never selected on a communicator that had not built the hierarchical AllGather/ReduceScatter sub-communicators. That includes every communicator on fewer than 8 nodes. The check was added to keep the query-mode reporting in rcclSelectAllGather and rcclSelectAlltoAll from dereferencing those sub-communicators through rcclHierarchicalAlgoInfo, but the same predicate decides live dispatch. Hierarchical CE uses none of them. Remove the check, and report hierarchical CE like the other CE branches rather than through rcclHierarchicalAlgoInfo, whose protocol and channel count describe the kernel-based hierarchical algorithm, not a copy-engine operation. Co-authored-by: Cursor <cursoragent@cursor.com>
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
| EXPECT_EQ(NCCL_PROTO_SIMPLE, decision.protocol) << "query=" << query; | ||
| EXPECT_EQ(0, decision.nMaxChannels) << "query=" << query; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Low
The new tests set CTAPolicy to NCCL_CTA_POLICY_ZERO at line 4495 and never clear it, so nothing pins the comm->config.CTAPolicy & NCCL_CTA_POLICY_ZERO conjunct that branch #3.5 carries, and a change dropping it would still pass. The CE-registered test just above adds exactly this half at line 4472 and gives the reason. Could we add it here and in the AlltoAll twin at line 4527?
Suggested change
| } | |
| // ...and the CTA-policy conjunct itself, as branch #3's test does at line 4472. | |
| comm->config.CTAPolicy = NCCL_CTA_POLICY_DEFAULT; | |
| rcclCollDecision noPolicy{}; | |
| EXPECT_EQ(ncclSuccess, rcclSelectAllGather(comm, nullptr, nullptr, /*sendcount=*/1024, ncclFloat32, | |
| /*stream=*/nullptr, /*query=*/true, /*graphCapturingHint=*/false, | |
| &noPolicy)); | |
| EXPECT_NE((int)rcclAddonAlgos_t::RCCL_CE_REGISTERED, noPolicy.algo) | |
| << "hierarchical CE must require CTA_POLICY_ZERO"; | |
| comm->config.CTAPolicy = NCCL_CTA_POLICY_ZERO; | |
1 task
nawrinsu
approved these changes
Sep 24, 2026
thomas-huber
deleted the
users/thomas-huber/AICOMRCCL-2452-hier-ce-gate
branch
September 30, 2026 03:00
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.
Motivation
Hierarchical CE AllGather and AlltoAll are never selected on a communicator that has not built the hierarchical AllGather/ReduceScatter sub-communicators. That covers every communicator on 2 to 7 nodes, and on 8 or more nodes any communicator with both
RCCL_HIERARCHICAL_*flags off, uneven ranks per node, non-compact rank order, or created by a split. Hierarchical CE does not use those sub-communicators.Technical Details
ncclHierCeAvailable()requiredcomm->hierarchicalCommsInitialized. The check was added in rccl(feat): gfx1250 default mode tuning #10938 to keep a query-mode call torcclHierarchicalAlgoInfo()in the hierarchical CE branches ofrcclSelectAllGatherandrcclSelectAlltoAllfrom dereferencing the sub-communicators. The same predicate decides live dispatch in both selectors and intaskAppend, so it disabled the collective path rather than guarding the report.ncclHierCeAvailable().RCCL_CE_REGISTEREDwithout callingrcclHierarchicalAlgoInfo(), the same as the other CE branches. That function's protocol and channel count describe the kernel-based hierarchical algorithm (for AlltoAll, its ReduceScatter branch), not a copy-engine operation.Issue Tracking
JIRA ID: AICOMRCCL-2452
Test Plan
SelectAllGather_HierCeWithoutHierarchicalSubCommsandSelectAlltoAll_HierCeWithoutHierarchicalSubCommscheck the query and live decisions on a 2-node communicator without sub-communicators, with a control proving the decision comes from the hierarchical CE branch.CeAlltoAllEligibilityTest.MultiNodeHierAvailable_DoesNotYieldDda, which fails on develop, coversncclHierCeAvailable()directly. The two negative hierarchical CE eligibility tests now fail on their own clauses instead of on the removed check.Test Result
CeAlltoAllEligibilityTest.MultiNodeHierAvailable_DoesNotYieldDdanow passes. The remaining failures in that set are pre-existing on develop and unchanged.Submission Checklist