Skip to content

[RCCL] gfx1250 AllToAll in place: never return wrong data - #13461

Open
thananon wants to merge 10 commits into
developfrom
users/thananon/gfx1250-a2a-inplace-guard
Open

thananon wants to merge 10 commits into
developfrom
users/thananon/gfx1250-a2a-inplace-guard

Conversation

@thananon

@thananon thananon commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

JIRA ID : AICOMRCCL-3440

Branch users/thananon/gfx1250-a2a-inplace-guard, merged with develop 4ed21d8. Standalone; independent of the gfx1250
MNNVL registration / ncclMemAlloc PR and of the unroll-8 PR.

Summary

On gfx1250, in-place ncclAlltoAll that the DDA fabric LL / LL128 paths do not take falls back to per-peer Send/Recv, which is wrong in place (every size >= 1 MiB at 8 and 16 ranks, eager and graph; 773,991,356 wrong words on a 1 GiB misaligned in-place call).

With this change an in-place AllToAll on gfx1250 either runs a correct path (DDA fabric LL / LL128, or CE-Scratch through ddaScratch) or returns ncclInvalidUsage with a WARN that names the API and the reason. It never decomposes into Send/Recv in place.

The hazard is not gfx1250-specific. The in-place Send/Recv decomposition has no ordering between "our send has read byte b" and "our recv writes byte b" on any transport (P2P, net, graph-captured user buffers). Only MNNVL P2P at 8 / 16 ranks was measured wrong. "Other architectures are unchanged" means they keep the race; this PR fixes gfx1250 only, and the upstream issue should cover the p2p in-place decomposition, not only registered-window CE.

Change

  • rccl_wrap.cc, rccl_common.h: three gfx1250-only helpers shared by every AllToAll funnel. rcclAlltoAllCeScratchInPlace keeps CE-Scratch for in place wherever it fits, although the gfx1250 table does not force CE-Scratch. rcclAlltoAllRegisteredCeRefused keeps in place off the registered-window and hierarchical CE AllToAll. rcclAlltoAllInPlaceGuard returns ncclInvalidUsage + WARN.
  • rcclSelectAlltoAll: the CE-Scratch exception (in place it also ignores the ceNonRegMin / ceNonRegMax size window that gates forced CE-Scratch), the registered-CE skip, and the guard before the p2p fallback (live calls only; queries keep naming the fallback). The refusal goes through ncclGroupErrCheck, so inside ncclGroupStart/End it fails the group, as the taskAppend-site refusal does.
  • The WARN names the API and the reason. On a comm without ddaFabricMemHandler it says "this communicator has no DDA fabric scratch (child comm from split/shrink/grow, MNNVL off, multi-clique, or DDA disabled)" instead of pointing at alignment.
  • enqueue.cc taskAppend: ncclAlltoAllConfig (no decision) gets the same CE-Scratch exception and registered-CE refusal. The guard runs before the Send/Recv decomposition. rawTaskAppend (NCCL_ENQUEUE_REARCH_ENABLE) runs it before lowering.
  • ce_coll.cc: on fabric comms, a CE-Scratch AllToAll zeroes the staged scratch range and syncs once more after the copy-back. The LL / LL128 kernels poll flags in the same scratch with no entry barrier, so a peer's next LL kernel could otherwise overwrite the scratch mid copy-back or accept stale payload as a flag. This is a separate, pre-existing hazard (CE-Scratch followed by an LL kernel, reachable on develop with RCCL_FORCE_CE=1 / CTA_POLICY_ZERO). It is fixed here because this PR makes CE-Scratch default-reachable for in place. Eager only: CE-Scratch is never selected under graph capture.
  • CHANGELOG.md: one "Changed" bullet.

What changes on develop (gfx1250 in place only)

case develop this PR
fabric LL (<= 64 KiB) / LL128 V1 (<= 1 MiB), fp32/fp16/bf16, P % 16 == 0 LL / LL128 unchanged
any other in-place call that fits ddaScratch (8r ~546 MiB, 16r 1 GiB) Send/Recv, wrong >= 1 MiB CE-Scratch (correct, slower)
above the scratch, RCCL_FORCE_CE=0, or under graph capture Send/Recv, wrong ncclInvalidUsage
NCCL_CHECK_MODE Send/Recv, wrong CE-Scratch if it fits (measured 32 KiB / 8 MiB / 64 MiB: 0 wrong), else ncclInvalidUsage (1 GiB)
ncclAlltoAllConfig Send/Recv CE-Scratch if it fits (even LL sizes), else ncclInvalidUsage
NCCL_ENQUEUE_REARCH_ENABLE Send/Recv ncclInvalidUsage (REARCH has no CE AllToAll)
CTA_POLICY_ZERO + registered windows registered CE (races on the user buffer) ncclInvalidUsage

