Skip to content

fix(rccl): Correct the P2P LL threshold to maintain existing SIMPLE/LL crossover tuning on AMD systems - #12029

Open
corey-derochie-amd wants to merge 10 commits into
developfrom
users/corey-derochie-amd/aicomrccl-2141_fix-p2p-ll-threshold
Open

corey-derochie-amd wants to merge 10 commits into
developfrom
users/corey-derochie-amd/aicomrccl-2141_fix-p2p-ll-threshold

Conversation

@corey-derochie-amd

@corey-derochie-amd corey-derochie-amd commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

A reproducible regression was detected in All-to-all 1-node shown here
image

The regression was bisected to NCCL 2.29.7 sync commit (#6674). Root cause is a change to the SIMPLE/LL crossover calculation.

Technical Details

Adjusted the calculation to maintain the original AMD crossover point.

Issue Tracking

JIRA ID: AICOMRCCL-2141

Test Plan

This is open for discussion. This is an adjustment to restore original calculation and recover performance. A unit test to specifically guard against changes in tuning might be useful, but ultimately brittle. Please advise.

Test Result

Submission Checklist

@therock-pr-bot

therock-pr-bot Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/rccl/src/enqueue/enqueue.cc, projects/rccl/test/host/enqueue-test.cc; no test file found
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@corey-derochie-amd
corey-derochie-amd force-pushed the users/corey-derochie-amd/aicomrccl-2141_fix-p2p-ll-threshold branch from 5c26314 to f289fc6 Compare September 22, 2026 16:07

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: Worth settling before approval: the widening turns off P2P user-buffer registration for 4 KiB to 64 KiB transfers, so registered or graph-captured alltoall may move the other way.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/src/enqueue/enqueue.cc Resolved
Comment thread projects/rccl/src/enqueue/enqueue.cc Resolved
Comment thread projects/rccl/src/enqueue/enqueue.cc Resolved
@corey-derochie-amd
corey-derochie-amd force-pushed the users/corey-derochie-amd/aicomrccl-2141_fix-p2p-ll-threshold branch 2 times, most recently from 56c94fd to 3041e03 Compare October 15, 2026 20:17

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: Nothing new worth raising; still open from earlier: enqueue.cc:1512 and 1 more. Worth clearing before approval.

Comment @argus review to re-run, or @argus re-review after pushing.

@corey-derochie-amd

Copy link
Copy Markdown
Contributor Author

@argus re-review

@corey-derochie-amd
corey-derochie-amd force-pushed the users/corey-derochie-amd/aicomrccl-2141_fix-p2p-ll-threshold branch from 3041e03 to 4a88061 Compare October 16, 2026 22:15
@amd-argus

amd-argus Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

@corey-derochie-amd the new head (4a88061a) doesn't change any file I'd review. Looks like a merge that didn't touch this PR's own content, so nothing has changed since my last pass above; push a real change and I'll take another look.

@corey-derochie-amd
corey-derochie-amd force-pushed the users/corey-derochie-amd/aicomrccl-2141_fix-p2p-ll-threshold branch from 4a88061 to ab52227 Compare October 22, 2026 19:53

@alex-breslow-amd alex-breslow-amd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to approve, but please add tests.

Comment thread projects/rccl/src/enqueue/enqueue.cc Resolved

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: Nothing new worth raising; still open from earlier: enqueue.cc:1595 and 1 more. Worth clearing before approval.

Comment @argus review to re-run, or @argus re-review after pushing.

@github-actions

This comment was marked as off-topic.

@github-actions

This comment was marked as off-topic.

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: Worth settling before approval: the crossover test skips on arch only, so its LL cases fail on PCIe-only gfx950 (MI350P), and LL in the widened band still gives up P2P user-buffer registration.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/SendRecvTests.cpp Resolved
@github-actions

This comment was marked as off-topic.

@github-actions

This comment was marked as off-topic.

@corey-derochie-amd

corey-derochie-amd commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Going to approve, but please add tests.

@alex-breslow-amd tests added, waiting for CI to complete a test pass.

@corey-derochie-amd corey-derochie-amd changed the title Correct the P2P LL threshold to maintain existing SIMPLE/LL crossover tuning on AMD systems fix(rccl): Correct the P2P LL threshold to maintain existing SIMPLE/LL crossover tuning on AMD systems Oct 27, 2026

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: Worth settling before approval: the new Gfx94 tests pin neither the nNodes/isAllNvlink/LL128 conjuncts nor the p2pChunkSize/8 term, and LL in the widened band still gives up P2P user-buffer registration.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/host/enqueue-test.cc Resolved
Comment thread projects/rccl/test/host/enqueue-test.cc Resolved
@github-actions

This comment was marked as off-topic.

@github-actions

This comment was marked as off-topic.

Comment thread projects/rccl/src/enqueue/enqueue.cc Resolved
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 5, 2026
@corey-derochie-amd

Copy link
Copy Markdown
Contributor Author

@amd-argus re-review

@corey-derochie-amd
corey-derochie-amd force-pushed the users/corey-derochie-amd/aicomrccl-2141_fix-p2p-ll-threshold branch from a8f6b36 to 8ec62af Compare November 5, 2026 14:36

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

@github-actions

This comment was marked as off-topic.

@github-actions

This comment was marked as off-topic.

corey-derochie-amd and others added 9 commits November 6, 2026 10:31
The selection rule is unchanged. State the gfx942/gfx950 cap and the
exceptions for a set NCCL_P2P_LL_THRESHOLD and the LL128 path.
…otests

Replace the process-isolated SendRecvTests that latched NCCL_P2P_LL_THRESHOLD
with focused EnqueueMicrotest cases around addP2pToPlan. This lets the test
verify the widened LL cap (up to 64 KiB/peer) and the user-threshold fallback
without relying on debug-log parsing or process isolation.

Also make the user-threshold check read NCCL_P2P_LL_THRESHOLD on every call,
so a later set or unset is visible.
nNodes, isAllNvlink, and the LL128 opt-in each keep 32 KiB on SIMPLE.
Dropping any of those checks would select LL, and the new cases fail.

Co-authored-by: Cursor <cursoragent@cursor.com>
A 256 KiB chunk stops LL at 32 KiB. A 1 MiB chunk stays capped at 64 KiB.
The default 512 KiB chunk makes those two bounds equal.

Co-authored-by: Cursor <cursoragent@cursor.com>
ncclLoadParam already ignores NCCL_P2P_LL_THRESHOLD when the value is
empty and uses the default. The widen now uses that same rule, and
keeps reading it on each call so a later set or unset stays visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
NCCL_P2P_LL_THRESHOLD is documented in the user guide, not in
env-variables.rst. Describe the unset single-node cap and add the
changelog entry for the regression fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@corey-derochie-amd
corey-derochie-amd force-pushed the users/corey-derochie-amd/aicomrccl-2141_fix-p2p-ll-threshold branch from 8e863ce to a4479a2 Compare November 6, 2026 16:50
@corey-derochie-amd

Copy link
Copy Markdown
Contributor Author

@amd-argus re-review

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

Comment thread projects/rccl/test/host/enqueue-test.cc Resolved
nNodes > 1 asks rcclParamPxnOptQpUsage, which the host fake aborts on.
Disable PXN for that case, matching the production default, so the
channel base is computed and the test can check the protocol.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

This comment was marked as off-topic.

@github-actions

This comment was marked as off-topic.

@amd-argus amd-argus Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARGUS

Bottom line: LGTM.

Comment @argus review to re-run, or @argus re-review after pushing.

@github-actions

This comment was marked as off-topic.

@github-actions

This comment was marked as off-topic.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation organization: ROCm project: rccl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants