← Back to Pull requests

perf(rccl): shrink the gfx1250 CE-registered AllReduce and AllGather windows in SPX and DPX #16695

Open
PedramAlizadeh opened this pull request with 395 lines diff across 12 files
View on GitHub
PedramAlizadeh PedramAlizadeh commented on Nov 24, 2026 18:10 UTC
Author

Motivation

On gfx1250, registered (-R 2) AllReduce from 8 MB to 256 MB and AllGather up to 8 GB could select the CE-registered path. Measured on 1, 2, 4 and 8 nodes in DPX (8-64 ranks) and SPX (4-32 ranks), symk or Ring is faster at those sizes: symk (8 MB up to the symk cap) or Ring (above it) has 27-275% more AllReduce bus bandwidth than CE in DPX and 40-160% more in SPX. For AllGather in DPX, the hierarchical symk window (16 MB and up) already wins, and when it is skipped Ring has 140-250% more bandwidth than CE. In SPX, Ring has 40-80% more than CE from 256 MB (512 MB on 16 and 32 ranks) to 8 GB, while DDA and SymTDM keep the sizes below that. This PR shrinks the CE-registered windows in both gfx1250 tables and lets the symk / Ring crossover follow the rank count and element count.

Technical Details

In rccl_arch_thresholds.cc, both gfx1250 tables (SPX and DPX) change ceRegMax[AllReduce] from 256 MB to 4 MB. ceRegMax[AllGather] goes from 8 GB to 32 MB in SPX and to 0 in DPX: in SPX, AllGather in types DDA cannot run (int8, int32, int64, fp64) has no DDA, SymTDM or symk path between 2 MB and 32 MB, and CE beats Ring there by up to 7x on 2-8 nodes, while Ring beats CE from 64 MB. Other types still take DDA, SymTDM or symk before CE, so the SPX window only serves those types. Sum AllReduce stays on DDA below 8 MB; ops that DDA and symk cannot run (max, min, prod) keep CE there and take Ring above it. A new table field, arSymMaxR2PerRankElems, raises the eager registered AllReduce symk cap from symMaxR2[AllReduce] to nRanks x arSymMaxR2PerRankElems x type size, since the symk / Ring crossover grows with the communicator and follows the element count. DPX sets it to 128K, so fp32 runs symk to 8 MB on 16 ranks, 16 MB on 32 and 32 MB on 64, and bf16 / fp16 to 8 MB on 32 and 16 MB on 64. SPX sets it to 256K, with a new arSymMaxR2MinRanks = 16: fp32 runs symk to 16 MB on 16 ranks and 32 MB on 32, and bf16 / fp16 to 8 MB on 16 and 16 MB on 32. On 8 SPX ranks Ring beats symk at 8 MB, so smaller communicators keep symMaxR2. A new arSymMaxR2MaxBytes caps that cap at 32 MB, the largest size measured, in both tables, so 64+ SPX and 128+ DPX ranks do not run symk past the sweep. In rccl_wrap.cc, rcclSelectAllReduce() reads the cap through rcclArSymMaxR2CapTab(), and rcclArSymMaxR2Cap() exposes the same value. Graph capture keeps symMaxR2Graph, and RCCL_SYM_K_MAX_BYTES still overrides both. Tables that leave arSymMaxR2PerRankElems at 0 (all other arches) behave as before. With the CE-registered window ending below symMinR2, the eager DDA LL128 re-route of CE-registered no longer fires on SPX: 8 ranks take Ring at 8 MB and 16-32 ranks take symk, both faster than the re-route. The graph-capture re-route is unchanged. A new rcclCeArRegMaxBytes() lets DdaMPI_AllReduceRegistered.EagerSumsWithinCeGrid skip when the CE-registered window ends below its 1 MiB shards. CTAPolicy=ZERO still selects CE-registered at every size, and RCCL_CE_AR_REG_MAX_MSG_BYTES and RCCL_CE_COLL_MAX_BYTES still override the table. No environment variable is added, removed or changed.

Issue Tracking

JIRA ID: AICOMRCCL-3598

Test Plan

Host unit tests (wrap-test.cc, against the real gfx1250 tables):
ArSymMaxR2Cap_Gfx1250ScalesWithRanks: the eager symk cap for fp32, bf16, fp16 and fp8 on 8-128 ranks in DPX and SPX, including 8-rank SPX communicators, the 32 MB ceiling, graph capture and RCCL_SYM_K_MAX_BYTES.
SelectAllReduce_Gfx1250RegisteredSymkThenRing (DPX and SPX, table-driven): registered sum AllReduce picks symk from 8 MB to the cap and Ring above it, including 256 MB, bf16 and the 32 MB ceiling, and Ring from 8 MB on 8 ranks.
SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M: in DPX and SPX, max AllReduce takes CE-registered at 4 MB and Ring at 8 MB and 256 MB; CTAPolicy=ZERO still takes CE at 8 MB-1 GB unless RCCL_CE_AR_REG_MAX_MSG_BYTES=0.
AllGatherCeRegisteredWindow_Gfx1250SpxTo32MDpxClosed: the AllGather CE-registered window covers 2-32 MB in SPX and nothing in DPX.
Two existing tests depended on the old windows: SelectAllReduce_RegisteredRerouteFollowsTheArchTable now expects Ring at eager 8 MB on SPX and DPX and checks the eager re-route's grid cap on its fixture table, and CollImplInfo.AllReduceCeRegisteredMatchesDispatchLog sets RCCL_CE_AR_REG_MAX_MSG_BYTES to the top of its sweep so CE stays selectable.
GPU unit tests: the full rccl-UnitTests suite on one DPX node and one SPX node.
Path sweep: all_reduce_perf and all_gather_perf, -R 2, fp32 and bf16, on 1, 2, 4 and 8 nodes in DPX and SPX, each available path forced in turn (CE, CE off, Ring LL128, Ring Simple, DDA, symk up to 32 MB) to find the best path per size.
Validation matrix (DPX and SPX): develop against this PR on 1, 2, 4 and 8 nodes, 1 MB-1 GB (AllGather to 8-16 GB), with -c 1: fp32, bf16, fp16, fp8, max, min, prod, avg, -x 2 (CTA ZERO), graph capture (-G), -R 0, -R 1, odd sizes and unaligned buffers (-u 1). Points whose path did not change but whose bandwidth moved by 7% or more were run again in alternating order.
Types DDA cannot run (DPX, 1 and 2 nodes): -R 2 sum AllReduce in int32, int64 and fp64 (1 MB-512 MB) and AllGather in int8, int32 and fp64 (1 MB-8 GB), develop against this PR.
2- and 4-rank DPX comms (one node): -R 2 AllReduce in fp32, bf16, int32 sum and fp32 max, 1 MB-512 MB, two alternating rounds of develop and this PR.

Test Results

Host unit tests: 13331 tests pass on the branch merged with develop.
GPU unit tests: 330 of 330 pass on DPX and on SPX with GroupCall.Multistream excluded. That test fails the same way on develop on DPX (an 8-rank HIP out-of-memory at init, then a hang); on SPX it passes when run alone.
Correctness: 0 wrong values in every run.
AllReduce (bus bandwidth, this PR against develop): fp32, bf16 and fp16 gain 21-275% in DPX and 3-157% in SPX from 8 MB to 256 MB. Unaligned buffers gain 94-900% in DPX and 23-530% in SPX. Odd sizes range from -6% to +63%. avg, graph capture, -R 0 and -R 1 are unchanged, and -x 2 still takes CE at every size.
Types DDA cannot run (DPX): sum AllReduce in int32, int64 and fp64 is unchanged at 2-4 MB (CE) and gains 23-200% from 8 MB to 256 MB (Ring or Tree). AllGather in int8, int32 and fp64 gains 24-65% at 2-8 MB (Ring LL instead of CE) and is within 4% from 16 MB (symk on both).
2- and 4-rank DPX comms: AllReduce in fp32, bf16, int32 and max gains 46-197% on 2 ranks and 178-249% on 4 ranks from 8 MB to 256 MB (Ring instead of CE), the same in both rounds; below 8 MB the path is unchanged.
AllGather: in DPX the paths do not change (hierarchical symk already won from 16 MB). In SPX, fp32 and bf16 gain 39-78% from 256 MB (512 MB on 16 and 32 ranks) to 8 GB.
Trade-off: max, min and prod AllReduce lose where CE beat Ring for non-sum ops: -17% at 8 MB on 8 DPX nodes, -34% at 8 MB and -22% at 16 MB on 8 SPX nodes, and -5% at 8 MB on 4 SPX nodes. They gain 5-240% from 16-32 MB up, and on 1 and 2 SPX nodes and 1-4 DPX nodes they gain from 8 MB.
Noise: a few points under 32 MB whose path did not change moved by 10-30% in single runs. Alternating reruns of develop, a DPX-only build and this PR put them within run-to-run spread (for example, 4-node SPX AllGather at 2-8 MB was 6-26% slower in one rerun and 7-31% faster in the next). One point is still open: fp8 AllReduce at 1-4 MB on 8 SPX nodes stays on DDA but was 3-16% slower in both alternating rounds; the change does not touch that path.

Summary (-R 2 fp32 AllReduce bus bandwidth, 8 nodes, this PR against develop)

| | DPX (64 ranks) | SPX (32 ranks) |
|---|---|---|
| 8 MB | +111% (CE → symk) | +71% (CE → symk) |
| 16 MB | +116% (CE → symk) | +119% (DDA → symk) |
| 32 MB | +83% (CE → symk) | +101% (DDA → symk) |
| 64 MB | +123% (CE → Ring) | +51% (CE → Ring) |
| 128 MB | +219% (CE → Ring) | +71% (CE → Ring) |
| 256 MB | +239% (CE → Ring) | +58% (CE → Ring) |

Diff: 395 lines (+376 / -19) across 12 files Reviewer: mustafabar Review duration: 15236m
All Vouch review confidence checks passed
Residual risk 0.06 = Change Risk (0.55) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 395 lines diff across 12 files
0.55
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.86 · 5 substantive comment(s)
0.86
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
88%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.358
Real PR Conversation Timeline
42 items
therock-pr-bot[bot] therock-pr-bot[bot] commented on Nov 24, 2026 18:11 UTC
Bot

<!-- therock-pr-bot-policy-check -->

✅ All Checks Passed — Ready for Review

| Check | Status | Details |
|---|:---:|---|
| 📝 PR Description | ✅ Pass | — |
| ⛔ Forbidden Files | ✅ Pass | — |
| 🧪 Unit Test | ⚠️ Warning | Error: Source/code files changed without an accompanying unit test.<br>Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).<br>Current: code file(s) changed: projects/rccl/src/include/rccl_arch_thresholds.h, projects/rccl/src/include/rccl_common.h, projects/rccl/src/rccl_arch_thresholds.cc, projects/rccl/src/rccl_wrap.cc, projects/rccl/test/CollImplInfoTests.cpp (+3 more); no test file found |
| 🔎 pre-commit | ✅ Pass | Not applicable — this repo has no pre-commit workflow. |
| 🚫 Draft PR | 🔜 To Be Enabled | — |
| 🚩 Feature Flag | 🔜 To Be Enabled | — |
| 📊 Code Coverage | 🔜 To Be Enabled | — |
| 🤖 therock-pr-bot | ✅ Pass | — |

🎉 All checks passed! This PR is ready for review.

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

🙋 Wish to Override Policy?

therock-pr-bot[bot] therock-pr-bot[bot] commented on Nov 24, 2026 18:11 UTC
Bot

<!-- therock-pr-bot-fix-policies -->
🎉 All checks passed! This PR is ready for review.

amd-argus[bot] amd-argus[bot] commented on code on Nov 24, 2026 18:42 UTC
Code Review
projects/rccl/src/rccl_wrap.cc:1
@@ -1092,6 +1092,18 @@ inline size_t rcclSymMaxR2CapTab(const rcclArchThresholds* table, ncclFunc_t fun
   return funcThresholdFromTable(caps, func);
 }
 
+// AllReduce R2 symk cap: eager calls on a table with arSymMaxR2PerRankElems, on comms of at least
+// arSymMaxR2MinRanks ranks, run symk to nRanks x that many elements when it is above symMaxR2[AllReduce].
+inline size_t rcclArSymMaxR2CapTab(const rcclArchThresholds* table, bool graphMode, int nRanks,
+                                   ncclDataType_t datatype) {
+  const size_t cap = rcclSymMaxR2CapTab(table, ncclFuncAllReduce, graphMode);
+  if (rcclParamSymKMaxBytes() >= 0 || table == nullptr || graphMode || nRanks < 1 ||
+      nRanks < table->arSymMaxR2MinRanks) {
+    return cap;
+  }
+  return std::max(cap, (size_t)nRanks * table->arSymMaxR2PerRankElems * ncclTypeSize(datatype));

Medium

nRanks arSymMaxR2PerRankElems ncclTypeSize(datatype) has no ceiling, so the eager symk cap keeps growing past the 32 SPX / 64 DPX ranks the sweep covered (64 SPX ranks give 64M fp32, pinned at wrap-test.cc:9102). Could we clip it the way ddaTierCapFromTable clips to rankScaledMaxBytes (line 1285)? Please check.

amd-argus[bot] amd-argus[bot] commented on code on Nov 24, 2026 18:42 UTC
Code Review
projects/rccl/src/rccl_arch_thresholds.cc:1
@@ -138,9 +138,9 @@ static const rcclArchThresholds rcclArchThresholds_gfx1250 = {
   .ceRegMax = {
     0,                             // [0] Broadcast      -- not used
     0,                             // [1] Reduce          -- not used
-    8ULL*1024*1024*1024,           // [2] AllGather
+    0,                             // [2] AllGather       -- 0 = disabled: Ring beats CE 1.4-1.8x from 256M (SPX)

Medium

ceRegMax[AllGather] = 0 also closes CE for registered AllGathers that DDA can't take. rcclDdaDatatypeSupported (rccl_wrap.cc:1640) admits only fp32/fp16/bf16/fp8, so int8/int32/int64/fp64 AllGather above symMaxR2[AllGather] (2M) now goes to Direct/Ring where it used to take CE. The sweep measured only DDA-eligible types in that range. Could the window stay open for those types, or could the validation cover one? Please check.

amd-argus[bot] amd-argus[bot] commented on code on Nov 24, 2026 18:42 UTC
Code Review
projects/rccl/src/rccl_arch_thresholds.cc:1
@@ -138,9 +138,9 @@ static const rcclArchThresholds rcclArchThresholds_gfx1250 = {
   .ceRegMax = {
     0,                             // [0] Broadcast      -- not used
     0,                             // [1] Reduce          -- not used
-    8ULL*1024*1024*1024,           // [2] AllGather
+    0,                             // [2] AllGather       -- 0 = disabled: Ring beats CE 1.4-1.8x from 256M (SPX)
     0,                             // [3] ReduceScatter   -- not used
-    256ULL*1024*1024,              // [4] AllReduce
+    4ULL*1024*1024,                // [4] AllReduce       -- non-sum ops below symMinR2; symk or Ring beats CE 1.4-2x from 8M (SPX)

Medium

ceRegMax[AllReduce] = 4M also moves registered sum AllReduce in fp64 and integer types off CE. DDA rejects them (rccl_wrap.cc:1640) and only the generic symk kernels take them (sym_kernels.cc:707), so on 8-rank SPX they take Ring from 4M to 256M. That's the swap where max/min/prod lost 17-34% at 8-16M, and the validation matrix has no fp64 or integer sum. Please check.

amd-argus[bot] amd-argus[bot] commented on code on Nov 24, 2026 18:42 UTC
Code Review
projects/rccl/src/include/rccl_arch_thresholds.h:1
@@ -102,6 +102,13 @@ struct rcclArchThresholds {
   // these replace symMinR2 / symMaxR2 / symMaxR2Graph for AllGather. 0 = no hierarchical window.
   size_t agHierSymMinR2;
   size_t agHierSymMaxR2;
+  // AllReduce only, eager R2, in elements per rank: symk runs up to
+  // max(symMaxR2[AllReduce], nRanks x this x the type size), since the symk / Ring crossover grows with
+  // the comm and follows the element count. 0 = symMaxR2 alone. Graph capture keeps symMaxR2Graph,
+  // and RCCL_SYM_K_MAX_BYTES still wins over both.

Low

The arSymMaxR2PerRankElems cap rule is written out here, in rccl_common.h:405-407 and in rccl_wrap.cc:1095-1096. Could this field comment keep it and the other two drop to one line that points here?

amd-argus[bot] amd-argus[bot] commented on Nov 24, 2026 18:42 UTC
Reviewer

<!-- argus:v1 pr=16695 sha=d8e997d20603 mode=review -->

ARGUS

Findings

<details>
<summary>3 more finding(s), not posted inline</summary>

  • projects/rccl/test/host/wrap-test.cc:9146 (Low) 8-rank DPX check uses EXPECT_NE(symk, ...), which passes for CE-registered or a DDA re-route; assert Ring with ExpectUnchanged.

  • projects/rccl/test/host/wrap-test.cc:9174 (Low) The DPX and SPX SymkThenRing tests repeat the same caps loop and bf16 checks; table-drive them like ArSymMaxR2Cap_Gfx1250ScalesWithRanks.

  • projects/rccl/test/CollImplInfoTests.cpp:479 (Nit) Comment names only gfx1250 DPX for the 4M window; SPX is 4M too.
  • </details>

    Impact

    <details>
    <summary>Reaches gfx1250; the PR targets gfx1250; 5 test(s) to run, 9 heatmap cell(s) to measure</summary>

    gfx1250 only, through the SPX table (which also serves CPX and mixed-partition comms) and the DPX table. Eager registered (symmetric-window) AllReduce from 8M to 256M moves from CE-registered to symk, up to nRanks x 128K/256K elements, and to Ring above that. Non-sum ops and types symk/DDA do not run go to Ring above 4M. Registered AllGather loses CE-registered at every size and falls to DDA, TDM, symk or Direct/Ring. Graph capture and CTAPolicy=ZERO are unchanged. Reaches gfx1250; the PR targets gfx1250.

    Tests that exercise this change

  • test_categories_micro.yaml quick, WrapMicrotestIsolated.: host tests for rcclSelectAllReduce / rcclArSymMaxR2Cap against the real gfx1250 tables, including the new and updated cases (projects/rccl/test/test_categories_micro.yaml)

  • rccl-UnitTestsFixturesDebug quick, RcclAllGatherCeRegisteredWindow.: AllGather CE-registered window gate whose gfx1250 ceRegMax went to 0 (projects/rccl/test/test_categories_fixtures_debug.yaml)

  • rccl-UnitTests standard, AllReduce.: runs AllReduce across int/fp64/fp8 and sum/prod/max/min, covering the types whose CE window closed (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTests standard, AllGather.: runs AllGather across all datatypes, including those DDA cannot take after the CE window closed (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTests standard, Register.*: registered-buffer paths that reach the CE-registered / symk selection (projects/rccl/test/test_categories.yaml)
  • Heatmap cells to measure, baseline against this PR, interleaved A/B

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks: registered AllReduce moves CE -&gt; symk to 8M, then Ring

  • gfx1250 all_reduce bfloat16/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): bf16 cap is half fp32's in bytes; CE -&gt; Ring from 8M on 16 ranks

  • gfx1250 all_reduce float/sum, 4 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks: CE/DDA re-route -&gt; symk to 16M, then Ring

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks are below arSymMaxR2MinRanks: CE-registered/DDA re-route -&gt; Ring from 8M

  • gfx1250 all_reduce float/sum, 16 node(s), 32 MiB to 64 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 64 SPX ranks: uncapped per-rank cap puts symk past the 32M sweep limit

  • gfx1250 all_reduce float/sum, 16 node(s), 32 MiB to 64 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node) (not measured in the heatmap): 128 DPX ranks: uncapped per-rank cap puts symk past the 32M sweep limit

  • gfx1250 all_gather float, 2 node(s), 2 MiB to 8 GiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): SPX AllGather CE-registered window closed at every size

  • gfx1250 all_gather bfloat16, 4 node(s), 256 MiB to 8 GiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks: Ring replaces CE, which the PR says Ring beats only from 512M at this rank count

  • gfx1250 all_gather float, 2 node(s), 2 MiB to 8 GiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): DPX AllGather CE-registered window closed; hier symk from 16M, DDA/Ring below
  • </details>

    Bottom line: Worth settling before approval: DdaMPI_AllReduceRegistered.EagerSumsWithinCeGrid still expects the eager DDA LL128 re-route, which the 4M SPX CE-registered window can no longer reach, so it gets Ring at 8M on 8 ranks.

    <sub>Comment <code>@argus review</code> to re-run, or <code>@argus re-review</code> after pushing.</sub>

    github-actions[bot] github-actions[bot] commented on Nov 24, 2026 19:00 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-oci-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 10% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 10%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    github-actions[bot] github-actions[bot] commented on Nov 24, 2026 19:00 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-ruby64-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 8% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 8%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    amd-argus[bot] amd-argus[bot] commented on code on Nov 25, 2026 07:41 UTC
    Code Review
    projects/rccl/src/rccl_arch_thresholds.cc:1
    @@ -408,9 +414,9 @@ static const rcclArchThresholds rcclArchThresholds_gfx1250_dpx = {
       .ceRegMax = {
         0,                             // [0] Broadcast      -- not used
         0,                             // [1] Reduce          -- not used
    -    8ULL*1024*1024*1024,           // [2] AllGather
    +    0,                             // [2] AllGather       -- 0 = disabled: hier symk beats CE 2.5-4x from 16M, Ring 2.4x (DPX)
         0,                             // [3] ReduceScatter   -- not used
    -    256ULL*1024*1024,              // [4] AllReduce
    +    4ULL*1024*1024,                // [4] AllReduce       -- non-sum ops below symMinR2; symk or Ring beats CE 1.3-3.4x from 8M (DPX)

    Medium

    ceRegMax[AllReduce] = 4M also moves registered AllReduce above 4M from CE-registered to Ring on DPX comms under 8 ranks. Their eager symk cap (nRanks x 128K x 4 = 1M / 2M fp32 on 2 / 4 ranks, rccl_wrap.cc:1110) stays below symMinR2 (8M), and the sweep starts at 8 DPX ranks. Could one 2- or 4-rank DPX comm be measured? Please check.

    amd-argus[bot] amd-argus[bot] commented on Nov 25, 2026 07:41 UTC
    Reviewer

    <!-- argus:v1 pr=16695 sha=165209d89400 mode=re-review -->

    ARGUS

    Impact

    <details>
    <summary>Reaches gfx1250; the PR targets gfx1250; 6 test(s) to run, 10 heatmap cell(s) to measure</summary>

    gfx1250 only, through the SPX table (also used for CPX, unreported-partition and mixed-partition comms) and the DPX table. Eager registered sum AllReduce from 8M to 256M moves from CE-registered (or the SPX DDA LL128 re-route) to symk, up to nRanks x 128K (DPX) or 256K (SPX, 16+ ranks) elements, capped at 32M. Above that cap, and on comms whose cap is below 8M (8-rank SPX, 2/4-rank DPX, bf16 on 16-rank DPX), it goes to Ring. Non-sum ops keep CE to 4M and take Ring above. Registered AllGather loses CE-registered at every size and falls to DDA, TDM, hierarchical symk or Direct/Ring. Graph capture and CTAPolicy=ZERO are unchanged. Other arches are unchanged because their new table fields are 0. Reaches gfx1250; the PR targets gfx1250.

    Tests that exercise this change

  • test_categories_micro.yaml quick, WrapMicrotestIsolated.: host selection tests for rcclSelectAllReduce and rcclArSymMaxR2Cap against the real gfx1250 SPX/DPX tables, including the new rank- and type-scaled cap cases (projects/rccl/test/test_categories_micro.yaml)

  • rccl-UnitTestsFixturesDebug quick, RcclAllGatherCeRegisteredWindow.: AllGather CE-registered window gate, whose gfx1250 ceRegMax went to 0 (projects/rccl/test/test_categories_fixtures_debug.yaml)

  • rccl-UnitTestsMPI quick_env_ce_allreduce, CeMPI_AllReduce.: CE AllReduce under NCCL_CTA_POLICY=2, the CTAPolicy=ZERO path the PR says still takes CE at every size (projects/rccl/test/test_categories_mpi.yaml)

  • rccl-UnitTests standard, AllReduce.: AllReduce across datatypes and reduce ops, covering the non-sum and DDA-ineligible types whose CE window shrank to 4M (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTests standard, AllGather.: AllGather across datatypes after the CE-registered window closed (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTests standard, Register.: registered-buffer paths that reach the CE-registered / symk selection (projects/rccl/test/test_categories.yaml)
  • Heatmap cells to measure, baseline against this PR, interleaved A/B

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks: CE-registered to symk at 8M, then Ring

  • gfx1250 all_reduce bfloat16/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks, bf16 cap 4M is below symMinR2: CE-registered to Ring from 8M

  • gfx1250 all_reduce float/sum, 1 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node) (not measured in the heatmap): 2- and 4-rank DPX sub-node comms: CE-registered to Ring, below the 8-rank DPX sweep floor

  • gfx1250 all_reduce float/sum, 16 node(s), 32 MiB to 64 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node) (not measured in the heatmap): 128 DPX ranks: symk stops at the 32M ceiling and Ring takes over above it, past the measured 64-rank set

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks are below arSymMaxR2MinRanks: CE-registered / DDA LL128 re-route to Ring from 8M

  • gfx1250 all_reduce float/sum, 4 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks: CE / DDA re-route to symk up to 16M, then Ring

  • gfx1250 all_reduce bfloat16/sum, 8 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 32 SPX ranks, bf16: symk up to 16M, then Ring

  • gfx1250 all_gather float, 2 node(s), 128 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks: AllGather CE-registered closed above the DDA LL128 and TDM caps, so Direct/Ring take over

  • gfx1250 all_gather bfloat16, 4 node(s), 256 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks: Ring replaces CE above the 256M DDA LL128 clip

  • gfx1250 all_gather float, 2 node(s), 64 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): DPX AllGather CE-registered closed: hierarchical symk from 16M, Ring where it is skipped
  • </details>

    Bottom line: Worth settling before approval: DDA-ineligible registered AllGather on SPX (int8/int32/fp64, 2M-256M) and registered AllReduce on 2-4 rank DPX comms both move off CE-registered with no measurement behind them.

    <sub>Comment <code>@argus review</code> to re-run, or <code>@argus re-review</code> after pushing.</sub>

    amd-argus[bot] amd-argus[bot] commented on code on Nov 25, 2026 07:41 UTC
    Code Review
    projects/rccl/src/rccl_wrap.cc:1
    @@ -1092,6 +1092,18 @@ inline size_t rcclSymMaxR2CapTab(const rcclArchThresholds* table, ncclFunc_t fun
       return funcThresholdFromTable(caps, func);
     }
     
    +// AllReduce R2 symk cap: eager calls on a table with arSymMaxR2PerRankElems, on comms of at least
    +// arSymMaxR2MinRanks ranks, run symk to nRanks x that many elements when it is above symMaxR2[AllReduce].
    +inline size_t rcclArSymMaxR2CapTab(const rcclArchThresholds* table, bool graphMode, int nRanks,
    +                                   ncclDataType_t datatype) {
    +  const size_t cap = rcclSymMaxR2CapTab(table, ncclFuncAllReduce, graphMode);
    +  if (rcclParamSymKMaxBytes() >= 0 || table == nullptr || graphMode || nRanks < 1 ||
    +      nRanks < table->arSymMaxR2MinRanks) {
    +    return cap;
    +  }
    +  return std::max(cap, (size_t)nRanks * table->arSymMaxR2PerRankElems * ncclTypeSize(datatype));

    Resolved by 165209d894.

    amd-argus[bot] amd-argus[bot] commented on code on Nov 25, 2026 07:41 UTC
    Code Review
    projects/rccl/src/rccl_arch_thresholds.cc:1
    @@ -138,9 +138,9 @@ static const rcclArchThresholds rcclArchThresholds_gfx1250 = {
       .ceRegMax = {
         0,                             // [0] Broadcast      -- not used
         0,                             // [1] Reduce          -- not used
    -    8ULL*1024*1024*1024,           // [2] AllGather
    +    0,                             // [2] AllGather       -- 0 = disabled: Ring beats CE 1.4-1.8x from 256M (SPX)
         0,                             // [3] ReduceScatter   -- not used
    -    256ULL*1024*1024,              // [4] AllReduce
    +    4ULL*1024*1024,                // [4] AllReduce       -- non-sum ops below symMinR2; symk or Ring beats CE 1.4-2x from 8M (SPX)

    Resolved by 165209d894.

    amd-argus[bot] amd-argus[bot] commented on code on Nov 25, 2026 07:41 UTC
    Code Review
    projects/rccl/src/include/rccl_arch_thresholds.h:1
    @@ -102,6 +102,13 @@ struct rcclArchThresholds {
       // these replace symMinR2 / symMaxR2 / symMaxR2Graph for AllGather. 0 = no hierarchical window.
       size_t agHierSymMinR2;
       size_t agHierSymMaxR2;
    +  // AllReduce only, eager R2, in elements per rank: symk runs up to
    +  // max(symMaxR2[AllReduce], nRanks x this x the type size), since the symk / Ring crossover grows with
    +  // the comm and follows the element count. 0 = symMaxR2 alone. Graph capture keeps symMaxR2Graph,
    +  // and RCCL_SYM_K_MAX_BYTES still wins over both.

    Resolved by 165209d894.

    github-actions[bot] github-actions[bot] commented on Nov 25, 2026 08:02 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-oci-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 10% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 10%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    github-actions[bot] github-actions[bot] commented on Nov 25, 2026 08:02 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-ruby64-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 8% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 8%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    amd-argus[bot] amd-argus[bot] commented on Nov 25, 2026 15:57 UTC
    Reviewer

    <!-- argus:v1 pr=16695 sha=f6b22f146685 mode=re-review -->

    ARGUS

    Impact

    <details>
    <summary>Reaches gfx1250; the PR targets gfx1250; 7 test(s) to run, 12 heatmap cell(s) to measure</summary>

    gfx1250 only, through the SPX table (also used for CPX, unreported-partition and mixed-partition comms) and the DPX table. Eager registered sum AllReduce from 8M to 256M moves from CE-registered (or the SPX DDA LL128 re-route, which can no longer fire eagerly) to symk, up to nRanks x 128K (DPX) or 256K (SPX, 16+ ranks) elements capped at 32M, and to Ring above that or wherever the cap is below 8M. Non-sum ops keep CE to 4M and take Ring above. fp8 already ran Ring and only gains symk at 8M+ on 64+ DPX / 32+ SPX ranks. Registered AllGather keeps CE to 32M on SPX (for types DDA rejects, and for unaligned or non-16B-multiple buffers DDA LL128 rejects) and takes Ring above it. On DPX it loses CE at every size: below the 16M hierarchical symk window, DDA-ineligible types and buffers go to Ring. Graph capture and CTAPolicy=ZERO are unchanged, and other arches are unchanged because their new fields are 0. Reaches gfx1250; the PR targets gfx1250.

    Tests that exercise this change

  • test_categories_micro.yaml quick, WrapMicrotestIsolated.: host selection tests against the real gfx1250 SPX/DPX tables: the rank- and type-scaled symk cap, the 4M AR window and the AG 32M/0 window (projects/rccl/test/test_categories_micro.yaml)

  • rccl-UnitTestsFixturesDebug quick, RcclAllGatherCeRegisteredWindow.: the AllGather CE-registered window gate whose gfx1250 ceRegMax changed (projects/rccl/test/test_categories_fixtures_debug.yaml)

  • rccl-UnitTestsMPI quick_env_ce_allreduce, CeMPI_AllReduce.: CE AllReduce under CTA policy ZERO, which the PR says still takes CE at every size (projects/rccl/test/test_categories_mpi.yaml)

  • rccl-UnitTests standard, AllReduce.: AllReduce across datatypes and reduce ops, including non-sum ops and DDA-ineligible types whose CE window shrank to 4M (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTests standard, AllGather.: AllGather across datatypes, including int types that lose CE on DPX and above 32M on SPX (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTests standard, Register.: registered-buffer paths that reach the CE-registered / symk selection (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTestsMPI standard, GraphCapture_AllReduce.*: graph capture must keep symMaxR2Graph and the SPX capture re-route unchanged (projects/rccl/test/test_categories_mpi.yaml)
  • Heatmap cells to measure, baseline against this PR, interleaved A/B

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks: CE-registered to symk up to 8M, then Ring

  • gfx1250 all_reduce bfloat16/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks, bf16 cap 4M is below symMinR2: CE-registered to Ring from 8M

  • gfx1250 all_reduce float/sum, 1 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node) (not measured in the heatmap): 8-rank and 2/4-rank sub-node DPX comms: CE-registered to Ring from 8M

  • gfx1250 all_reduce float/sum, 16 node(s), 32 MiB to 64 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node) (not measured in the heatmap): 128 DPX ranks: symk stops at the 32M ceiling and Ring takes over, past the measured 64-rank set

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks are below arSymMaxR2MinRanks: CE-registered / DDA LL128 re-route to Ring from 8M

  • gfx1250 all_reduce float/sum, 4 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks: CE / DDA re-route to symk up to 16M, then Ring

  • gfx1250 all_reduce bfloat16/sum, 8 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 32 SPX ranks, bf16: symk up to 16M, then Ring where the DDA re-route ran at 32M

  • gfx1250 all_gather float, 2 node(s), 128 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks: CE-registered closed above 32M, so Ring takes over above the 128M DDA LL128 cap

  • gfx1250 all_gather bfloat16, 4 node(s), 256 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks: Ring replaces CE above the 256M DDA LL128 clip

  • gfx1250 all_gather any, 2 node(s), 32 MiB to 64 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): new 32M SPX window edge: int types and unaligned buffers DDA rejects move CE to Ring

  • gfx1250 all_gather float, 2 node(s), 64 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): DPX AllGather CE-registered closed: hierarchical symk from 16M, Ring where it is skipped

  • gfx1250 all_gather any, 4 node(s), 2 MiB to 16 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node) (not measured in the heatmap): 32 DPX ranks: int8/int32/int64/fp64 AllGather below the 16M hier window moves CE to Ring, and the DDA-ineligible run stopped at 2 nodes
  • </details>

    Bottom line: LGTM.

    <sub>Comment <code>@argus review</code> to re-run, or <code>@argus re-review</code> after pushing.</sub>

    github-actions[bot] github-actions[bot] commented on Nov 25, 2026 16:24 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-oci-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 10% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 10%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    github-actions[bot] github-actions[bot] commented on Nov 25, 2026 16:24 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-ruby64-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 8% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 8%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    PedramAlizadeh PedramAlizadeh commented on code on Nov 25, 2026 17:59 UTC
    Code Review
    projects/rccl/src/rccl_arch_thresholds.cc:1
    @@ -138,9 +138,9 @@ static const rcclArchThresholds rcclArchThresholds_gfx1250 = {
       .ceRegMax = {
         0,                             // [0] Broadcast      -- not used
         0,                             // [1] Reduce          -- not used
    -    8ULL*1024*1024*1024,           // [2] AllGather
    +    0,                             // [2] AllGather       -- 0 = disabled: Ring beats CE 1.4-1.8x from 256M (SPX)

    Addressed in f6b22f1466. In SPX these types have no DDA, SymTDM or symk path between 2 MB and 32 MB, and CE beats Ring there by up to 7x on 2-8 nodes (Ring wins from 64 MB), so the SPX ceRegMax[AllGather] is now 32 MB. DDA-eligible types still take DDA, SymTDM or symk before CE, so only these types use it. DPX stays at 0: measured on 1 and 2 DPX nodes, int8, int32 and fp64 AllGather gain 24-65% at 2-8 MB (Ring LL instead of CE) and are within 4% from 16 MB (hierarchical symk on both). Covered by AllGatherCeRegisteredWindow_Gfx1250SpxTo32MDpxClosed.

    PedramAlizadeh PedramAlizadeh commented on code on Nov 25, 2026 17:59 UTC
    Code Review
    projects/rccl/src/rccl_arch_thresholds.cc:1
    @@ -408,9 +414,9 @@ static const rcclArchThresholds rcclArchThresholds_gfx1250_dpx = {
       .ceRegMax = {
         0,                             // [0] Broadcast      -- not used
         0,                             // [1] Reduce          -- not used
    -    8ULL*1024*1024*1024,           // [2] AllGather
    +    0,                             // [2] AllGather       -- 0 = disabled: hier symk beats CE 2.5-4x from 16M, Ring 2.4x (DPX)
         0,                             // [3] ReduceScatter   -- not used
    -    256ULL*1024*1024,              // [4] AllReduce
    +    4ULL*1024*1024,                // [4] AllReduce       -- non-sum ops below symMinR2; symk or Ring beats CE 1.3-3.4x from 8M (DPX)

    Measured on one DPX node, two alternating rounds of develop and this PR, -R 2, fp32, bf16 and int32 sum and fp32 max: from 8 MB to 256 MB this PR is 46-197% faster on 2 ranks and 178-249% faster on 4 ranks (Ring instead of CE), and the path is unchanged below 8 MB; 0 wrong values. No code change needed; f6b22f1466 adds host checks that 2-, 4- and 8-rank comms take Ring from 8 MB in DPX and SPX.

    mustafabar mustafabar approved these changes on Nov 25, 2026 18:56 UTC
    Approved Reviewer

    LGTM

    mustafabar mustafabar commented on Nov 25, 2026 18:59 UTC
    Reviewer

    Can you make sure that the environment variables to FORCE_CE are functional, and make sure we have tests to make sure this is the case?

    PedramAlizadeh PedramAlizadeh commented on Nov 25, 2026 19:29 UTC
    Author

    @mustafabar Checked on gfx1250 (8 DPX ranks), develop vs this PR, 0 wrong values:

  • This PR doesn't change the RCCL_FORCE_CE / RCCL_FORCE_CE_ALLREDUCE logic, only the gfx1250 table values.

  • RCCL_FORCE_CE_ALLREDUCE permits the CE AllReduce paths but doesn't force them; that was already true on develop. With -R 0, DDA still takes ≤128M on both builds. With -R 2, develop's CE at 8–256M came from the old 256M registered window, not from the flag (at 512M it was already Ring with the flag set).

  • To force CE for registered buffers, use NCCL_CTA_POLICY=2 (CE preferred at any size) or raise RCCL_CE_AR_REG_MAX_MSG_BYTES. With RCCL_CE_AR_REG_MAX_MSG_BYTES=256M this PR picks CE at 8–256M with the same bandwidth as develop.

  • RCCL_FORCE_CE (CE scratch for unregistered AllGather/AlltoAll/Gather/Scatter) isn't touched; it's covered by the existing SelectAllGather_ExplicitForceCeForcesCeScratch, SelectAllGather_CtaZeroKeepsCeScratch and SelectAlltoAll_CeScratchFollowsForceCeScratchResolver host tests.
  • Tests against the real gfx1250 tables:

  • SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M: CTA ZERO picks CE at 8M/64M/1G, and RCCL_CE_AR_REG_MAX_MSG_BYTES=0 turns it off.

  • New in 8270c106f7, SelectAllReduce_Gfx1250ForceCeAllReduceKeepsCeRegisteredWindow: RCCL_FORCE_CE_ALLREDUCE=1 keeps the 4M window (Ring at 8M/256M), and RCCL_CE_AR_REG_MAX_MSG_BYTES=256M gives CE at 8M/256M and Ring at 512M.
  • If we want RCCL_FORCE_CE_ALLREDUCE=1 to really force CE (ahead of DDA, ignoring the registered window), that changes behaviour for all architectures, so I'd do it in a separate PR.

    amd-argus[bot] amd-argus[bot] commented on Nov 25, 2026 20:01 UTC
    Reviewer

    <!-- argus:v1 pr=16695 sha=8270c106f776 mode=re-review -->

    ARGUS

    Impact

    <details>
    <summary>Reaches gfx1250; the PR targets gfx1250; 3 test(s) to run, 10 heatmap cell(s) to measure</summary>

    gfx1250 only, in both the SPX and DPX tables. CPX and mixed-partition comms also use the SPX table (init.cc:1344-1366). Registered (-R 2, symmetric window) eager AllReduce: CE-registered now ends at 4M (was 256M). Sum in fp32/fp16/bf16/fp8 runs symk from 8M up to nRanks x 256K (SPX, 16+ ranks) or 128K (DPX, any comm) elements x type size, capped at 32M, then Ring. max/min/prod take CE up to 4M, then Ring. fp64 and integer types have no symk on AMD, so they go CE to 4M, then Ring. Registered AllGather: CE-registered window goes from 8G to 32M (SPX) and is closed on DPX. Unchanged: graph capture, -R 0/-R 1, CTAPolicy=ZERO, AllReduce-with-bias, and every other arch (new fields are 0, so rcclArSymMaxR2CapTab returns symMaxR2). The selector logs symMaxR2 at rccl_wrap.cc:2104, so the new cap shows up in TUNING logs. Reaches gfx1250; the PR targets gfx1250.

    Tests that exercise this change

  • test_categories_micro.yaml quick, WrapMicrotestIsolated.: host selector tests against the real gfx1250 SPX/DPX tables: symk cap per rank count and type, the 4M CE-registered window, the AllGather window, and the eager/capture re-route (projects/rccl/test/test_categories_micro.yaml)

  • rccl-UnitTestsFixturesDebug quick, RcclAllGatherCeRegisteredWindow.: covers the AllGather CE-registered window gate whose ceRegMax[AllGather] entry this PR changes (projects/rccl/test/test_categories_fixtures_debug.yaml)

  • rccl-UnitTestsMPI quick_env_ce_allreduce, CeMPI_AllReduce.*: runs CE AllReduce under NCCL_CTA_POLICY=2, the path the PR says still picks CE at every size (projects/rccl/test/test_categories_mpi.yaml)
  • Heatmap cells to measure, baseline against this PR, interleaved A/B

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 8 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks: fp32 cap = 8M, so registered sum moves CE -&gt; symk at 8M

  • gfx1250 all_reduce float/sum, 2 node(s), 16 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): above the 16-rank DPX symk cap, registered sum moves CE-registered -&gt; Ring

  • gfx1250 all_reduce bfloat16/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks: bf16 cap is 4M, below symMinR2, so CE-registered -&gt; Ring from 8M

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks are below arSymMaxR2MinRanks: the eager DDA LL128 re-route at 8M and CE-registered to 256M both become Ring

  • gfx1250 all_reduce bfloat16/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks bf16: CE-registered / re-route -&gt; Ring from 8M

  • gfx1250 all_reduce float/sum, 4 node(s), 8 MiB to 16 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks: per-rank cap gives fp32 symk to 16M (was DDA re-route / CE)

  • gfx1250 all_reduce float/sum, 8 node(s), 8 MiB to 32 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 32 SPX ranks: fp32 symk to the 32M ceiling

  • gfx1250 all_reduce float/sum, 8 node(s), 8 MiB to 32 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node) (not measured in the heatmap): 64 DPX ranks: fp32 symk to the 32M ceiling, then Ring

  • gfx1250 all_gather float, 2 node(s), 256 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): SPX ceRegMax[AllGather] 8G -&gt; 32M: above the DDA/TDM caps, registered AllGather moves CE -&gt; Ring/Direct

  • gfx1250 all_gather float, 2 node(s), 2 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): DPX ceRegMax[AllGather] = 0 closes CE-registered wherever hier symk or DDA does not take the call
  • </details>

    Bottom line: LGTM.

    <sub>Comment <code>@argus review</code> to re-run, or <code>@argus re-review</code> after pushing.</sub>

    amd-argus[bot] amd-argus[bot] commented on code on Nov 25, 2026 20:01 UTC
    Code Review
    projects/rccl/src/rccl_arch_thresholds.cc:1
    @@ -138,9 +138,9 @@ static const rcclArchThresholds rcclArchThresholds_gfx1250 = {
       .ceRegMax = {
         0,                             // [0] Broadcast      -- not used
         0,                             // [1] Reduce          -- not used
    -    8ULL*1024*1024*1024,           // [2] AllGather
    +    0,                             // [2] AllGather       -- 0 = disabled: Ring beats CE 1.4-1.8x from 256M (SPX)

    Resolved by a later commit.

    amd-argus[bot] amd-argus[bot] commented on code on Nov 25, 2026 20:01 UTC
    Code Review
    projects/rccl/src/rccl_arch_thresholds.cc:1
    @@ -408,9 +414,9 @@ static const rcclArchThresholds rcclArchThresholds_gfx1250_dpx = {
       .ceRegMax = {
         0,                             // [0] Broadcast      -- not used
         0,                             // [1] Reduce          -- not used
    -    8ULL*1024*1024*1024,           // [2] AllGather
    +    0,                             // [2] AllGather       -- 0 = disabled: hier symk beats CE 2.5-4x from 16M, Ring 2.4x (DPX)
         0,                             // [3] ReduceScatter   -- not used
    -    256ULL*1024*1024,              // [4] AllReduce
    +    4ULL*1024*1024,                // [4] AllReduce       -- non-sum ops below symMinR2; symk or Ring beats CE 1.3-3.4x from 8M (DPX)

    Resolved by a later commit.

    github-actions[bot] github-actions[bot] commented on Nov 25, 2026 20:14 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-oci-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 10% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 10%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    github-actions[bot] github-actions[bot] commented on Nov 25, 2026 20:14 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-ruby64-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 8% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 8%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    srirajpaul srirajpaul approved these changes on Nov 25, 2026 23:41 UTC
    Approved Reviewer

    Approved these changes.

    alex-breslow-amd alex-breslow-amd commented on code on Nov 30, 2026 23:43 UTC
    Code Review
    projects/rccl/test/DdaAllReduceMPITests.cpp:1
    @@ -1394,6 +1394,13 @@ TEST_F(DdaMPI_AllReduceRegistered, EagerSumsWithinCeGrid)
         {
             GTEST_SKIP() << offSkip;
         }
    +    const std::string windowSkip = mpiCoordinatedSkipReason(

    This skip removes the only GPU coverage of the eager DDA LL128 re-route on gfx1250, but that path is still reachable when a user raises RCCL_CE_AR_REG_MAX_MSG_BYTES. With it set to 256M, the selector picks DDA LL128 for fp32 sum at 8M on 8 SPX ranks: I checked with a host probe against the real SPX table. Could this test set RCCL_CE_AR_REG_MAX_MSG_BYTES before comm init instead of skipping, so the re-route keeps running on hardware?

    alex-breslow-amd alex-breslow-amd commented on code on Nov 30, 2026 23:43 UTC
    Code Review
    projects/rccl/test/host/wrap-test.cc:1
    @@ -9056,27 +9057,238 @@ TEST(WrapMicrotestIsolated, SelectAllReduce_RegisteredRerouteFollowsTheArchTable
             RegisteredAr ar(8);
             ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_SPX);
             ASSERT_NE(nullptr, ar.comm_->archThresholds);
    -        rcclCollDecision d = ar.Select(8 * kMiB, /*capturing=*/false);
    -        EXPECT_EQ(ll128, d.algo) << "SPX eager";
    -        EXPECT_EQ(256u, d.ddaCap.threads);
    -        d = ar.Select(16 * kMiB, /*capturing=*/true);
    +        ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, "SPX eager, above the CE-registered window");
    +        rcclCollDecision d = ar.Select(16 * kMiB, /*capturing=*/true);
             EXPECT_EQ(ll128, d.algo) << "SPX capture";
             EXPECT_EQ(96u, d.ddaCap.blocks);
             ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
             ASSERT_NE(nullptr, ar.comm_->archThresholds);
    -        ar.ExpectUnchanged(8 * kMiB, false, ceReg, "DPX eager");
    +        ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, "DPX eager, above the CE-registered window");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "DPX capture");
             ar.comm_->archThresholds = nullptr;
             ar.ExpectUnchanged(8 * kMiB, false, ceReg, "no table, eager");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "no table, capture");
             ar.comm_->archThresholds = &ar.table_;
    -        EXPECT_EQ(ll128, ar.Select(8 * kMiB, false).algo) << "the fixture's table re-routes";
    +        d = ar.Select(8 * kMiB, false);
    +        EXPECT_EQ(ll128, d.algo) << "the fixture's table re-routes";
    +        EXPECT_EQ(256u, d.ddaCap.threads);
             ignoreTable = 1;
             ar.ExpectUnchanged(8 * kMiB, false, ceReg, "RCCL_IGNORE_ARCH_TABLE=1, eager");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "RCCL_IGNORE_ARCH_TABLE=1, capture");
           });
     }
     
    +// The gfx1250 tables set the eager AllReduce symk cap per rank in elements, so it grows with the comm and halves
    +// for 2-byte types: DPX at 128K on every comm, SPX at 256K from 16 ranks, with smaller SPX comms keeping symMaxR2.
    +// Both stop at 32M. Graph capture keeps symMaxR2Graph and RCCL_SYM_K_MAX_BYTES wins over both.
    +TEST(WrapMicrotestIsolated, ArSymMaxR2Cap_Gfx1250ScalesWithRanks) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_ArSymMaxR2Cap_Gfx1250ScalesWithRanks",
    +      []() {
    +        int64_t symkMax = -1;
    +        g_loadParam = [&symkMax](const char* env, int64_t def) -> int64_t {
    +          return std::strcmp(env, "RCCL_SYM_K_MAX_BYTES") == 0 ? symkMax : def;
    +        };
    +        ncclComm* comm = MakeCommWithArch("gfx1250");
    +        const rcclArchThresholds* dpx = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
    +        const rcclArchThresholds* spx = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_SPX);
    +        ASSERT_NE(nullptr, dpx);
    +        ASSERT_NE(nullptr, spx);
    +        struct Cap { int nRanks; size_t fp32, bf16, fp8; };
    +        const size_t spxTotal = spx->symMaxR2[ncclFuncAllReduce];
    +        const struct {
    +          const rcclArchThresholds* table;
    +          const char* name;
    +          std::vector<Cap> caps;
    +        } tables[] = {{dpx,
    +                       "DPX",
    +                       {{8, 4 * kMiB, 2 * kMiB, 1 * kMiB},
    +                        {16, 8 * kMiB, 4 * kMiB, 2 * kMiB},
    +                        {32, 16 * kMiB, 8 * kMiB, 4 * kMiB},
    +                        {64, 32 * kMiB, 16 * kMiB, 8 * kMiB},
    +                        {128, 32 * kMiB, 32 * kMiB, 16 * kMiB}}},
    +                      {spx,
    +                       "SPX",
    +                       {{8, spxTotal, spxTotal, spxTotal},
    +                        {16, 16 * kMiB, 8 * kMiB, 4 * kMiB},
    +                        {32, 32 * kMiB, 16 * kMiB, 8 * kMiB},
    +                        {64, 32 * kMiB, 32 * kMiB, 16 * kMiB},
    +                        {128, 32 * kMiB, 32 * kMiB, 32 * kMiB}}}};
    +        for (const auto& t : tables) {
    +          comm->archThresholds = t.table;
    +          for (const auto& c : t.caps) {
    +            comm->nRanks = c.nRanks;
    +            EXPECT_EQ(c.fp32, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat32)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.bf16, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclBfloat16)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.bf16, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat16)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.fp8, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat8e4m3)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(t.table->symMaxR2Graph[ncclFuncAllReduce],
    +                      rcclArSymMaxR2Cap(comm, /*graphMode=*/true, ncclFloat32))
    +                << t.name << " " << c.nRanks;
    +          }
    +          symkMax = 4 * kMiB;
    +          EXPECT_EQ(4 * kMiB, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat32))
    +              << t.name << " RCCL_SYM_K_MAX_BYTES";
    +          symkMax = -1;
    +        }
    +        comm->nRanks = 1;
    +        DeleteCommWithArch(comm);
    +      });
    +}
    +
    +// gfx1250 DPX and SPX, registered eager sum AllReduce: symk from symMinR2 (8M) to the rank- and type-scaled cap
    +// (DPX on every comm, SPX from 16 ranks), Ring above it, and never CE-registered or the DDA LL128 re-route. Comms
    +// whose cap is below symMinR2 (2-8 ranks) take Ring from 8M. DPX capture keeps Ring; SPX capture re-routes to DDA (tested
    +// with the re-route). Each size is a whole number of elements per rank.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250RegisteredSymkThenRing) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250RegisteredSymkThenRing",
    +      []() {
    +        const int symk = (int)rcclAddonAlgos_t::RCCL_SYMMETRIC;
    +        struct Bf16 { int nRanks; size_t cap; };
    +        const struct {
    +          rcclTuningPartition partition;
    +          const char* name;
    +          std::vector<std::pair<int, size_t>> fp32Caps;
    +          std::vector<Bf16> bf16Caps;
    +          bool captureRing;
    +        } tables[] = {{RCCL_TUNING_PARTITION_DPX,
    +                       "DPX",
    +                       {{16, 8 * kMiB}, {32, 16 * kMiB}, {64, 32 * kMiB}, {128, 32 * kMiB}},
    +                       {{32, 8 * kMiB}, {64, 16 * kMiB}},
    +                       true},
    +                      {RCCL_TUNING_PARTITION_SPX,
    +                       "SPX",
    +                       {{16, 16 * kMiB}, {32, 32 * kMiB}, {64, 32 * kMiB}},
    +                       {{16, 8 * kMiB}, {32, 16 * kMiB}},
    +                       false}};
    +        RegisteredAr ar(8);
    +        for (const auto& t : tables) {
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", t.partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          for (const auto& c : t.fp32Caps) {
    +            ar.SetRanks(c.first);
    +            const std::string at = std::string(t.name) + " " + std::to_string(c.first) + " ranks, ";
    +            const size_t step = sizeof(float) * (size_t)c.first;
    +            ar.ExpectUnchanged(8 * kMiB, false, symk, (at + "symMinR2").c_str());
    +            ar.ExpectUnchanged(c.second, false, symk, (at + "symk cap").c_str());
    +            ar.ExpectUnchanged(c.second + step, false, NCCL_ALGO_RING, (at + "above the symk cap").c_str());
    +            ar.ExpectUnchanged(256 * kMiB, false, NCCL_ALGO_RING, (at + "old CE-registered ceiling").c_str());
    +            if (t.captureRing) ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, (at + "capture").c_str());
    +          }
    +          for (const auto& c : t.bf16Caps) {
    +            ar.SetRanks(c.nRanks);
    +            EXPECT_EQ(symk, ar.Select(c.cap, false, true, ncclSum, ncclBfloat16).algo)
    +                << t.name << " " << c.nRanks << " ranks, bf16 symk cap";
    +            EXPECT_EQ(NCCL_ALGO_RING, ar.Select(2 * c.cap, false, true, ncclSum, ncclBfloat16).algo)
    +                << t.name << " " << c.nRanks << " ranks, bf16 above the cap";
    +          }
    +          for (int nRanks : {2, 4, 8}) {
    +            ar.SetRanks(nRanks);
    +            const std::string at = std::string(t.name) + " " + std::to_string(nRanks) + " ranks, ";
    +            ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, (at + "cap below symMinR2").c_str());
    +            ar.ExpectUnchanged(256 * kMiB, false, NCCL_ALGO_RING, (at + "old CE-registered ceiling").c_str());
    +          }
    +        }
    +        ar.SetRanks(16);
    +        ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
    +        EXPECT_EQ(NCCL_ALGO_RING, ar.Select(8 * kMiB, false, true, ncclSum, ncclBfloat16).algo)
    +            << "DPX 16 ranks, bf16 cap below symMinR2";
    +      });
    +}
    +
    +// gfx1250 DPX and SPX: the AllReduce CE-registered window ends at 4M, so only ops symk and DDA cannot take (max)
    +// reach it, and Ring takes them above it. CTAPolicy=ZERO still takes CE at every size unless
    +// RCCL_CE_AR_REG_MAX_MSG_BYTES=0.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M",
    +      []() {
    +        int64_t ceArRegMax = -1;
    +        g_loadParam = [&ceArRegMax](const char* env, int64_t def) -> int64_t {
    +          return std::strcmp(env, "RCCL_CE_AR_REG_MAX_MSG_BYTES") == 0 ? ceArRegMax : def;
    +        };
    +        const int ceReg = (int)rcclAddonAlgos_t::RCCL_CE_REGISTERED;
    +        RegisteredAr ar(16);
    +        for (rcclTuningPartition partition : {RCCL_TUNING_PARTITION_DPX, RCCL_TUNING_PARTITION_SPX}) {
    +          const char* name = partition == RCCL_TUNING_PARTITION_DPX ? "DPX" : "SPX";
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          EXPECT_EQ(ceReg, ar.Select(4 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " max, 4M";
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(8 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " max, 8M";
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(256 * kMiB, /*capturing=*/false, true, ncclMax).algo)
    +              << name << " max, 256M";
    +          ar.comm_->config.CTAPolicy = NCCL_CTA_POLICY_ZERO;
    +          for (size_t bytes : {8 * kMiB, 64 * kMiB, 1024 * kMiB}) {
    +            EXPECT_EQ(ceReg, ar.Select(bytes, /*capturing=*/false).algo) << name << " " << bytes;
    +          }
    +          ceArRegMax = 0;
    +          EXPECT_NE(ceReg, ar.Select(64 * kMiB, /*capturing=*/false).algo) << name << " RCCL_CE_AR_REG_MAX_MSG_BYTES=0";
    +          ceArRegMax = -1;
    +          ar.comm_->config.CTAPolicy = NCCL_CTA_POLICY_DEFAULT;
    +        }
    +      });
    +}
    +
    +// gfx1250 DPX and SPX, registered buffers: RCCL_FORCE_CE_ALLREDUCE=1 allows CE but does not widen the 4M
    +// CE-registered window, so Ring keeps 8M and above; RCCL_CE_AR_REG_MAX_MSG_BYTES widens it.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250ForceCeAllReduceKeepsCeRegisteredWindow) {

    This only covers ncclMax, and sum behaves differently once RCCL_CE_AR_REG_MAX_MSG_BYTES is widened. I probed fp32 and bf16 sum with RCCL_CE_AR_REG_MAX_MSG_BYTES=256M against the real gfx1250 tables:

  • DPX 4/8 ranks: CE from 8M to 256M, as the earlier reply says.

  • DPX 16 ranks fp32: symk at 8M, then CE from 16M.

  • SPX 8 ranks fp32: DDA LL128 at 8M (the eager re-route comes back), then CE from 16M.

  • SPX 16 ranks: symk at 8-16M for fp32; for bf16, symk at 8M and DDA LL128 at 16M.

  • SPX 32 ranks bf16: DDA LL128 at 32M.
  • So widening RCCL_CE_AR_REG_MAX_MSG_BYTES gives back develop's CE selection only on 4- and 8-rank DPX comms; it isn't a full rollback. Could we add sum cases here (SPX 8 ranks, and 16/32 ranks on both tables), and note the limitation in the changelog or env-var docs?

    alex-breslow-amd alex-breslow-amd commented on code on Nov 30, 2026 23:43 UTC
    Code Review
    projects/rccl/test/host/wrap-test.cc:1
    @@ -9056,27 +9057,238 @@ TEST(WrapMicrotestIsolated, SelectAllReduce_RegisteredRerouteFollowsTheArchTable
             RegisteredAr ar(8);
             ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_SPX);
             ASSERT_NE(nullptr, ar.comm_->archThresholds);
    -        rcclCollDecision d = ar.Select(8 * kMiB, /*capturing=*/false);
    -        EXPECT_EQ(ll128, d.algo) << "SPX eager";
    -        EXPECT_EQ(256u, d.ddaCap.threads);
    -        d = ar.Select(16 * kMiB, /*capturing=*/true);
    +        ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, "SPX eager, above the CE-registered window");
    +        rcclCollDecision d = ar.Select(16 * kMiB, /*capturing=*/true);
             EXPECT_EQ(ll128, d.algo) << "SPX capture";
             EXPECT_EQ(96u, d.ddaCap.blocks);
             ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
             ASSERT_NE(nullptr, ar.comm_->archThresholds);
    -        ar.ExpectUnchanged(8 * kMiB, false, ceReg, "DPX eager");
    +        ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, "DPX eager, above the CE-registered window");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "DPX capture");
             ar.comm_->archThresholds = nullptr;
             ar.ExpectUnchanged(8 * kMiB, false, ceReg, "no table, eager");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "no table, capture");
             ar.comm_->archThresholds = &ar.table_;
    -        EXPECT_EQ(ll128, ar.Select(8 * kMiB, false).algo) << "the fixture's table re-routes";
    +        d = ar.Select(8 * kMiB, false);
    +        EXPECT_EQ(ll128, d.algo) << "the fixture's table re-routes";
    +        EXPECT_EQ(256u, d.ddaCap.threads);
             ignoreTable = 1;
             ar.ExpectUnchanged(8 * kMiB, false, ceReg, "RCCL_IGNORE_ARCH_TABLE=1, eager");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "RCCL_IGNORE_ARCH_TABLE=1, capture");
           });
     }
     
    +// The gfx1250 tables set the eager AllReduce symk cap per rank in elements, so it grows with the comm and halves
    +// for 2-byte types: DPX at 128K on every comm, SPX at 256K from 16 ranks, with smaller SPX comms keeping symMaxR2.
    +// Both stop at 32M. Graph capture keeps symMaxR2Graph and RCCL_SYM_K_MAX_BYTES wins over both.
    +TEST(WrapMicrotestIsolated, ArSymMaxR2Cap_Gfx1250ScalesWithRanks) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_ArSymMaxR2Cap_Gfx1250ScalesWithRanks",
    +      []() {
    +        int64_t symkMax = -1;
    +        g_loadParam = [&symkMax](const char* env, int64_t def) -> int64_t {
    +          return std::strcmp(env, "RCCL_SYM_K_MAX_BYTES") == 0 ? symkMax : def;
    +        };
    +        ncclComm* comm = MakeCommWithArch("gfx1250");
    +        const rcclArchThresholds* dpx = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
    +        const rcclArchThresholds* spx = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_SPX);
    +        ASSERT_NE(nullptr, dpx);
    +        ASSERT_NE(nullptr, spx);
    +        struct Cap { int nRanks; size_t fp32, bf16, fp8; };
    +        const size_t spxTotal = spx->symMaxR2[ncclFuncAllReduce];
    +        const struct {
    +          const rcclArchThresholds* table;
    +          const char* name;
    +          std::vector<Cap> caps;
    +        } tables[] = {{dpx,
    +                       "DPX",
    +                       {{8, 4 * kMiB, 2 * kMiB, 1 * kMiB},
    +                        {16, 8 * kMiB, 4 * kMiB, 2 * kMiB},
    +                        {32, 16 * kMiB, 8 * kMiB, 4 * kMiB},
    +                        {64, 32 * kMiB, 16 * kMiB, 8 * kMiB},
    +                        {128, 32 * kMiB, 32 * kMiB, 16 * kMiB}}},
    +                      {spx,
    +                       "SPX",
    +                       {{8, spxTotal, spxTotal, spxTotal},
    +                        {16, 16 * kMiB, 8 * kMiB, 4 * kMiB},
    +                        {32, 32 * kMiB, 16 * kMiB, 8 * kMiB},
    +                        {64, 32 * kMiB, 32 * kMiB, 16 * kMiB},
    +                        {128, 32 * kMiB, 32 * kMiB, 32 * kMiB}}}};
    +        for (const auto& t : tables) {
    +          comm->archThresholds = t.table;
    +          for (const auto& c : t.caps) {
    +            comm->nRanks = c.nRanks;
    +            EXPECT_EQ(c.fp32, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat32)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.bf16, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclBfloat16)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.bf16, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat16)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.fp8, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat8e4m3)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(t.table->symMaxR2Graph[ncclFuncAllReduce],
    +                      rcclArSymMaxR2Cap(comm, /*graphMode=*/true, ncclFloat32))
    +                << t.name << " " << c.nRanks;
    +          }
    +          symkMax = 4 * kMiB;
    +          EXPECT_EQ(4 * kMiB, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat32))
    +              << t.name << " RCCL_SYM_K_MAX_BYTES";
    +          symkMax = -1;
    +        }
    +        comm->nRanks = 1;
    +        DeleteCommWithArch(comm);
    +      });
    +}
    +
    +// gfx1250 DPX and SPX, registered eager sum AllReduce: symk from symMinR2 (8M) to the rank- and type-scaled cap
    +// (DPX on every comm, SPX from 16 ranks), Ring above it, and never CE-registered or the DDA LL128 re-route. Comms
    +// whose cap is below symMinR2 (2-8 ranks) take Ring from 8M. DPX capture keeps Ring; SPX capture re-routes to DDA (tested
    +// with the re-route). Each size is a whole number of elements per rank.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250RegisteredSymkThenRing) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250RegisteredSymkThenRing",
    +      []() {
    +        const int symk = (int)rcclAddonAlgos_t::RCCL_SYMMETRIC;
    +        struct Bf16 { int nRanks; size_t cap; };
    +        const struct {
    +          rcclTuningPartition partition;
    +          const char* name;
    +          std::vector<std::pair<int, size_t>> fp32Caps;
    +          std::vector<Bf16> bf16Caps;
    +          bool captureRing;
    +        } tables[] = {{RCCL_TUNING_PARTITION_DPX,
    +                       "DPX",
    +                       {{16, 8 * kMiB}, {32, 16 * kMiB}, {64, 32 * kMiB}, {128, 32 * kMiB}},
    +                       {{32, 8 * kMiB}, {64, 16 * kMiB}},
    +                       true},
    +                      {RCCL_TUNING_PARTITION_SPX,
    +                       "SPX",
    +                       {{16, 16 * kMiB}, {32, 32 * kMiB}, {64, 32 * kMiB}},
    +                       {{16, 8 * kMiB}, {32, 16 * kMiB}},
    +                       false}};
    +        RegisteredAr ar(8);
    +        for (const auto& t : tables) {
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", t.partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          for (const auto& c : t.fp32Caps) {
    +            ar.SetRanks(c.first);
    +            const std::string at = std::string(t.name) + " " + std::to_string(c.first) + " ranks, ";
    +            const size_t step = sizeof(float) * (size_t)c.first;
    +            ar.ExpectUnchanged(8 * kMiB, false, symk, (at + "symMinR2").c_str());
    +            ar.ExpectUnchanged(c.second, false, symk, (at + "symk cap").c_str());
    +            ar.ExpectUnchanged(c.second + step, false, NCCL_ALGO_RING, (at + "above the symk cap").c_str());
    +            ar.ExpectUnchanged(256 * kMiB, false, NCCL_ALGO_RING, (at + "old CE-registered ceiling").c_str());
    +            if (t.captureRing) ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, (at + "capture").c_str());
    +          }
    +          for (const auto& c : t.bf16Caps) {
    +            ar.SetRanks(c.nRanks);
    +            EXPECT_EQ(symk, ar.Select(c.cap, false, true, ncclSum, ncclBfloat16).algo)
    +                << t.name << " " << c.nRanks << " ranks, bf16 symk cap";
    +            EXPECT_EQ(NCCL_ALGO_RING, ar.Select(2 * c.cap, false, true, ncclSum, ncclBfloat16).algo)
    +                << t.name << " " << c.nRanks << " ranks, bf16 above the cap";
    +          }
    +          for (int nRanks : {2, 4, 8}) {
    +            ar.SetRanks(nRanks);
    +            const std::string at = std::string(t.name) + " " + std::to_string(nRanks) + " ranks, ";
    +            ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, (at + "cap below symMinR2").c_str());
    +            ar.ExpectUnchanged(256 * kMiB, false, NCCL_ALGO_RING, (at + "old CE-registered ceiling").c_str());
    +          }
    +        }
    +        ar.SetRanks(16);
    +        ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
    +        EXPECT_EQ(NCCL_ALGO_RING, ar.Select(8 * kMiB, false, true, ncclSum, ncclBfloat16).algo)
    +            << "DPX 16 ranks, bf16 cap below symMinR2";
    +      });
    +}
    +
    +// gfx1250 DPX and SPX: the AllReduce CE-registered window ends at 4M, so only ops symk and DDA cannot take (max)
    +// reach it, and Ring takes them above it. CTAPolicy=ZERO still takes CE at every size unless
    +// RCCL_CE_AR_REG_MAX_MSG_BYTES=0.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M",
    +      []() {
    +        int64_t ceArRegMax = -1;
    +        g_loadParam = [&ceArRegMax](const char* env, int64_t def) -> int64_t {
    +          return std::strcmp(env, "RCCL_CE_AR_REG_MAX_MSG_BYTES") == 0 ? ceArRegMax : def;
    +        };
    +        const int ceReg = (int)rcclAddonAlgos_t::RCCL_CE_REGISTERED;
    +        RegisteredAr ar(16);
    +        for (rcclTuningPartition partition : {RCCL_TUNING_PARTITION_DPX, RCCL_TUNING_PARTITION_SPX}) {
    +          const char* name = partition == RCCL_TUNING_PARTITION_DPX ? "DPX" : "SPX";
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          EXPECT_EQ(ceReg, ar.Select(4 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " max, 4M";
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(8 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " max, 8M";
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(256 * kMiB, /*capturing=*/false, true, ncclMax).algo)
    +              << name << " max, 256M";
    +          ar.comm_->config.CTAPolicy = NCCL_CTA_POLICY_ZERO;
    +          for (size_t bytes : {8 * kMiB, 64 * kMiB, 1024 * kMiB}) {
    +            EXPECT_EQ(ceReg, ar.Select(bytes, /*capturing=*/false).algo) << name << " " << bytes;
    +          }
    +          ceArRegMax = 0;
    +          EXPECT_NE(ceReg, ar.Select(64 * kMiB, /*capturing=*/false).algo) << name << " RCCL_CE_AR_REG_MAX_MSG_BYTES=0";
    +          ceArRegMax = -1;
    +          ar.comm_->config.CTAPolicy = NCCL_CTA_POLICY_DEFAULT;
    +        }
    +      });
    +}
    +
    +// gfx1250 DPX and SPX, registered buffers: RCCL_FORCE_CE_ALLREDUCE=1 allows CE but does not widen the 4M
    +// CE-registered window, so Ring keeps 8M and above; RCCL_CE_AR_REG_MAX_MSG_BYTES widens it.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250ForceCeAllReduceKeepsCeRegisteredWindow) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250ForceCeAllReduceKeepsCeRegisteredWindow",
    +      []() {
    +        int64_t forceCeAr = -1;
    +        int64_t ceArRegMax = -1;
    +        g_loadParam = [&forceCeAr, &ceArRegMax](const char* env, int64_t def) -> int64_t {
    +          if (std::strcmp(env, "RCCL_FORCE_CE_ALLREDUCE") == 0) return forceCeAr;
    +          if (std::strcmp(env, "RCCL_CE_AR_REG_MAX_MSG_BYTES") == 0) return ceArRegMax;
    +          return def;
    +        };
    +        const int ceReg = (int)rcclAddonAlgos_t::RCCL_CE_REGISTERED;
    +        RegisteredAr ar(16);
    +        for (rcclTuningPartition partition : {RCCL_TUNING_PARTITION_DPX, RCCL_TUNING_PARTITION_SPX}) {
    +          const char* name = partition == RCCL_TUNING_PARTITION_DPX ? "DPX" : "SPX";
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          forceCeAr = 1;
    +          EXPECT_EQ(ceReg, ar.Select(4 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " force, 4M";
    +          for (size_t bytes : {8 * kMiB, 256 * kMiB}) {
    +            EXPECT_EQ(NCCL_ALGO_RING, ar.Select(bytes, /*capturing=*/false, true, ncclMax).algo)
    +                << name << " force, " << bytes;
    +          }
    +          forceCeAr = -1;
    +          ceArRegMax = 256 * kMiB;
    +          for (size_t bytes : {8 * kMiB, 256 * kMiB}) {
    +            EXPECT_EQ(ceReg, ar.Select(bytes, /*capturing=*/false, true, ncclMax).algo)
    +                << name << " RCCL_CE_AR_REG_MAX_MSG_BYTES=256M, " << bytes;
    +          }
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(512 * kMiB, /*capturing=*/false, true, ncclMax).algo)
    +              << name << " RCCL_CE_AR_REG_MAX_MSG_BYTES=256M, 512M";
    +          ceArRegMax = -1;
    +        }
    +      });
    +}
    +
    +// gfx1250 SPX keeps the AllGather CE-registered window to 32M, for types DDA cannot run; DPX closes it.
    +TEST(WrapMicrotestIsolated, AllGatherCeRegisteredWindow_Gfx1250SpxTo32MDpxClosed) {

    This checks rcclAllGatherCeRegisteredWindow() directly, but nothing goes through rcclSelectAllGather for the case the 32M SPX window was kept for: a type DDA can't run. Could we add a selector-level case on the SPX table, for example int32 picking CE-registered at 32M and Ring at 64M, alongside fp32 still taking DDA or symk first? That would also catch a future change to the DDA or TDM gates sending those types somewhere unexpected.

    alex-breslow-amd alex-breslow-amd commented on Nov 30, 2026 23:43 UTC
    Reviewer

    Review of test coverage. The host-side logic looks right, and I re-ran rccl-UnitTestsMicroWrap on this branch merged with current develop on a gfx1250 box: all 564 tests pass, including the six new or updated ones. The gaps are in GPU coverage.

    1. None of the CI on this PR exercised the gfx1250 paths it changes. The only GPU test job that ran was Test gfx94X-dcgpu / Test rccl. The gfx125X-dcgpu and gfx950-dcgpu test jobs were skipped. The gfx942 table isn't touched and CE AllReduce is gfx1250-only, so that job covers nothing here. The Ruby and OCI perf smokes report flat readings, which suggests they either aren't gfx1250 or don't run -R 2. Could we get the gfx125X tests (or an MI455 smoke) dispatched for this PR, covering AllReduce., AllGather. and Register.* in rccl-UnitTests plus rccl-UnitTestsMPI?

    2. No GPU test reaches the new symk window. arSymMaxR2PerRankElems only gives symk sizes of 8M or more on comms of 16+ ranks, but CI is single-node (at most 8 ranks), and CollImplInfoTests caps at 8 ranks. So symk AllReduce at 8-32M on 16-64 ranks with -R 2 is validated only by the manual sweeps in the description. A multi-node -R 2 -c 1 correctness check in a nightly or scale-up job would cover it.

    3. Smaller gaps: CPX and unreported-partition comms also use the SPX table, and no test pins that. Counts not divisible by nRanks around the 4M CE boundary aren't covered either; CE needs divisibility, so those take another path.

    Inline comments below cover the specific tests.

    PedramAlizadeh PedramAlizadeh commented on code on Dec 03, 2026 13:23 UTC
    Code Review
    projects/rccl/test/DdaAllReduceMPITests.cpp:1
    @@ -1394,6 +1394,13 @@ TEST_F(DdaMPI_AllReduceRegistered, EagerSumsWithinCeGrid)
         {
             GTEST_SKIP() << offSkip;
         }
    +    const std::string windowSkip = mpiCoordinatedSkipReason(

    Done: the test now sets RCCL_CE_AR_REG_MAX_MSG_BYTES=256M (MpiEnvGuard) before comm init instead of skipping. RCCL_PARAM caches the value on first read, so the override takes effect when the test runs in its own process, as the MI455 test-runner entries do. The window check stays as a fallback for shared processes, with a skip reason that says so.

    PedramAlizadeh PedramAlizadeh commented on code on Dec 03, 2026 13:25 UTC
    Code Review
    projects/rccl/test/host/wrap-test.cc:1
    @@ -9056,27 +9057,238 @@ TEST(WrapMicrotestIsolated, SelectAllReduce_RegisteredRerouteFollowsTheArchTable
             RegisteredAr ar(8);
             ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_SPX);
             ASSERT_NE(nullptr, ar.comm_->archThresholds);
    -        rcclCollDecision d = ar.Select(8 * kMiB, /*capturing=*/false);
    -        EXPECT_EQ(ll128, d.algo) << "SPX eager";
    -        EXPECT_EQ(256u, d.ddaCap.threads);
    -        d = ar.Select(16 * kMiB, /*capturing=*/true);
    +        ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, "SPX eager, above the CE-registered window");
    +        rcclCollDecision d = ar.Select(16 * kMiB, /*capturing=*/true);
             EXPECT_EQ(ll128, d.algo) << "SPX capture";
             EXPECT_EQ(96u, d.ddaCap.blocks);
             ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
             ASSERT_NE(nullptr, ar.comm_->archThresholds);
    -        ar.ExpectUnchanged(8 * kMiB, false, ceReg, "DPX eager");
    +        ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, "DPX eager, above the CE-registered window");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "DPX capture");
             ar.comm_->archThresholds = nullptr;
             ar.ExpectUnchanged(8 * kMiB, false, ceReg, "no table, eager");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "no table, capture");
             ar.comm_->archThresholds = &ar.table_;
    -        EXPECT_EQ(ll128, ar.Select(8 * kMiB, false).algo) << "the fixture's table re-routes";
    +        d = ar.Select(8 * kMiB, false);
    +        EXPECT_EQ(ll128, d.algo) << "the fixture's table re-routes";
    +        EXPECT_EQ(256u, d.ddaCap.threads);
             ignoreTable = 1;
             ar.ExpectUnchanged(8 * kMiB, false, ceReg, "RCCL_IGNORE_ARCH_TABLE=1, eager");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "RCCL_IGNORE_ARCH_TABLE=1, capture");
           });
     }
     
    +// The gfx1250 tables set the eager AllReduce symk cap per rank in elements, so it grows with the comm and halves
    +// for 2-byte types: DPX at 128K on every comm, SPX at 256K from 16 ranks, with smaller SPX comms keeping symMaxR2.
    +// Both stop at 32M. Graph capture keeps symMaxR2Graph and RCCL_SYM_K_MAX_BYTES wins over both.
    +TEST(WrapMicrotestIsolated, ArSymMaxR2Cap_Gfx1250ScalesWithRanks) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_ArSymMaxR2Cap_Gfx1250ScalesWithRanks",
    +      []() {
    +        int64_t symkMax = -1;
    +        g_loadParam = [&symkMax](const char* env, int64_t def) -> int64_t {
    +          return std::strcmp(env, "RCCL_SYM_K_MAX_BYTES") == 0 ? symkMax : def;
    +        };
    +        ncclComm* comm = MakeCommWithArch("gfx1250");
    +        const rcclArchThresholds* dpx = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
    +        const rcclArchThresholds* spx = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_SPX);
    +        ASSERT_NE(nullptr, dpx);
    +        ASSERT_NE(nullptr, spx);
    +        struct Cap { int nRanks; size_t fp32, bf16, fp8; };
    +        const size_t spxTotal = spx->symMaxR2[ncclFuncAllReduce];
    +        const struct {
    +          const rcclArchThresholds* table;
    +          const char* name;
    +          std::vector<Cap> caps;
    +        } tables[] = {{dpx,
    +                       "DPX",
    +                       {{8, 4 * kMiB, 2 * kMiB, 1 * kMiB},
    +                        {16, 8 * kMiB, 4 * kMiB, 2 * kMiB},
    +                        {32, 16 * kMiB, 8 * kMiB, 4 * kMiB},
    +                        {64, 32 * kMiB, 16 * kMiB, 8 * kMiB},
    +                        {128, 32 * kMiB, 32 * kMiB, 16 * kMiB}}},
    +                      {spx,
    +                       "SPX",
    +                       {{8, spxTotal, spxTotal, spxTotal},
    +                        {16, 16 * kMiB, 8 * kMiB, 4 * kMiB},
    +                        {32, 32 * kMiB, 16 * kMiB, 8 * kMiB},
    +                        {64, 32 * kMiB, 32 * kMiB, 16 * kMiB},
    +                        {128, 32 * kMiB, 32 * kMiB, 32 * kMiB}}}};
    +        for (const auto& t : tables) {
    +          comm->archThresholds = t.table;
    +          for (const auto& c : t.caps) {
    +            comm->nRanks = c.nRanks;
    +            EXPECT_EQ(c.fp32, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat32)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.bf16, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclBfloat16)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.bf16, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat16)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.fp8, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat8e4m3)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(t.table->symMaxR2Graph[ncclFuncAllReduce],
    +                      rcclArSymMaxR2Cap(comm, /*graphMode=*/true, ncclFloat32))
    +                << t.name << " " << c.nRanks;
    +          }
    +          symkMax = 4 * kMiB;
    +          EXPECT_EQ(4 * kMiB, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat32))
    +              << t.name << " RCCL_SYM_K_MAX_BYTES";
    +          symkMax = -1;
    +        }
    +        comm->nRanks = 1;
    +        DeleteCommWithArch(comm);
    +      });
    +}
    +
    +// gfx1250 DPX and SPX, registered eager sum AllReduce: symk from symMinR2 (8M) to the rank- and type-scaled cap
    +// (DPX on every comm, SPX from 16 ranks), Ring above it, and never CE-registered or the DDA LL128 re-route. Comms
    +// whose cap is below symMinR2 (2-8 ranks) take Ring from 8M. DPX capture keeps Ring; SPX capture re-routes to DDA (tested
    +// with the re-route). Each size is a whole number of elements per rank.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250RegisteredSymkThenRing) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250RegisteredSymkThenRing",
    +      []() {
    +        const int symk = (int)rcclAddonAlgos_t::RCCL_SYMMETRIC;
    +        struct Bf16 { int nRanks; size_t cap; };
    +        const struct {
    +          rcclTuningPartition partition;
    +          const char* name;
    +          std::vector<std::pair<int, size_t>> fp32Caps;
    +          std::vector<Bf16> bf16Caps;
    +          bool captureRing;
    +        } tables[] = {{RCCL_TUNING_PARTITION_DPX,
    +                       "DPX",
    +                       {{16, 8 * kMiB}, {32, 16 * kMiB}, {64, 32 * kMiB}, {128, 32 * kMiB}},
    +                       {{32, 8 * kMiB}, {64, 16 * kMiB}},
    +                       true},
    +                      {RCCL_TUNING_PARTITION_SPX,
    +                       "SPX",
    +                       {{16, 16 * kMiB}, {32, 32 * kMiB}, {64, 32 * kMiB}},
    +                       {{16, 8 * kMiB}, {32, 16 * kMiB}},
    +                       false}};
    +        RegisteredAr ar(8);
    +        for (const auto& t : tables) {
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", t.partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          for (const auto& c : t.fp32Caps) {
    +            ar.SetRanks(c.first);
    +            const std::string at = std::string(t.name) + " " + std::to_string(c.first) + " ranks, ";
    +            const size_t step = sizeof(float) * (size_t)c.first;
    +            ar.ExpectUnchanged(8 * kMiB, false, symk, (at + "symMinR2").c_str());
    +            ar.ExpectUnchanged(c.second, false, symk, (at + "symk cap").c_str());
    +            ar.ExpectUnchanged(c.second + step, false, NCCL_ALGO_RING, (at + "above the symk cap").c_str());
    +            ar.ExpectUnchanged(256 * kMiB, false, NCCL_ALGO_RING, (at + "old CE-registered ceiling").c_str());
    +            if (t.captureRing) ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, (at + "capture").c_str());
    +          }
    +          for (const auto& c : t.bf16Caps) {
    +            ar.SetRanks(c.nRanks);
    +            EXPECT_EQ(symk, ar.Select(c.cap, false, true, ncclSum, ncclBfloat16).algo)
    +                << t.name << " " << c.nRanks << " ranks, bf16 symk cap";
    +            EXPECT_EQ(NCCL_ALGO_RING, ar.Select(2 * c.cap, false, true, ncclSum, ncclBfloat16).algo)
    +                << t.name << " " << c.nRanks << " ranks, bf16 above the cap";
    +          }
    +          for (int nRanks : {2, 4, 8}) {
    +            ar.SetRanks(nRanks);
    +            const std::string at = std::string(t.name) + " " + std::to_string(nRanks) + " ranks, ";
    +            ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, (at + "cap below symMinR2").c_str());
    +            ar.ExpectUnchanged(256 * kMiB, false, NCCL_ALGO_RING, (at + "old CE-registered ceiling").c_str());
    +          }
    +        }
    +        ar.SetRanks(16);
    +        ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
    +        EXPECT_EQ(NCCL_ALGO_RING, ar.Select(8 * kMiB, false, true, ncclSum, ncclBfloat16).algo)
    +            << "DPX 16 ranks, bf16 cap below symMinR2";
    +      });
    +}
    +
    +// gfx1250 DPX and SPX: the AllReduce CE-registered window ends at 4M, so only ops symk and DDA cannot take (max)
    +// reach it, and Ring takes them above it. CTAPolicy=ZERO still takes CE at every size unless
    +// RCCL_CE_AR_REG_MAX_MSG_BYTES=0.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M",
    +      []() {
    +        int64_t ceArRegMax = -1;
    +        g_loadParam = [&ceArRegMax](const char* env, int64_t def) -> int64_t {
    +          return std::strcmp(env, "RCCL_CE_AR_REG_MAX_MSG_BYTES") == 0 ? ceArRegMax : def;
    +        };
    +        const int ceReg = (int)rcclAddonAlgos_t::RCCL_CE_REGISTERED;
    +        RegisteredAr ar(16);
    +        for (rcclTuningPartition partition : {RCCL_TUNING_PARTITION_DPX, RCCL_TUNING_PARTITION_SPX}) {
    +          const char* name = partition == RCCL_TUNING_PARTITION_DPX ? "DPX" : "SPX";
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          EXPECT_EQ(ceReg, ar.Select(4 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " max, 4M";
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(8 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " max, 8M";
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(256 * kMiB, /*capturing=*/false, true, ncclMax).algo)
    +              << name << " max, 256M";
    +          ar.comm_->config.CTAPolicy = NCCL_CTA_POLICY_ZERO;
    +          for (size_t bytes : {8 * kMiB, 64 * kMiB, 1024 * kMiB}) {
    +            EXPECT_EQ(ceReg, ar.Select(bytes, /*capturing=*/false).algo) << name << " " << bytes;
    +          }
    +          ceArRegMax = 0;
    +          EXPECT_NE(ceReg, ar.Select(64 * kMiB, /*capturing=*/false).algo) << name << " RCCL_CE_AR_REG_MAX_MSG_BYTES=0";
    +          ceArRegMax = -1;
    +          ar.comm_->config.CTAPolicy = NCCL_CTA_POLICY_DEFAULT;
    +        }
    +      });
    +}
    +
    +// gfx1250 DPX and SPX, registered buffers: RCCL_FORCE_CE_ALLREDUCE=1 allows CE but does not widen the 4M
    +// CE-registered window, so Ring keeps 8M and above; RCCL_CE_AR_REG_MAX_MSG_BYTES widens it.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250ForceCeAllReduceKeepsCeRegisteredWindow) {

    Your probe results reproduce, and I added them as a table-driven test (SelectAllReduce_Gfx1250CeRegMaxEnvKeepsSymkAndDdaFirstForSums): DPX and SPX at 4-32 ranks, fp32 and bf16. One refinement: on up to 8 ranks the variable does give back develop's selection in SPX too. SPX 4 ranks goes back to CE, and the DDA LL128 at 8M on 8 SPX ranks is what develop picked there as well (measured). The gap is 16 or more ranks, where the new eager symk window still runs ahead of CE. My earlier reply to Mustafa was based on 8 DPX ranks, so I was wrong to call it a full rollback. The changelog now says this, and notes that RCCL_SYM_K_MAX_BYTES also turns the eager window off but sets the symk cap for every collective.

    PedramAlizadeh PedramAlizadeh commented on code on Dec 03, 2026 13:26 UTC
    Code Review
    projects/rccl/test/host/wrap-test.cc:1
    @@ -9056,27 +9057,238 @@ TEST(WrapMicrotestIsolated, SelectAllReduce_RegisteredRerouteFollowsTheArchTable
             RegisteredAr ar(8);
             ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_SPX);
             ASSERT_NE(nullptr, ar.comm_->archThresholds);
    -        rcclCollDecision d = ar.Select(8 * kMiB, /*capturing=*/false);
    -        EXPECT_EQ(ll128, d.algo) << "SPX eager";
    -        EXPECT_EQ(256u, d.ddaCap.threads);
    -        d = ar.Select(16 * kMiB, /*capturing=*/true);
    +        ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, "SPX eager, above the CE-registered window");
    +        rcclCollDecision d = ar.Select(16 * kMiB, /*capturing=*/true);
             EXPECT_EQ(ll128, d.algo) << "SPX capture";
             EXPECT_EQ(96u, d.ddaCap.blocks);
             ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
             ASSERT_NE(nullptr, ar.comm_->archThresholds);
    -        ar.ExpectUnchanged(8 * kMiB, false, ceReg, "DPX eager");
    +        ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, "DPX eager, above the CE-registered window");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "DPX capture");
             ar.comm_->archThresholds = nullptr;
             ar.ExpectUnchanged(8 * kMiB, false, ceReg, "no table, eager");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "no table, capture");
             ar.comm_->archThresholds = &ar.table_;
    -        EXPECT_EQ(ll128, ar.Select(8 * kMiB, false).algo) << "the fixture's table re-routes";
    +        d = ar.Select(8 * kMiB, false);
    +        EXPECT_EQ(ll128, d.algo) << "the fixture's table re-routes";
    +        EXPECT_EQ(256u, d.ddaCap.threads);
             ignoreTable = 1;
             ar.ExpectUnchanged(8 * kMiB, false, ceReg, "RCCL_IGNORE_ARCH_TABLE=1, eager");
             ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, "RCCL_IGNORE_ARCH_TABLE=1, capture");
           });
     }
     
    +// The gfx1250 tables set the eager AllReduce symk cap per rank in elements, so it grows with the comm and halves
    +// for 2-byte types: DPX at 128K on every comm, SPX at 256K from 16 ranks, with smaller SPX comms keeping symMaxR2.
    +// Both stop at 32M. Graph capture keeps symMaxR2Graph and RCCL_SYM_K_MAX_BYTES wins over both.
    +TEST(WrapMicrotestIsolated, ArSymMaxR2Cap_Gfx1250ScalesWithRanks) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_ArSymMaxR2Cap_Gfx1250ScalesWithRanks",
    +      []() {
    +        int64_t symkMax = -1;
    +        g_loadParam = [&symkMax](const char* env, int64_t def) -> int64_t {
    +          return std::strcmp(env, "RCCL_SYM_K_MAX_BYTES") == 0 ? symkMax : def;
    +        };
    +        ncclComm* comm = MakeCommWithArch("gfx1250");
    +        const rcclArchThresholds* dpx = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
    +        const rcclArchThresholds* spx = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_SPX);
    +        ASSERT_NE(nullptr, dpx);
    +        ASSERT_NE(nullptr, spx);
    +        struct Cap { int nRanks; size_t fp32, bf16, fp8; };
    +        const size_t spxTotal = spx->symMaxR2[ncclFuncAllReduce];
    +        const struct {
    +          const rcclArchThresholds* table;
    +          const char* name;
    +          std::vector<Cap> caps;
    +        } tables[] = {{dpx,
    +                       "DPX",
    +                       {{8, 4 * kMiB, 2 * kMiB, 1 * kMiB},
    +                        {16, 8 * kMiB, 4 * kMiB, 2 * kMiB},
    +                        {32, 16 * kMiB, 8 * kMiB, 4 * kMiB},
    +                        {64, 32 * kMiB, 16 * kMiB, 8 * kMiB},
    +                        {128, 32 * kMiB, 32 * kMiB, 16 * kMiB}}},
    +                      {spx,
    +                       "SPX",
    +                       {{8, spxTotal, spxTotal, spxTotal},
    +                        {16, 16 * kMiB, 8 * kMiB, 4 * kMiB},
    +                        {32, 32 * kMiB, 16 * kMiB, 8 * kMiB},
    +                        {64, 32 * kMiB, 32 * kMiB, 16 * kMiB},
    +                        {128, 32 * kMiB, 32 * kMiB, 32 * kMiB}}}};
    +        for (const auto& t : tables) {
    +          comm->archThresholds = t.table;
    +          for (const auto& c : t.caps) {
    +            comm->nRanks = c.nRanks;
    +            EXPECT_EQ(c.fp32, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat32)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.bf16, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclBfloat16)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.bf16, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat16)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(c.fp8, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat8e4m3)) << t.name << " " << c.nRanks;
    +            EXPECT_EQ(t.table->symMaxR2Graph[ncclFuncAllReduce],
    +                      rcclArSymMaxR2Cap(comm, /*graphMode=*/true, ncclFloat32))
    +                << t.name << " " << c.nRanks;
    +          }
    +          symkMax = 4 * kMiB;
    +          EXPECT_EQ(4 * kMiB, rcclArSymMaxR2Cap(comm, /*graphMode=*/false, ncclFloat32))
    +              << t.name << " RCCL_SYM_K_MAX_BYTES";
    +          symkMax = -1;
    +        }
    +        comm->nRanks = 1;
    +        DeleteCommWithArch(comm);
    +      });
    +}
    +
    +// gfx1250 DPX and SPX, registered eager sum AllReduce: symk from symMinR2 (8M) to the rank- and type-scaled cap
    +// (DPX on every comm, SPX from 16 ranks), Ring above it, and never CE-registered or the DDA LL128 re-route. Comms
    +// whose cap is below symMinR2 (2-8 ranks) take Ring from 8M. DPX capture keeps Ring; SPX capture re-routes to DDA (tested
    +// with the re-route). Each size is a whole number of elements per rank.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250RegisteredSymkThenRing) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250RegisteredSymkThenRing",
    +      []() {
    +        const int symk = (int)rcclAddonAlgos_t::RCCL_SYMMETRIC;
    +        struct Bf16 { int nRanks; size_t cap; };
    +        const struct {
    +          rcclTuningPartition partition;
    +          const char* name;
    +          std::vector<std::pair<int, size_t>> fp32Caps;
    +          std::vector<Bf16> bf16Caps;
    +          bool captureRing;
    +        } tables[] = {{RCCL_TUNING_PARTITION_DPX,
    +                       "DPX",
    +                       {{16, 8 * kMiB}, {32, 16 * kMiB}, {64, 32 * kMiB}, {128, 32 * kMiB}},
    +                       {{32, 8 * kMiB}, {64, 16 * kMiB}},
    +                       true},
    +                      {RCCL_TUNING_PARTITION_SPX,
    +                       "SPX",
    +                       {{16, 16 * kMiB}, {32, 32 * kMiB}, {64, 32 * kMiB}},
    +                       {{16, 8 * kMiB}, {32, 16 * kMiB}},
    +                       false}};
    +        RegisteredAr ar(8);
    +        for (const auto& t : tables) {
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", t.partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          for (const auto& c : t.fp32Caps) {
    +            ar.SetRanks(c.first);
    +            const std::string at = std::string(t.name) + " " + std::to_string(c.first) + " ranks, ";
    +            const size_t step = sizeof(float) * (size_t)c.first;
    +            ar.ExpectUnchanged(8 * kMiB, false, symk, (at + "symMinR2").c_str());
    +            ar.ExpectUnchanged(c.second, false, symk, (at + "symk cap").c_str());
    +            ar.ExpectUnchanged(c.second + step, false, NCCL_ALGO_RING, (at + "above the symk cap").c_str());
    +            ar.ExpectUnchanged(256 * kMiB, false, NCCL_ALGO_RING, (at + "old CE-registered ceiling").c_str());
    +            if (t.captureRing) ar.ExpectUnchanged(16 * kMiB, true, NCCL_ALGO_RING, (at + "capture").c_str());
    +          }
    +          for (const auto& c : t.bf16Caps) {
    +            ar.SetRanks(c.nRanks);
    +            EXPECT_EQ(symk, ar.Select(c.cap, false, true, ncclSum, ncclBfloat16).algo)
    +                << t.name << " " << c.nRanks << " ranks, bf16 symk cap";
    +            EXPECT_EQ(NCCL_ALGO_RING, ar.Select(2 * c.cap, false, true, ncclSum, ncclBfloat16).algo)
    +                << t.name << " " << c.nRanks << " ranks, bf16 above the cap";
    +          }
    +          for (int nRanks : {2, 4, 8}) {
    +            ar.SetRanks(nRanks);
    +            const std::string at = std::string(t.name) + " " + std::to_string(nRanks) + " ranks, ";
    +            ar.ExpectUnchanged(8 * kMiB, false, NCCL_ALGO_RING, (at + "cap below symMinR2").c_str());
    +            ar.ExpectUnchanged(256 * kMiB, false, NCCL_ALGO_RING, (at + "old CE-registered ceiling").c_str());
    +          }
    +        }
    +        ar.SetRanks(16);
    +        ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", RCCL_TUNING_PARTITION_DPX);
    +        EXPECT_EQ(NCCL_ALGO_RING, ar.Select(8 * kMiB, false, true, ncclSum, ncclBfloat16).algo)
    +            << "DPX 16 ranks, bf16 cap below symMinR2";
    +      });
    +}
    +
    +// gfx1250 DPX and SPX: the AllReduce CE-registered window ends at 4M, so only ops symk and DDA cannot take (max)
    +// reach it, and Ring takes them above it. CTAPolicy=ZERO still takes CE at every size unless
    +// RCCL_CE_AR_REG_MAX_MSG_BYTES=0.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M",
    +      []() {
    +        int64_t ceArRegMax = -1;
    +        g_loadParam = [&ceArRegMax](const char* env, int64_t def) -> int64_t {
    +          return std::strcmp(env, "RCCL_CE_AR_REG_MAX_MSG_BYTES") == 0 ? ceArRegMax : def;
    +        };
    +        const int ceReg = (int)rcclAddonAlgos_t::RCCL_CE_REGISTERED;
    +        RegisteredAr ar(16);
    +        for (rcclTuningPartition partition : {RCCL_TUNING_PARTITION_DPX, RCCL_TUNING_PARTITION_SPX}) {
    +          const char* name = partition == RCCL_TUNING_PARTITION_DPX ? "DPX" : "SPX";
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          EXPECT_EQ(ceReg, ar.Select(4 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " max, 4M";
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(8 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " max, 8M";
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(256 * kMiB, /*capturing=*/false, true, ncclMax).algo)
    +              << name << " max, 256M";
    +          ar.comm_->config.CTAPolicy = NCCL_CTA_POLICY_ZERO;
    +          for (size_t bytes : {8 * kMiB, 64 * kMiB, 1024 * kMiB}) {
    +            EXPECT_EQ(ceReg, ar.Select(bytes, /*capturing=*/false).algo) << name << " " << bytes;
    +          }
    +          ceArRegMax = 0;
    +          EXPECT_NE(ceReg, ar.Select(64 * kMiB, /*capturing=*/false).algo) << name << " RCCL_CE_AR_REG_MAX_MSG_BYTES=0";
    +          ceArRegMax = -1;
    +          ar.comm_->config.CTAPolicy = NCCL_CTA_POLICY_DEFAULT;
    +        }
    +      });
    +}
    +
    +// gfx1250 DPX and SPX, registered buffers: RCCL_FORCE_CE_ALLREDUCE=1 allows CE but does not widen the 4M
    +// CE-registered window, so Ring keeps 8M and above; RCCL_CE_AR_REG_MAX_MSG_BYTES widens it.
    +TEST(WrapMicrotestIsolated, SelectAllReduce_Gfx1250ForceCeAllReduceKeepsCeRegisteredWindow) {
    +  RUN_ISOLATED_TEST(
    +      "Wrap_SelectAllReduce_Gfx1250ForceCeAllReduceKeepsCeRegisteredWindow",
    +      []() {
    +        int64_t forceCeAr = -1;
    +        int64_t ceArRegMax = -1;
    +        g_loadParam = [&forceCeAr, &ceArRegMax](const char* env, int64_t def) -> int64_t {
    +          if (std::strcmp(env, "RCCL_FORCE_CE_ALLREDUCE") == 0) return forceCeAr;
    +          if (std::strcmp(env, "RCCL_CE_AR_REG_MAX_MSG_BYTES") == 0) return ceArRegMax;
    +          return def;
    +        };
    +        const int ceReg = (int)rcclAddonAlgos_t::RCCL_CE_REGISTERED;
    +        RegisteredAr ar(16);
    +        for (rcclTuningPartition partition : {RCCL_TUNING_PARTITION_DPX, RCCL_TUNING_PARTITION_SPX}) {
    +          const char* name = partition == RCCL_TUNING_PARTITION_DPX ? "DPX" : "SPX";
    +          ar.comm_->archThresholds = real_arch_thresholds::rcclGetArchThresholds("gfx1250", partition);
    +          ASSERT_NE(nullptr, ar.comm_->archThresholds);
    +          forceCeAr = 1;
    +          EXPECT_EQ(ceReg, ar.Select(4 * kMiB, /*capturing=*/false, true, ncclMax).algo) << name << " force, 4M";
    +          for (size_t bytes : {8 * kMiB, 256 * kMiB}) {
    +            EXPECT_EQ(NCCL_ALGO_RING, ar.Select(bytes, /*capturing=*/false, true, ncclMax).algo)
    +                << name << " force, " << bytes;
    +          }
    +          forceCeAr = -1;
    +          ceArRegMax = 256 * kMiB;
    +          for (size_t bytes : {8 * kMiB, 256 * kMiB}) {
    +            EXPECT_EQ(ceReg, ar.Select(bytes, /*capturing=*/false, true, ncclMax).algo)
    +                << name << " RCCL_CE_AR_REG_MAX_MSG_BYTES=256M, " << bytes;
    +          }
    +          EXPECT_EQ(NCCL_ALGO_RING, ar.Select(512 * kMiB, /*capturing=*/false, true, ncclMax).algo)
    +              << name << " RCCL_CE_AR_REG_MAX_MSG_BYTES=256M, 512M";
    +          ceArRegMax = -1;
    +        }
    +      });
    +}
    +
    +// gfx1250 SPX keeps the AllGather CE-registered window to 32M, for types DDA cannot run; DPX closes it.
    +TEST(WrapMicrotestIsolated, AllGatherCeRegisteredWindow_Gfx1250SpxTo32MDpxClosed) {

    Added SelectAllGather_Gfx1250SpxCeRegisteredForTypesDdaCannotRun, which goes through rcclSelectAllGather on the real SPX table with a registered recv window: int32 (DDA LL128 rejects it) takes CE-registered at 32M and Ring at 64M; fp32 takes DDA LL128 at 32M; with symk requested, CE stays off to 2M (symMaxR2[AG]) and takes int32 again at 32M.

    PedramAlizadeh PedramAlizadeh commented on Dec 03, 2026 13:32 UTC
    Author

    Review of test coverage. The host-side logic looks right, and I re-ran rccl-UnitTestsMicroWrap on this branch merged with current develop on a gfx1250 box: all 564 tests pass, including the six new or updated ones. The gaps are in GPU coverage.

    > 1. None of the CI on this PR exercised the gfx1250 paths it changes. The only GPU test job that ran was Test gfx94X-dcgpu / Test rccl. The gfx125X-dcgpu and gfx950-dcgpu test jobs were skipped. The gfx942 table isn't touched and CE AllReduce is gfx1250-only, so that job covers nothing here. The Ruby and OCI perf smokes report flat readings, which suggests they either aren't gfx1250 or don't run -R 2. Could we get the gfx125X tests (or an MI455 smoke) dispatched for this PR, covering AllReduce., AllGather. and Register. in rccl-UnitTests plus rccl-UnitTestsMPI?

    > 2. No GPU test reaches the new symk window. arSymMaxR2PerRankElems only gives symk sizes of 8M or more on comms of 16+ ranks, but CI is single-node (at most 8 ranks), and CollImplInfoTests caps at 8 ranks. So symk AllReduce at 8-32M on 16-64 ranks with -R 2 is validated only by the manual sweeps in the description. A multi-node -R 2 -c 1 correctness check in a nightly or scale-up job would cover it.

    > 3. Smaller gaps: CPX and unreported-partition comms also use the SPX table, and no test pins that. Counts not divisible by nRanks around the 4M CE boundary aren't covered either; CE needs divisibility, so those take another path.

    > Inline comments below cover the specific tests.

    Thank you for the review, @alex-breslow-amd. Addressed in 26568a6dbd:

    1. gfx125X CI: agreed, none of the jobs on this PR reach the changed paths. I can't dispatch the gfx125X jobs myself; could someone with access trigger rccl-UnitTests (AllReduce., AllGather., Register.) and rccl-UnitTestsMPI on gfx125X for this PR?
    2. symk window on 16-64 ranks: agreed, it is covered only by the manual multi-node -R 2 -c 1 sweeps (2-8 nodes, SPX and DPX, 0 wrong values). A multi-node correctness check in a nightly or scale-up job is the right place for it; I'll follow up on that separately.
    3. CPX / unreported partitions: already pinned by InitMicrotest.FillInfo_TuningPartitionRequest, which checks that a CPX GPU and an empty partition both ask for the SPX table. Counts not divisible by nRanks at the 4M CE edge: added to SelectAllReduce_Gfx1250CeRegisteredWindowEndsAt4M (4M - 4 bytes takes Ring).

    amd-argus[bot] amd-argus[bot] commented on Dec 03, 2026 13:36 UTC
    Reviewer

    <!-- argus:v1 pr=16695 sha=26568a6dbd74 mode=re-review -->

    ARGUS

    Impact

    <details>
    <summary>Reaches gfx1250; the PR targets gfx1250; 6 test(s) to run, 10 heatmap cell(s) to measure</summary>

    gfx1250 only, through the SPX table (also CPX and unreported partition) and the DPX table. Other arches leave the new fields at 0. Registered (symmetric-window) eager AllReduce: CE-registered now ends at 4M (was 256M). fp32/fp16/bf16/fp8 sums run symk from 8M up to nRanks x 128K (DPX) or 256K (SPX, 16+ ranks) elements x type size, capped at 32M, then Ring. The eager SPX DDA LL128 re-route no longer fires. Non-sum ops and int/fp64 sums have no symk on AMD: CE to 4M, then Ring. Registered AllGather: CE ends at 32M on SPX and is closed on DPX. On 16/32-rank SPX this sends DDA-eligible types between 256M and 512M from CE to Ring. Graph capture, -R 0/-R 1 and CTAPolicy=ZERO are unchanged. Reaches gfx1250; the PR targets gfx1250.

    Tests that exercise this change

  • test_categories_micro.yaml quick, WrapMicrotestIsolated.: host selector tests against the real gfx1250 SPX/DPX tables: symk cap per rank count and type, the 4M AR CE window, the AllGather 32M/0 window and the re-route (projects/rccl/test/test_categories_micro.yaml)

  • rccl-UnitTestsFixturesDebug quick, RcclAllGatherCeRegisteredWindow.: AllGather CE-registered window gate whose gfx1250 ceRegMax entry changed (projects/rccl/test/test_categories_fixtures_debug.yaml)

  • rccl-UnitTestsMPI quick_env_ce_allreduce, CeMPI_AllReduce.: CE AllReduce under CTA policy ZERO, which must still take CE at every size (projects/rccl/test/test_categories_mpi.yaml)

  • rccl-UnitTests standard, AllReduce.: AllReduce across datatypes and ops, including non-sum and int/fp64 that now leave CE above 4M (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTests standard, AllGather.: AllGather across datatypes after the CE-registered window shrank (projects/rccl/test/test_categories.yaml)

  • rccl-UnitTests standard, Register.: registered-buffer paths that reach the CE-registered / symk selection (projects/rccl/test/test_categories.yaml)
  • Heatmap cells to measure, baseline against this PR, interleaved A/B

  • gfx1250 all_gather float, 4 node(s), 256 MiB to 512 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks: DDA LL128 stops at 256M and CE closes at 32M, so 256M-512M goes to Ring, which the PR measured as beating CE only from 512M

  • gfx1250 all_gather bfloat16, 8 node(s), 256 MiB to 512 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 32 SPX ranks: same 256M-512M CE to Ring band

  • gfx1250 all_gather float, 2 node(s), 128 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks: 128M-256M sits between the DDA LL128/TDM caps and Ring's measured win from 256M

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node): 8 SPX ranks below arSymMaxR2MinRanks: CE-registered / eager DDA LL128 re-route to Ring from 8M

  • gfx1250 all_reduce bfloat16/sum, 4 node(s), 8 MiB to 32 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 16 SPX ranks bf16: symk to 8M, then Ring where the DDA re-route used to run

  • gfx1250 all_reduce float/sum, 8 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-spx (4 GPUs/node) (not measured in the heatmap): 32 SPX ranks: symk to the 32M ceiling, then Ring

  • gfx1250 all_reduce float/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks: CE-registered to symk at 8M, then Ring

  • gfx1250 all_reduce bfloat16/sum, 2 node(s), 8 MiB to 256 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): 16 DPX ranks bf16: cap 4M is below symMinR2, so CE-registered to Ring from 8M

  • gfx1250 all_reduce float/sum, 16 node(s), 32 MiB to 64 MiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node) (not measured in the heatmap): 128 DPX ranks: symk stops at the 32M ceiling past the measured 64-rank set

  • gfx1250 all_gather float, 2 node(s), 2 MiB to 4 GiB on mi4xx-rccl-scaleup-nightly-dpx (8 GPUs/node): DPX ceRegMax[AllGather]=0: CE-registered closed wherever hierarchical symk or DDA does not take the call
  • </details>

    Bottom line: LGTM.

    <sub>Comment <code>@argus review</code> to re-run, or <code>@argus re-review</code> after pushing.</sub>

    github-actions[bot] github-actions[bot] commented on Dec 04, 2026 16:24 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-oci-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 10% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 10%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    github-actions[bot] github-actions[bot] commented on Dec 04, 2026 16:24 UTC
    Bot

    <!-- markdownlint-disable MD013 -->

    pr-rocm-systems-16695-ruby64-rccl-pr-smoke

    View this job on CoCo

    Builds

    All 15 components built.

    Failures

    No failing tests in this run.

    12 tests skipped.

    Performance regressions

    Thresholds. A reading is marked regressed when its performance drops more than 5% and the change is significant. The run fails when a point drops more than 8% and an adjacent size does too. Performance is bandwidth, or the inverse of latency.

    pr-16695_rccl-perf_rocm-10.2-latest vs rocm-10.2-latest_rccl-develop-perf

    Readings: flat 2070.

    Fails the run: 0 regressed point(s) past 8%, each confirmed by an adjacent size.

    No confirmed regressions or improvements.

    Reviewers
    Assignees
    PedramAlizadeh PedramAlizadeh
    Labels
    risk: low confidence: 88.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 54.9% (MEDIUM) · Higher = larger blast radius
    54.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 88.8% · Lower = rushed or shallow review
    88.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 6.2% · Safe to merge
    6.2%