NCCL_ALGO is ignored for the in-place CE-Scratch route (correctness over a hint), unlike the forced CE-Scratch arm, which NCCL_ALGO still blocks.

By communicator type (gfx1250, in place, count > 0, nRanks > 1)

ddaScratch and the fabric LL / LL128 paths exist only on a root comm that passes ncclDdaFabricCommInit (!parent && !isGrow, comm->MNNVL == 1, 2 <= nRanks <= 144, one clique, DDA scratch size > 0, VMM allocation succeeds). gfx1250 has no IPC DDA fallback.

comm develop this PR
A. root comm, MNNVL, one clique, DDA on, CE driver, symmetricSupport LL <= 64 KiB / LL128 <= 1 MiB fast paths. Elsewhere Send/Recv: wrong >= 1 MiB (measured), small sizes probably correct LL / LL128 unchanged. Other sizes up to the scratch (8r ~546 MiB, 16r 1 GiB): CE-Scratch (correct). Above the scratch, under capture, RCCL_FORCE_CE=0, registered windows: ncclInvalidUsage
A in a group, or launchOrderImplicit=1 Send/Recv at every size CE-Scratch where it fits, else ncclInvalidUsage (the 64 KiB LL case included); a refusal fails ncclGroupEnd
A, check mode Send/Recv (diverted) CE-Scratch if it fits, else ncclInvalidUsage
A without CE (old driver, NCCL_WIN_ENABLE=0, no symmetricSupport) LL / LL128, else Send/Recv wrong LL / LL128 only, everything else ncclInvalidUsage
B. child comm (ncclCommSplit / ncclCommShrink / ncclCommGrow) of A Send/Recv over the same MNNVL P2P: wrong >= 1 MiB (inferred, same transport) ncclInvalidUsage at every size: no fabric handler, no scratch
C. MNNVL off (NCCL_MNNVL_ENABLE=0, NCCL_P2P_LEVEL=0, NCCL_CUMEM_ENABLE=0, build without HIP_FABRIC_API, fabric not ACTIVE/READY, zero UUID) Send/Recv (P2P intra-tray, net cross-tray). Structurally racy; measured 0 wrong at 8r 4 MiB (the race did not fire there) ncclInvalidUsage at every size
D. multi-clique comm (cross-vPod) Send/Recv over P2P and net, structurally racy ncclInvalidUsage at every size
E. RCCL_DDA_ENABLE=0, RCCL_DDA_FABRIC_BUFFER_SIZE=0, scratch OOM, nRanks > 144 Send/Recv ncclInvalidUsage at every size
nRanks == 1 or count == 0 ok ok

Row B is the one most users would hit: PyTorch device-mesh subgroups are created with ncclCommSplit. Whether torch on ROCm reaches ncclAllToAll with send == recv is unverified. A staged fallback (copy the send region to a comm-owned temp, then out-of-place Send/Recv) would close B-E and is the planned follow-up.

Large in-place and in-place under capture on row A stay ncclInvalidUsage until a correct fast path covers them; nothing in this PR closes B-E.

Out of place: unchanged, except the CE-Scratch AllToAll on fabric comms (explicit RCCL_FORCE_CE=1 / CTA_POLICY_ZERO) gains one T-byte memset and one CE barrier.

Notes for reviewers

  • In place means sendbuff == recvbuff. Overlapping but unequal buffers are undefined in NCCL and not detected.
  • In-place-ness, pointer alignment and registration must be the same on every rank (collective contract). They are rank-local selection inputs, so a rank-asymmetric call picks different paths and hangs. Registration was already such an input on develop. In-place-ness is new for unregistered buffers: on develop the gfx1250 DDA predicates ignore the buffer pointers, so a mixed call (some ranks in place, some not) took the same path everywhere and completed, with wrong data on the in-place ranks. With this PR an in-place rank takes CE-Scratch or refuses while an out-of-place peer takes Direct, so the mixed call hangs instead.
  • Registered-window CE in place is racy on every arch (each chunk is pushed into the peer's recv window while the peer may still read it). This PR changes gfx1250 only; an upstream issue follows.
  • ncclAlltoAllv in place is out of scope: it is not guarded and has the same hazard.
  • GIN-SDMA / GDA / Pivot are not reachable on gfx1250 trays (GDA and GIN-SDMA need ENABLE_ROCSHMEM[_GIN], Pivot needs the Rome topology). None of them has an in-place answer, so the guarantee is stated for builds without them.
  • The F2 memset + barrier covers AllToAll only. AllGather / Gather / Scatter CE-Scratch share the hazard but reach it on gfx1250 only with an explicit RCCL_FORCE_CE=1 / CTA_POLICY_ZERO; that is deferred.
  • rccl-tests runs half its warm-up in place whatever -O says. A gfx1250 in-place shape with no correct path therefore fails alltoall_perf at warm-up; use -w 0 -O 1 for such cells.

Test plan

  • Host microtests, HIP_VISIBLE_DEVICES=-1: after merging develop (incl. test(rccl): assert RCCL's real one-RPN AllGather behaviour #14579): Micro 3020/3020, MicroEnqueue 264/264, MicroCe 72/72, MicroInit 739/739, MicroTaskPrep 421/421. New: in-place helpers, guard WARN per site / reason (incl. the no-fabric-scratch comm), selector refusal inside a group sets ncclGroupError and fails ncclGroupEndInternal with nothing queued, grouped in-place CE-Scratch, selector CE-Scratch / registered-window / no-path cases, 12 taskAppend AllToAll cases (incl. a captured, check-mode-diverted DDA decision that must not take CE-Scratch) (Config, REARCH, forced arm, NCCL_ALGO, decided fabric incl. the check-mode CE-Scratch route, registered windows), CE-Scratch trace (copy-back, memset, barrier on one stream). Mutation-checked.
  • gfx1250 DPX, 8 ranks, this branch alone vs develop, in place, uint32, device-validated (wrong = mismatching 32-bit words):
in-place call develop this PR
4 MiB aligned 109,696 wrong 0 wrong
4 MiB misaligned (+4 B) 1,855 wrong 0 wrong
4 MiB + 32 B (P % 16 = 4) — 0 wrong
64 MiB 11,348,800 wrong 0 wrong
400 MiB — 0 wrong
520 MiB misaligned (below the 8r scratch) — 0 wrong
610 MiB misaligned (above the scratch) — ncclInvalidUsage
1 GiB 1,309,933,024 wrong ncclInvalidUsage
64 MiB under graph capture 42,156,896 wrong ncclInvalidUsage (out of place captures fine, 0 wrong)
NCCL_MNNVL_ENABLE=0, 4 MiB / 64 MiB 0 wrong at 4 MiB ncclInvalidUsage
ncclAlltoAllConfig 32 MiB misaligned / 512 MiB — 0 wrong (CE-Scratch)
ncclAlltoAllConfig 576 MiB (above the scratch) — ncclInvalidUsage
NCCL_CHECK_MODE 32 KiB / 8 MiB / 64 MiB / 1 GiB — 0 wrong / 0 / 0 / ncclInvalidUsage
NCCL_ENQUEUE_REARCH_ENABLE=1 64 KiB / 32 MiB — ncclInvalidUsage
  • ncclAlltoAllConfig in place on the full gfx1250 AllToAll stack (same guard code): before this change 2,507,967 / 32,232,448 / 597,874,624 / 675,664,352 wrong at 32 MiB / 64 MiB / 512 MiB / 576 MiB; after, 0 wrong, and 576 MiB+ returns ncclInvalidUsage.
  • CE-Scratch scratch hazard (CE-Scratch in place, then with no host sync an LL AllToAll, an LL128 AllToAll and an AllReduce, 2000 iterations, small-integer int32, 8r, full stack): 896 wrong without the zero + sync, 0 with it. Cost on the in-place CE-Scratch path (us/call, median of 5 x 30 calls, max over ranks): 64 MiB 308 -> 365 (+18%), 128 MiB 550 -> 626 (+14%), 256 MiB 1035 -> 1146 (+11%), 400 MiB 1614 -> 1811 (+12%). Only this fallback path pays it.

Still owed (follow-up runs, not blocking review):

  • 16 ranks across two trays: the same in-place table, plus 1000 x {in-place CE A2A, OOP LL AG, in-place CE A2A, AR LL128} barrier balance.
  • Grouped in place at 4 MiB+4 B / 64 MiB (CE-Scratch) and above the scratch (ncclGroupEnd -> ncclInvalidUsage).
  • CTA_POLICY_ZERO + window-registered in place: needs the MNNVL registration PR to register windows on gfx1250, so it is validated there.
  • Row B: 8r root split into 2 x 4, in place: ncclInvalidUsage + the no-fabric-scratch WARN.

Refs: an upstream issue for the in-place Send/Recv decomposition and registered-window CE AllToAll in place will follow.

On gfx1250 the per-peer Send/Recv decomposition that AllToAll falls back to
is wrong in place (measured at every size >= 1 MiB, 8 and 16 ranks, eager
and graph). In place now either takes a correct path or fails:

- rcclSelectAlltoAll: in place keeps CE-Scratch wherever it fits ddaScratch
  even though the gfx1250 table does not force CE-Scratch
  (rcclAlltoAllCeScratchInPlace; RCCL_FORCE_CE=0 still turns it off).
  Otherwise ncclInvalidUsage with a WARN that names the API and the reason
  (rcclAlltoAllInPlaceGuard); a comm without a DDA fabric scratch (split /
  shrink / grow child, MNNVL off, multi-clique, DDA off) is named as such.
  The refusal goes through ncclGroupErrCheck, so it fails an enclosing
  group. Queries keep naming the fallback.
- Registered windows (CTA_POLICY_ZERO): in place skips the registered-window
  CE AllToAll and hierarchical CE on gfx1250 (both race on the user buffer;
  rcclAlltoAllRegisteredCeRefused).
- taskAppend: ncclAlltoAllConfig (no decision) gets the same CE-Scratch
  exception and the same refusal of the symmetric-window CE arm; the guard
  runs before the Send/Recv decomposition for every AllToAll.
- NCCL_ENQUEUE_REARCH_ENABLE: guard before the lowering, which always
  decomposes AllToAll into Send/Recv.
- CE-Scratch AllToAll on fabric comms: zero the staged scratch range and
  sync once more after the copy-back. The LL / LL128 kernels poll flag
  words in the same scratch with no entry barrier.
- CHANGELOG entry.

Other arches: unchanged (the helpers are gfx1250-only).
@thananon
thananon requested review from a team and a balanced review from Copilot October 14, 2026 14:30
@therock-pr-bot

therock-pr-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ✅ Pass —
🚫 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?

@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

Copilot AI 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.

🟡 Changes recommended

Check mode can incorrectly reject eligible CE-Scratch calls, and the LL128 alignment model diverges from production eligibility.

2 open findings
What changed in this PR

Guards gfx1250 in-place AllToAll against unsafe Send/Recv fallback, using CE-Scratch where possible and rejecting unsupported cases.

Changes:

  • Adds shared in-place selection guards and CE-Scratch fallback.
  • Clears and synchronizes fabric scratch after CE AllToAll.
  • Adds host tests and release documentation.
File Description
projects/​rccl/​src/​rccl_wrap.cc Adds selection guards and warnings.
projects/​rccl/​src/​include/​rccl_common.h Declares shared guard APIs.
projects/​rccl/​src/​enqueue/​enqueue.cc Guards enqueue and rearchitected paths.
projects/​rccl/​src/​ce_coll.cc Clears scratch and adds synchronization.
projects/​rccl/​test/​host/​wrap-test.cc Tests selection and warning behavior.
projects/​rccl/​test/​host/​enqueue-test.cc Tests enqueue fallback handling.
projects/​rccl/​test/​host/​ce-coll-test.cc Tests scratch cleanup ordering.
projects/​rccl/​test/​host/​fakes/​enqueue_test_deps.h Declares enqueue test seams.
projects/​rccl/​test/​host/​fakes/​enqueue_test_deps.cc Implements enqueue test fakes.
projects/​rccl/​test/​host/​fakes/​collectives_fakes.cc Adds enqueue-path test behavior.
projects/​rccl/​CHANGELOG.md Documents the behavior change.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread projects/rccl/src/enqueue/enqueue.cc Resolved
Comment thread projects/rccl/test/host/wrap-test.cc Resolved
Comment thread projects/rccl/src/rccl_wrap.cc Resolved
Comment thread projects/rccl/test/host/wrap-test.cc Resolved
- taskAppend: an in-place AllToAll with a DDA fabric decision that
  NCCL_CHECK_MODE diverted to enqueue now takes CE-Scratch where it fits,
  like an undecided call, instead of being refused. The enqueue-site WARN
  now names the CE-Scratch reason and no longer cites suspended comms,
  which ncclEnqueueCheck rejects before taskAppend.
- wrap-test: the LL128 eligibility fake no longer requires 16-byte aligned
  buffers (the V1 predicate ignores the pointers); cover a misaligned
  in-place call inside the LL128 window.
- wrap-test: drive the selector refusal and the grouped CE-Scratch arm
  through ncclGroupStartInternal / ncclGroupEndInternal.
Conflict resolution:
- rcclSelectAlltoAll: develop gates forced CE-Scratch on the ceNonReg size
  window (unless CTA_POLICY_ZERO); the in-place exception bypasses it, since
  CE-Scratch is the only correct in-place path there.
- taskAppend: keep develop's merged AllReduce / ReduceScatter decided
  branch and its ReduceScatter exclusion from CE-Scratch, with the in-place
  AllToAll predicates on top.
- Test fakes: develop moved the enqueue binary's stubs into per-TU fakes.
  The in-place AllToAll seams move to rccl_wrap_fakes; the taskAppend CE
  entry points keep failing loud unless a test sets g_rcclTaskAppendCeFaked.
- CHANGELOG: the bullet moves to the new Unreleased section.
Conflict resolution:
- rcclSelectAlltoAll: keep the gfx1250 in-place refusal of registered and
  hierarchical CE, with develop's rcclSelectDone() returns (#13098).
- rccl_wrap_fakes: #13098 added functional rcclCeAllReduceEnabled /
  rcclForceCeAllReduceEnabled fakes, which now replace the taskAppend-gated
  ones (AllReduce-only calls, never reached by AllToAll), and calls
  rcclCeArNonRegCap from taskAppend, which had no fake; add a fail-loud one
  so rccl-UnitTestsMicroEnqueue links.
CHANGELOG conflict only: keep develop's Unreleased section and add this
branch's gfx1250 in-place AllToAll bullet under Changed.
rccl_wrap_fakes: develop (#14633) removed the same duplicate CE AllReduce
fail-loud fakes; keep this branch's taskAppend CE seams and the
rcclCeArNonRegCap fake.
Develop (#14635) now fakes rcclCeArNonRegCap; drop this branch's copy.

@i-kosarev i-kosarev 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.

Corruption starts at ddaScratchBytes (256 MB) on a pre-#13336 build and at 1 MB after it, cause #13336 stopped forcing CE-Scratch. Host tests use fakes. This is a device timing race. Can we add into CI on-GPU in-place check with rank skew? It'd have caught issues uncovered by #13336. Could nccl.h.in document in-place ncclAlltoAll? The deprecated ncclAllToAll says unsupported. This PR now defines the semantics

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

Copilot AI 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.

🟡 Changes recommended

A critical capture-detection gap lets DEBUG_LOCAL in-place AllToAll calls enter a graph-unsafe CE-Scratch path, risking replay hangs and requiring a fix with regression coverage.

1 open issue
2 resolved since last review

Review effort: Balanced

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

- taskAppend: rcclSelectAlltoAll probes capture only on the way to its
  CE and Direct branches, so a DDA / GIN decision that NCCL_CHECK_MODE
  diverts here carries ceCapturing = false. Probe the stream for it, so a
  captured in-place call cannot take the graph-unsafe CE-Scratch path; it
  is refused instead.
- rcclAlltoAllCeScratchInPlace: require nRanks > 1, like
  rcclAlltoAllRegisteredCeRefused.
- nccl.h.in: document in-place ncclAlltoAll.
@thananon

Copy link
Copy Markdown
Contributor Author

@i-kosarev thanks for the review.

  • nccl.h.in: ncclAlltoAll now documents in-place behaviour (same on every rank; on gfx1250 it runs only on a path that is correct in place, otherwise ncclInvalidUsage; on other arches correctness is not guaranteed). Fixed in 078fcda.
  • On-GPU CI with rank skew: agreed, host tests can't catch a device timing race. This PR's CI is host-only for this path, so I'd add it as a follow-up: an rccl-UnitTests in-place AllToAll correctness case with a per-rank delay before the call, covering sizes on both sides of the scratch and of the LL / LL128 windows. That would have caught the [RCCL] gfx1250: RCCL Perf tuning  #13336 exposure.
  • The 256 MB vs 1 MB onset matches what we saw: before [RCCL] gfx1250: RCCL Perf tuning  #13336, CE-Scratch was forced and covered in place up to ddaScratchBytes, after it, the p2p fallback took over from 1 MB.

Picks up #14579, which fixes the two one-RPN AllGather host tests.
@thananon
thananon marked this pull request as ready for review October 31, 2026 10:57

@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

Findings

4 more finding(s), not posted inline
  • projects/rccl/src/rccl_wrap.cc:1139 (Low) The selector-site WARN blames NCCL_CHECK_MODE, but check mode does not turn DDA off in the selector; drop the branch.
  • projects/rccl/src/rccl_wrap.cc:1112 (Low) The gfx1250 in-place predicate is spelled out three times; build CeScratchInPlace on RegisteredCeRefused.
  • projects/rccl/src/include/rccl_common.h:294 (Nit) Comment says "these two" but documents three helpers.
  • projects/rccl/src/enqueue/enqueue.cc:4817 (Nit) a2aRegCeRefused here means what rccl_wrap.cc calls a2aRegCeSkipped; rename it to a2aRegCeSkipped.

This PR changes 1,046 lines across 12 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: Worth settling before approval: CeAlltoAllDdaScratchMicrotest is not in test_categories_micro.yaml so CTest never runs it, and fabric CE-Scratch AllGather still skips the scratch zero and barrier at ce_coll.cc:3899.

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

Comment thread projects/rccl/src/ce_coll.cc Resolved
Comment thread projects/rccl/src/rccl_wrap.cc Resolved
@github-actions

Copy link
Copy Markdown
Contributor

pr-rocm-systems-13461-oci-rccl-pr-smoke

View this job on CoCo

Builds

Stack Component Version Commit Status Build time
pr-13461_rccl-perf_rocm-10.1-ga gcc-13.2 13.2.0 13.2.0 cached
pr-13461_rccl-perf_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-13461_rccl-perf_rocm-10.1-ga openmpi-5.0.8 5.0.8 5.0.8 cached
pr-13461_rccl-perf_rocm-10.1-ga rccl-pr-13461 d4e2183 d4e2183 cached
pr-13461_rccl-perf_rocm-10.1-ga rccl-tests-develop-perf develop 08f8ec3 cached
pr-13461_rccl-perf_rocm-10.2-latest gcc-13.2 13.2.0 13.2.0 cached
pr-13461_rccl-perf_rocm-10.2-latest rocm-10.2-latest 10.2.0rc1 10.2.0rc1 cached
pr-13461_rccl-perf_rocm-10.2-latest openmpi-5.0.8 5.0.8 5.0.8 cached
pr-13461_rccl-perf_rocm-10.2-latest rccl-pr-13461 d4e2183 d4e2183 cached
pr-13461_rccl-perf_rocm-10.2-latest rccl-tests-develop-perf develop 08f8ec3 cached
pr-13461_rccl-smoke_rocm-10.1-ga gcc-13.2 13.2.0 13.2.0 cached
pr-13461_rccl-smoke_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-13461_rccl-smoke_rocm-10.1-ga openmpi-5.0.8 5.0.8 5.0.8 cached
pr-13461_rccl-smoke_rocm-10.1-ga rccl-pr-13461-smoke d4e2183 d4e2183 cached
pr-13461_rccl-smoke_rocm-10.1-ga rccl_gtest-pr-13461 d4e2183 d4e2183 cached
rocm-10.1-ga_rccl-develop-perf gcc-13.2 13.2.0 13.2.0 cached
rocm-10.1-ga_rccl-develop-perf rocm-10.1-ga 10.1.0 10.1.0 cached
rocm-10.1-ga_rccl-develop-perf openmpi-5.0.8 5.0.8 5.0.8 cached
rocm-10.1-ga_rccl-develop-perf rccl-develop-434730faf19c 434730f 434730f cached
rocm-10.1-ga_rccl-develop-perf rccl-tests-develop-perf develop 08f8ec3 cached

Failures

No failing tests in this run.

15 tests skipped.

@github-actions

Copy link
Copy Markdown
Contributor

pr-rocm-systems-13461-ruby64-rccl-pr-smoke

View this job on CoCo

Builds

Stack Component Version Commit Status Build time
pr-13461_rccl-perf_rocm-10.1-ga gcc-11.5 11.5.0 11.5.0 cached
pr-13461_rccl-perf_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-13461_rccl-perf_rocm-10.1-ga openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-13461_rccl-perf_rocm-10.1-ga rccl-pr-13461 d4e2183 d4e2183 cached
pr-13461_rccl-perf_rocm-10.1-ga rcclt-develop-perf develop 08f8ec3 cached
pr-13461_rccl-perf_rocm-10.2-latest gcc-11.5 11.5.0 11.5.0 cached
pr-13461_rccl-perf_rocm-10.2-latest rocm-10.2-latest 10.2.0rc1 10.2.0rc1 cached
pr-13461_rccl-perf_rocm-10.2-latest openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-13461_rccl-perf_rocm-10.2-latest rccl-pr-13461 d4e2183 d4e2183 cached
pr-13461_rccl-perf_rocm-10.2-latest rcclt-develop-perf develop 08f8ec3 cached
pr-13461_rccl-smoke_rocm-10.1-ga gcc-11.5 11.5.0 11.5.0 cached
pr-13461_rccl-smoke_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-13461_rccl-smoke_rocm-10.1-ga openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-13461_rccl-smoke_rocm-10.1-ga rccl-pr-13461-smoke d4e2183 d4e2183 cached
pr-13461_rccl-smoke_rocm-10.1-ga rccl_gtest-pr-13461 d4e2183 d4e2183 cached
rocm-10.1-ga_rccl-develop-perf gcc-11.5 11.5.0 11.5.0 cached
rocm-10.1-ga_rccl-develop-perf rocm-10.1-ga 10.1.0 10.1.0 cached
rocm-10.1-ga_rccl-develop-perf openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
rocm-10.1-ga_rccl-develop-perf rccl-develop-434730faf19c 434730f 434730f cached
rocm-10.1-ga_rccl-develop-perf rcclt-develop-perf develop 08f8ec3 cached

Failures

No failing tests in this run.

15 tests skipped.

- Guard WARN: drop the selector-site NCCL_CHECK_MODE branch (check mode
  does not turn the DDA fabric paths off in the selector), and say the
  fabric paths need a per-peer size that is a multiple of 16 bytes
  rather than aligned buffers (no fabric eligibility check reads the
  pointers).
- Build CeScratchInPlace, RegisteredCeRefused and the guard on one
  gfx1250 in-place predicate.
- taskAppend: a2aRegCeRefused -> a2aRegCeSkipped, matching the selector.
- Trim review tags and bench numbers from comments.
- test_categories_micro.yaml: list CeAlltoAllDdaScratchMicrotest so the
  CTest tiers run it.
@thananon

Copy link
Copy Markdown
Contributor Author

Argus findings not posted inline, all addressed in 51719d7:

  • rccl_wrap.cc:1139, selector-site WARN blamed NCCL_CHECK_MODE: right, check mode doesn't turn the fabric paths off in the selector. Branch dropped. While there I also fixed the fallback reason: it now says the fabric paths need a per-peer size that's a multiple of 16 bytes, not aligned buffers (no eligibility check reads the pointers).
  • rccl_wrap.cc:1112, predicate spelled three times: CeScratchInPlace, RegisteredCeRefused and the guard now share one static rcclAlltoAllInPlaceOnGfx1250.
  • rccl_common.h:294, "these two": now "these helpers".
  • enqueue.cc:4817: renamed to a2aRegCeSkipped, matching the selector.
  • test_categories_micro.yaml: CeAlltoAllDdaScratchMicrotest.* added.

Host microtests: Micro 3020/3020, MicroEnqueue 264/264, MicroCe 72/72, MicroInit 739/739, MicroTaskPrep 421/421.

@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

This PR changes 1,029 lines across 12 files. A change this size is hard to review
well, for a person and for this bot alike: reviewers lose the thread, defects hide in the
volume, and the feedback arrives too late to be cheap to act on. Splitting it into a
stacked pull request
gives each piece a reviewable diff and keeps the history. This review covers the whole change
regardless.

Bottom line: Nothing new worth raising; still open from earlier: ce_coll.cc:3899. Worth clearing before approval.

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

@github-actions

Copy link
Copy Markdown
Contributor

pr-rocm-systems-13461-oci-rccl-pr-smoke

View this job on CoCo

Builds

Stack Component Version Commit Status Build time
pr-13461_rccl-perf_rocm-10.1-ga gcc-13.2 13.2.0 13.2.0 cached
pr-13461_rccl-perf_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-13461_rccl-perf_rocm-10.1-ga openmpi-5.0.8 5.0.8 5.0.8 cached
pr-13461_rccl-perf_rocm-10.1-ga rccl-pr-13461 51719d7 51719d7 cached
pr-13461_rccl-perf_rocm-10.1-ga rccl-tests-develop-perf develop 08f8ec3 cached
pr-13461_rccl-perf_rocm-10.2-latest gcc-13.2 13.2.0 13.2.0 cached
pr-13461_rccl-perf_rocm-10.2-latest rocm-10.2-latest 10.2.0rc1 10.2.0rc1 cached
pr-13461_rccl-perf_rocm-10.2-latest openmpi-5.0.8 5.0.8 5.0.8 cached
pr-13461_rccl-perf_rocm-10.2-latest rccl-pr-13461 51719d7 51719d7 cached
pr-13461_rccl-perf_rocm-10.2-latest rccl-tests-develop-perf develop 08f8ec3 cached
pr-13461_rccl-smoke_rocm-10.1-ga gcc-13.2 13.2.0 13.2.0 cached
pr-13461_rccl-smoke_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-13461_rccl-smoke_rocm-10.1-ga openmpi-5.0.8 5.0.8 5.0.8 cached
pr-13461_rccl-smoke_rocm-10.1-ga rccl-pr-13461-smoke 51719d7 51719d7 cached
pr-13461_rccl-smoke_rocm-10.1-ga rccl_gtest-pr-13461 51719d7 51719d7 cached
rocm-10.1-ga_rccl-develop-perf gcc-13.2 13.2.0 13.2.0 cached
rocm-10.1-ga_rccl-develop-perf rocm-10.1-ga 10.1.0 10.1.0 cached
rocm-10.1-ga_rccl-develop-perf openmpi-5.0.8 5.0.8 5.0.8 cached
rocm-10.1-ga_rccl-develop-perf rccl-develop-434730faf19c 434730f 434730f cached
rocm-10.1-ga_rccl-develop-perf rccl-tests-develop-perf develop 08f8ec3 cached

Failures

No failing tests in this run.

15 tests skipped.

@github-actions

Copy link
Copy Markdown
Contributor

pr-rocm-systems-13461-ruby64-rccl-pr-smoke

View this job on CoCo

Builds

Stack Component Version Commit Status Build time
pr-13461_rccl-perf_rocm-10.1-ga gcc-11.5 11.5.0 11.5.0 cached
pr-13461_rccl-perf_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-13461_rccl-perf_rocm-10.1-ga openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-13461_rccl-perf_rocm-10.1-ga rccl-pr-13461 51719d7 51719d7 cached
pr-13461_rccl-perf_rocm-10.1-ga rcclt-develop-perf develop 08f8ec3 cached
pr-13461_rccl-perf_rocm-10.2-latest gcc-11.5 11.5.0 11.5.0 cached
pr-13461_rccl-perf_rocm-10.2-latest rocm-10.2-latest 10.2.0rc1 10.2.0rc1 cached
pr-13461_rccl-perf_rocm-10.2-latest openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-13461_rccl-perf_rocm-10.2-latest rccl-pr-13461 51719d7 51719d7 cached
pr-13461_rccl-perf_rocm-10.2-latest rcclt-develop-perf develop 08f8ec3 cached
pr-13461_rccl-smoke_rocm-10.1-ga gcc-11.5 11.5.0 11.5.0 cached
pr-13461_rccl-smoke_rocm-10.1-ga rocm-10.1-ga 10.1.0 10.1.0 cached
pr-13461_rccl-smoke_rocm-10.1-ga openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
pr-13461_rccl-smoke_rocm-10.1-ga rccl-pr-13461-smoke 51719d7 51719d7 cached
pr-13461_rccl-smoke_rocm-10.1-ga rccl_gtest-pr-13461 51719d7 51719d7 cached
rocm-10.1-ga_rccl-develop-perf gcc-11.5 11.5.0 11.5.0 cached
rocm-10.1-ga_rccl-develop-perf rocm-10.1-ga 10.1.0 10.1.0 cached
rocm-10.1-ga_rccl-develop-perf openmpi-4.0.2 4.0.2rc3 4.0.2rc3 cached
rocm-10.1-ga_rccl-develop-perf rccl-develop-434730faf19c 434730f 434730f cached
rocm-10.1-ga_rccl-develop-perf rcclt-develop-perf develop 08f8ec3 cached

Failures

No failing tests in this run.

15 tests skipped.

@peymanr

peymanr commented Oct 31, 2026

Copy link
Copy Markdown

PR Pundit review

(Testing PR Pundit Code Review agent. Not all comments may be relevant. This is a one-time automated pass: please address what is useful, no need to request a re-review. A quick reply per point (useful or not, and why) helps us calibrate the agent. Reach out to @peymanr for suggestions and feedback.)

# Finding Where
1 🟠 In-place gfx1250 AllToAll hard-fails on split/shrink/grow comms and all sizes: this PR adds a refusal guard projects/rccl/src/rccl_wrap.cc:2741

1. 🟠 Should fix: In-place gfx1250 AllToAll hard-fails on split/shrink/grow comms and all sizes: this PR adds a refusal guard

projects/rccl/src/rccl_wrap.cc:2741

On gfx1250, in-place ncclAlltoAll / ncclAlltoAllConfig (sendbuff == recvbuff) now returns ncclInvalidUsage with a WARN whenever neither the DDA fabric LL / LL128 paths nor CE-Scratch take it. That covers every call on communicators without ddaFabricMemHandler (ncclCommSplit / Shrink / Grow children, MNNVL off, multi-clique, RCCL_DDA_ENABLE=0), calls above ddaScratchBytes, calls under graph capture, and the REARCH and NCCL_CHECK_MODE paths. This is a deliberate change, documented in CHANGELOG.md and nccl.h.in: previously these calls went to the per-peer Send/Recv decomposition, which the PR reports returns wrong data in place, so they did not run correctly before. The remaining gap is that RCCL provides no internal fallback (for example staging through a temporary buffer). The refusal also applies at every size, including below the 1 MiB where corruption was measured, so callers must switch to separate buffers.

Who is affected: gfx1250 applications that issue in-place AllToAll on split/shrink/grow children or other communicators without a fabric DDA scratch, or above the scratch size, or under capture.

Checked against the code by an independent pass.

Related past reviews: #9325 on projects/rccl/src/fabric_init.cu, #2011 on projects/rccl/CHANGELOG.md, #10796 on projects/rccl/src/group.cc, #1734 on projects/rccl/CHANGELOG.md, #1861 on projects/rccl/CHANGELOG.md

Shared from a pilot of PR Pundit, an agentic code reviewer that builds and tests the change and reads the project's past reviews. Reviewed at 51719d72; findings checked and posted by @peymanr; points already raised on this PR are left out.

@thananon

Copy link
Copy Markdown
Contributor Author

@peymanr thanks. On PR Pundit #1 (in-place gfx1250 AllToAll refuses where no correct path exists): useful as a summary, but no change in this PR. It's the intended contract: on those communicators the only alternative is the per-peer Send/Recv decomposition, which has no ordering between "our send read byte b" and "our recv wrote byte b". So we return ncclInvalidUsage + WARN instead of wrong data. Refusing below 1 MiB too is deliberate. The race is structural, not size-dependent; 1 MiB is just where we measured it firing on MNNVL P2P, and sizes where it didn't fire aren't proven safe. On a fabric root comm the small in-place sizes still run (DDA LL / LL128, or CE-Scratch where they fit), so the refusal there only covers calls that no correct path takes. The gap you name, an internal staged fallback (copy the send region to comm-owned scratch, then out-of-place Send/Recv), is the planned follow-up listed in the description. It closes split / shrink / grow children, MNNVL-off, multi-clique and above-scratch on every arch.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants