Skip to content

The 16384-cubed instrument was never valid, and the fix is a shorter K (#122) - #122

Merged
feitreim merged 1 commit into
mainfrom
instrument-16384
Jul 29, 2026
Merged

feitreim merged 1 commit into
mainfrom
instrument-16384

Conversation

@feitreim

Copy link
Copy Markdown
Owner

#121 took the first reproducibility control on whole - no drain and it came back 39-46% at 16384³ against 1-5% at 8192³, with #116's 16.34 µs/tile, #117's 5.81 and #118's 2.91 all inside the band. This is what the band is.

It is error propagation, and the arithmetic reaches backwards with nothing measured

A difference carries its arms' error divided by its own share of them. Reconstructed from #121's own printed table 6:

shape epilogue / launch 1/s the two arms repeat to predicted #121 observed
4096³ 17.9% 5.6 0.86% + 0.58% 8.1% 7%
8192³ 7.8% 12.9 0.15% + 0.10% 3.2% 1%
16384³ 5.3% 19.0 0.45% + 2.11% 49% 46%

The launches were never the problem — they repeat to 0.1–2.1% at every size in that table. The epilogue is per output tile and the launch is per tile times K, so the share falls as 1/K by construction. The instrument did not degrade at 16384³; it never worked there.

Three things it is not, each checked rather than assumed: sampling (min of 30 is the same estimator at every size and the arms repeat to 0.10% at 8192³), the wave (8192² and 16384² are both 98.8% full and every comparison in the file holds the grid, the tile and the traversal fixed between its arms), and — against the hypothesis in the brief — adding rather than deleting. Tile::drain_staged_twice retires the dead-code hazard, which is real and different, but one added link is a smaller share of the launch than the whole epilogue, so the ladder is more amplified and not less. #121's own 16384³ ladder row says so: +4.01 and −2.69 µs a tile for one quantity.

And a second term nobody could see, because bench sorted the order away

Timings now keeps launch order. drift is the second fifteen launches over the first fifteen; spread is the same call's max/min. Six arms over two containers:

shape call to call in-call max/min drift
8192² × k1024 0.39–1.46% 4.0–7.5% −1.90 … −0.25%
8192³ 0.26–0.58% 1.3–2.5% −0.40 … −0.18%
16384² × k1024 0.24–1.15% 0.9–7.2% −1.01 … +0.56%
16384³ 0.99–3.12% 18.4–22.6% +6.85 … +11.33%

At 16384³ and nowhere else the device is 7–11% slower by the end of the call than at the start, in all six arms and both containers, and that drift is essentially the whole of its 18–23% in-call spread — everywhere else the drift is negative. It is not the problem size: 16384² × k1024 has the same 4096 tiles, the same 28 items, the same 512 MiB of C and the same wave, and drifts −1.0 to +0.6%. It is the duration — 154 ms of continuous 1.1 PFLOP/s against 16 ms. A 16384³ min is a boost-clock reading from a call whose last launches run 10% slower, which is also the mechanism under cuBLASLt's 1.15–1.19 max/min there.

The fix: same output geometry, shorter reduction — bench repro

K is the one axis the epilogue's cost does not sit on, so shortening it holds the tile grid, the waves, the items, the C traffic and the epilogue's total cost and moves only the launch it is a fraction of. No estimator survives a 60× amplifier; the lever is the share. Four whole measurements per arm, round-robin so every pair is adjacent in time, and the spread the amplification predicts printed beside the one it got. One ld.shared + st.global.v4 pass, priced by addition, two containers:

shape items µs/tile s 1/s observed predicted session to session
8192² × k1024 7 2.34 / 2.34 10.8 / 11.0% 9.2 17 / 17% 16 / 18% 0.0%
8192² × k2048 7 2.42 / 2.61 7.8 / 8.6% 12.2 13 / 4% 19 / 9% 7.9%
8192³ 7 2.07 / 2.29 2.2 / 2.5% 42.8 33 / 18% 41 / 30% 10.6%
16384² × k1024 28 2.11 / 2.12 10.8 / 10.8% 9.3 5 / 8% 12 / 13% 0.5%
16384³ 28 3.01 / 3.82 1.6 / 2.1% 54.1 167 / 111% 235 / 177% 26.9%

predicted tracks observed across a twentyfold range and bounds it from above in nine rows of ten, which is the diagnosis stated as a prediction rather than as an explanation. The 16384² number nobody could measure is 2.11 µs a tile, reproduced to 0.5% across two containers; #121's ladder put it at 0.45 and 4.22, and 2.11 is inside neither and between both. The 8192² column calibrates it: 2.34 lands at the top of the 2.0–2.3 #121 already carries. The µs/tile is flat in K — 2.34/2.42/2.07 and 2.34/2.61/2.29 across an eightfold range — which is what makes the substitution legal and is the design's own check. Residual risk stated: shortening K puts A and B inside L2, and the K sweep bounds that confound to the deep rows' own ±18–33% rather than to 1%.

staged8 and staged84 are not tied, and the sign is the geometry's

shape s8/s84 lowest–highest, both sessions 1/s µs/tile orders them
8192² × k1024 0.9852 / 0.9758 0.9724 – 0.9902 41–67 −0.32 / −0.51 staged8, 1.5–2.4%
8192² × k2048 0.9827 / 0.9864 0.9813 – 0.9882 58–74 −0.54 / −0.41 staged8, 1.4–1.7%
8192³ 0.9965 / 1.0002 0.9944 – 1.0033 284–5041 −0.33 / +0.02 no — straddles
16384² × k1024 1.0104 / 1.0038 0.9971 – 1.0116 96–263 +0.20 / +0.07 staged84, 0.4–1.0%
16384³ 0.9926 / 0.9874 0.9796 – 1.0207 80–135 −1.36 / −2.26 no — both straddle

The full-depth rows do not merely fail to order them — 16384³ centres on staged8 ahead by 1.4–2.3 µs a tile where the same geometry shortened says staged84 ahead by 0.07–0.20, and both its ranges straddle 1.000. So #120's default is right, for a reason its own row could not carry, and #121's advice to break the tie at 8192³ would have broken it the other way and shipped the rung that loses at the size the default was chosen for. This is not a request to move the default: a rung that wins at 16384² and loses at 8192² is a shape question, and gemm_ws shipping staged8 beside gemm shipping staged84 is now two answers to two questions.

What it does not do

It never measures whole − no drain — the epilogue-free entry points are on gemm.rs's side of the wall, which this PR does not touch. But the substitution applies to it with a number: the whole epilogue is ~7.3 µs a tile, so at 16384² × k1024 it is ~0.20 ms of a 0.55 ms launch — s of 37%, 1/s of 2.7, and against arms that repeat to 0.5–1.2% that is ±5% where the full-depth version is ±46%. That is the row that would replace #116's 16.34, #117's 5.81 and #118's 2.91 rather than merely retire them, and it is a change in gemm.rs's sweeps. Until it is taken, the status of every 16384³ epilogue total in the file is unmeasured — a weaker claim than wrong, and a much weaker one than those numbers currently read as.

Diff

Timings::spread / Timings::drift and the launch order behind them, bench repro, rule 5 in the module docs, --case repro in modal_app.py, and a §7 section. No default, constant, kernel or gemm.rs line moved. build green twice; bench --case repro run in two containers at 96 s of GPU function time each.

#122)

#121 took the first reproducibility control on `whole - no drain` and it came back
39-46% at 16384^3 against 1-5% at 8192^3, with #116's 16.34 us/tile, #117's 5.81
and #118's 2.91 all inside the band. This is what the band is.

**It is error propagation, and the arithmetic reaches backwards with nothing
measured.** A difference carries its arms' error divided by its own share of them.
Reconstructed from #121's own printed table 6: share 17.9% / 7.8% / 5.3% at
4096/8192/16384^3, so 1/s of 5.6 / 12.9 / 19.0, and against arms that repeat to
0.86+0.58% / 0.15+0.10% / 0.45+2.11% that predicts 8.1% / 3.2% / **49%** against
#121's observed 7% / 1% / **46%**. The launches were never the problem -- they
repeat to 0.1-2.1% everywhere. The epilogue is per output tile and the launch is
per tile times K, so the share falls as 1/K by construction. **The instrument did
not degrade at 16384^3; it never worked there.**

Three things it is not, each checked: sampling (`min` of 30 is the same estimator
at every size and the arms repeat to 0.10% at 8192^3), the wave (8192^2 and
16384^2 are both 98.8% full and every comparison holds the grid fixed between its
arms), and -- against the hypothesis -- **adding rather than deleting**.
`drain_staged_twice` retires the dead-code hazard, which is real and different,
but one added link is a *smaller* share than the whole epilogue, so the ladder is
more amplified. #121's own 16384^3 ladder row is +4.01 and -2.69 for one quantity.

**And a second term nobody could see, because `bench` sorted the order away.**
`Timings` now keeps launch order; `drift` is the second fifteen launches over the
first. At 16384^3 and nowhere in the sweep, all six arms over two containers, the
device is **+6.85 to +11.33% slower by the end of a call** -- essentially the whole
of its 18-23% in-call spread -- where every other size drifts *negative*. Not the
problem size: `16384^2 x k1024` has the same tiles, items, C and wave and drifts
-1.0 to +0.6%. It is the duration, 154 ms of continuous 1.1 PFLOP/s against 16.
A 16384^3 `min` is a boost-clock reading from a call whose last launches run 10%
slower, which is also the mechanism under cuBLASLt's 1.15-1.19 max/min there.

**The fix is `bench repro`: same output geometry, shorter reduction.** K is the one
axis the epilogue's cost does not sit on, so shortening it holds the tiles, the
waves, the items, the C traffic and the epilogue total and moves only the launch
it is a fraction of. Four whole measurements per arm, round-robin so every pair is
adjacent in time, and the spread the amplification *predicts* printed beside the
one it got. One `ld.shared` + `st.global.v4` pass, two containers:

| shape | us/tile | s | observed | predicted | session to session |
| --- | ---: | ---: | ---: | ---: | ---: |
| 8192^2 x k1024 | **2.34 / 2.34** | 10.8% | 17 / 17% | 16 / 18% | **0.0%** |
| 8192^3 | 2.07 / 2.29 | 2.2% | 33 / 18% | 41 / 30% | 10.6% |
| 16384^2 x k1024 | **2.11 / 2.12** | 10.8% | 5 / 8% | 12 / 13% | **0.5%** |
| 16384^3 | 3.01 / 3.82 | 1.6% | **167 / 111%** | 235 / 177% | **26.9%** |

`predicted` tracks `observed` across a twentyfold range and bounds it above in
nine rows of ten. The 16384^2 number nobody could measure is **2.11 us/tile**,
reproduced to 0.5%; #121's ladder put it at 0.45 and 4.22. The us/tile is flat in
K (2.34/2.42/2.07 and 2.34/2.61/2.29 over an eightfold range), which is what makes
the substitution legal and is the design's own check.

**`staged8` and `staged84` are not tied, and the sign is the geometry's.** At
8192^2 `staged8` leads by 1.4-2.4% in four cells, no range reaching 1.000; at
16384^2 `staged84` leads by 0.4-1.0%, same sign both containers. The full-depth
rows do not merely fail to order them -- 16384^3 centres on `staged8` ahead by
1.4-2.3 us/tile where the shortened row says `staged84` ahead by 0.07-0.20, and
both its ranges straddle. **So #120's default is right for a reason its own row
could not carry**, and #121's advice to break the tie at 8192^3 would have broken
it the other way. Not a request to move the default.

New: `Timings::spread` / `Timings::drift` and the launch order behind them, `bench
repro`, rule 5 in the module docs, a section in README §7. Nothing measured is
inherited; no default, constant or kernel moved; `gemm.rs` untouched. `build` green
twice, `bench --case repro` run in two containers at 96 s of GPU each.
@feitreim
feitreim merged commit b2d9167 into main Jul 29, 2026
3 checks passed
feitreim added a commit that referenced this pull request Jul 29, 2026
…123)

#121 left one lever with a number on it: `ld.shared` + `st.global` at 2.0-2.3 us a
tile, 31-36% of the residual epilogue, ~+2.7% of the launch. This builds that change
two ways and measures it in four containers. **It does not win anywhere the
instrument can see it, and the warp-scope form loses by 1.0-1.7%.**

**The full-depth A/B cannot see it, and #122 is why.** At 8192^3 this comparison is a
few tenths of a percent between two 0.65 ms launches -- `1/share` of 458-709, a
HARDER measurement than `whole - no drain` and not an easier one. Three containers of
it read +0.2, +0.4 and -0.2 percent. So it was re-taken with #122's substitution
applied to a ratio rather than to a subtraction: hold M and N, shorten K, interleave
the arms round-robin, four whole measurements each. `staged84` over each arm, so
above 1.000 is the TMA arm ahead, `session 1 / session 2`:

| shape | 1/share | s84/tma | range | s84/tmac | range |
| --- | ---: | ---: | --- | ---: | --- |
| 8192^2 x k1024 | 61-191 | 0.9885 / 0.9835 | 0.9743 - 0.9952 | 0.9948 / 0.9980 | 0.9924 - 0.9987 |
| 16384^2 x k1024 | 85-427 | 0.9882 / 0.9899 | 0.9853 - 0.9913 | 0.9977 / 1.0061 | 0.9971 - 1.0069 |
| 8192^3 | 294-709 | 0.9978 / 1.0018 | 0.9969 - 1.0023 | 1.0014 / 1.0034 | 0.9984 - 1.0062 |

`s84 tma` is behind in four independent cells and not one range reaches 1.000.
`s84 tmac` is a tie to a small loss, and the two containers disagree in sign at
16384^2 with non-overlapping ranges -- reported rather than averaged away.

**Even the doubling probe never promised 2.7%.** `s84t 2g` doubles the TMA hop
exactly as `s84 2g` doubles `ld.shared` + `st.global`. At 8192^3 over four
containers: 2.33/2.41/2.56/2.58 us a tile for the vectorized stores against
1.57/1.90/1.91/1.99 for the engine. 2.7% was that term going to ZERO; the engine
takes it to about three quarters of itself, worth 0.42-0.75 us a tile.

**And the realised value is below even that, for a reason the probe cannot see.** A
DOUBLED store is an extra one left in flight; a REPLACING store is on the critical
path of the next band. At `IN_FLIGHT = 0` the ring's `acquire` is
`cp.async.bulk.wait_group.read` at zero groups, so band k+1's `stmatrix` waits out
the engine's read of band k's buffer, four times an item, where `store_shared_rows`
retires into the memory pipeline and blocks on nothing. Depth 1 is not a choice: the
envelope leaves 1920 B and a second set of buffers is 16 384.

**The block barrier was the obvious suspect and the hypothesis was backwards.** The
census says the barriers are real -- `bar.sync` 2/5 and `bar.warp.sync` 3/0 against
`staged84`'s 2/1 -- and **the arm that pays them wins**, by 0.6-1.6% in all four
paired cells. One [128,64] box a band beats four [32,64] boxes by more than eight
`bar.sync` an item cost.

**So `StoreRing` was usable as built and is the faster of the two.** What it could
not express was the layout, so it gained a `Scope` parameter (`Cta`, the default and
the shipped behaviour, and `Warp`): 40 lines, no byte moved, only which barrier
`converge` is and which thread `issuing` is. Every argument in the type survived
untouched, because none of them mentions how many threads are in the barrier. The
parameter earned its keep by producing the arm that lost.

**One hardware fact fell out.** `gemm` rounds its staging run to 128 bytes and not
1024, so every staging tile starts mid-swizzle-period. `store ring warp phased` is
the store side of `swizzle roundtrip short` and it passes: the engine reads the phase
off the absolute address in both directions. That is why no alignment padding was
needed and why both TMA rungs declare `staged84`'s 114 816 B to the byte.

Named and not built: the loss is attributed to depth 1 by mechanism, and a depth-2
warp ring of [16,64] buffers is 2 x 2048 = 4096 B a warp -- exactly what a [32,64]
buffer costs today, so the envelope would not move. It needs a 16-row band out of
`TmemTile::tile_x8`, whose `.x8` shape is 32.

New: `Scope`/`Cta`/`Warp` on `StoreRing`, `Tile::drain_staged_tma`,
`Tile::drain_staged_tma_cta`, `Tile::cta_origin`, three entry points (`s84 tma`,
`s84 tmac`, `s84t 2g`), a C tensor map on the host side, `gemm::tma_ordering` and two
`bench --case residual` tables, two device-test cases. No default, constant or
shipped kernel moved; `staged84` still ships. Both TMA rungs are on the correctness
gate and pass the element-exact bf16 `==` at every size; the doubling probe says
UNCHECKED in its own label. `build` green four times, `regcount` (occupancy gate
green, 98/94/96 against `staged84`'s 96, zero spill), `device_tests` 41 of 41.
feitreim added a commit that referenced this pull request Jul 29, 2026
…123)

#121 left one lever with a number on it: `ld.shared` + `st.global` at 2.0-2.3 us a
tile, 31-36% of the residual epilogue, ~+2.7% of the launch. This builds that change
two ways and measures it in four containers. **It does not win anywhere the
instrument can see it, and the warp-scope form loses by 1.0-1.7%.**

**The full-depth A/B cannot see it, and #122 is why.** At 8192^3 this comparison is a
few tenths of a percent between two 0.65 ms launches -- `1/share` of 458-709, a
HARDER measurement than `whole - no drain` and not an easier one. Three containers of
it read +0.2, +0.4 and -0.2 percent. So it was re-taken with #122's substitution
applied to a ratio rather than to a subtraction: hold M and N, shorten K, interleave
the arms round-robin, four whole measurements each. `staged84` over each arm, so
above 1.000 is the TMA arm ahead, `session 1 / session 2`:

| shape | 1/share | s84/tma | range | s84/tmac | range |
| --- | ---: | ---: | --- | ---: | --- |
| 8192^2 x k1024 | 61-191 | 0.9885 / 0.9835 | 0.9743 - 0.9952 | 0.9948 / 0.9980 | 0.9924 - 0.9987 |
| 16384^2 x k1024 | 85-427 | 0.9882 / 0.9899 | 0.9853 - 0.9913 | 0.9977 / 1.0061 | 0.9971 - 1.0069 |
| 8192^3 | 294-709 | 0.9978 / 1.0018 | 0.9969 - 1.0023 | 1.0014 / 1.0034 | 0.9984 - 1.0062 |

`s84 tma` is behind in four independent cells and not one range reaches 1.000.
`s84 tmac` is a tie to a small loss, and the two containers disagree in sign at
16384^2 with non-overlapping ranges -- reported rather than averaged away.

**Even the doubling probe never promised 2.7%.** `s84t 2g` doubles the TMA hop
exactly as `s84 2g` doubles `ld.shared` + `st.global`. At 8192^3 over four
containers: 2.33/2.41/2.56/2.58 us a tile for the vectorized stores against
1.57/1.90/1.91/1.99 for the engine. 2.7% was that term going to ZERO; the engine
takes it to about three quarters of itself, worth 0.42-0.75 us a tile.

**And the realised value is below even that, for a reason the probe cannot see.** A
DOUBLED store is an extra one left in flight; a REPLACING store is on the critical
path of the next band. At `IN_FLIGHT = 0` the ring's `acquire` is
`cp.async.bulk.wait_group.read` at zero groups, so band k+1's `stmatrix` waits out
the engine's read of band k's buffer, four times an item, where `store_shared_rows`
retires into the memory pipeline and blocks on nothing. Depth 1 is not a choice: the
envelope leaves 1920 B and a second set of buffers is 16 384.

**The block barrier was the obvious suspect and the hypothesis was backwards.** The
census says the barriers are real -- `bar.sync` 2/5 and `bar.warp.sync` 3/0 against
`staged84`'s 2/1 -- and **the arm that pays them wins**, by 0.6-1.6% in all four
paired cells. One [128,64] box a band beats four [32,64] boxes by more than eight
`bar.sync` an item cost.

**So `StoreRing` was usable as built and is the faster of the two.** What it could
not express was the layout, so it gained a `Scope` parameter (`Cta`, the default and
the shipped behaviour, and `Warp`): 40 lines, no byte moved, only which barrier
`converge` is and which thread `issuing` is. Every argument in the type survived
untouched, because none of them mentions how many threads are in the barrier. The
parameter earned its keep by producing the arm that lost.

**One hardware fact fell out.** `gemm` rounds its staging run to 128 bytes and not
1024, so every staging tile starts mid-swizzle-period. `store ring warp phased` is
the store side of `swizzle roundtrip short` and it passes: the engine reads the phase
off the absolute address in both directions. That is why no alignment padding was
needed and why both TMA rungs declare `staged84`'s 114 816 B to the byte.

Named and not built: the loss is attributed to depth 1 by mechanism, and a depth-2
warp ring of [16,64] buffers is 2 x 2048 = 4096 B a warp -- exactly what a [32,64]
buffer costs today, so the envelope would not move. It needs a 16-row band out of
`TmemTile::tile_x8`, whose `.x8` shape is 32.

New: `Scope`/`Cta`/`Warp` on `StoreRing`, `Tile::drain_staged_tma`,
`Tile::drain_staged_tma_cta`, `Tile::cta_origin`, three entry points (`s84 tma`,
`s84 tmac`, `s84t 2g`), a C tensor map on the host side, `gemm::tma_ordering` and two
`bench --case residual` tables, two device-test cases. No default, constant or
shipped kernel moved; `staged84` still ships. Both TMA rungs are on the correctness
gate and pass the element-exact bf16 `==` at every size; the doubling probe says
UNCHECKED in its own label. `build` green four times, `regcount` (occupancy gate
green, 98/94/96 against `staged84`'s 96, zero spill), `device_tests` 41 of 41.
feitreim added a commit that referenced this pull request Jul 29, 2026
…123) (#123)

#121 left one lever with a number on it: `ld.shared` + `st.global` at 2.0-2.3 us a
tile, 31-36% of the residual epilogue, ~+2.7% of the launch. This builds that change
two ways and measures it in four containers. **It does not win anywhere the
instrument can see it, and the warp-scope form loses by 1.0-1.7%.**

**The full-depth A/B cannot see it, and #122 is why.** At 8192^3 this comparison is a
few tenths of a percent between two 0.65 ms launches -- `1/share` of 458-709, a
HARDER measurement than `whole - no drain` and not an easier one. Three containers of
it read +0.2, +0.4 and -0.2 percent. So it was re-taken with #122's substitution
applied to a ratio rather than to a subtraction: hold M and N, shorten K, interleave
the arms round-robin, four whole measurements each. `staged84` over each arm, so
above 1.000 is the TMA arm ahead, `session 1 / session 2`:

| shape | 1/share | s84/tma | range | s84/tmac | range |
| --- | ---: | ---: | --- | ---: | --- |
| 8192^2 x k1024 | 61-191 | 0.9885 / 0.9835 | 0.9743 - 0.9952 | 0.9948 / 0.9980 | 0.9924 - 0.9987 |
| 16384^2 x k1024 | 85-427 | 0.9882 / 0.9899 | 0.9853 - 0.9913 | 0.9977 / 1.0061 | 0.9971 - 1.0069 |
| 8192^3 | 294-709 | 0.9978 / 1.0018 | 0.9969 - 1.0023 | 1.0014 / 1.0034 | 0.9984 - 1.0062 |

`s84 tma` is behind in four independent cells and not one range reaches 1.000.
`s84 tmac` is a tie to a small loss, and the two containers disagree in sign at
16384^2 with non-overlapping ranges -- reported rather than averaged away.

**Even the doubling probe never promised 2.7%.** `s84t 2g` doubles the TMA hop
exactly as `s84 2g` doubles `ld.shared` + `st.global`. At 8192^3 over four
containers: 2.33/2.41/2.56/2.58 us a tile for the vectorized stores against
1.57/1.90/1.91/1.99 for the engine. 2.7% was that term going to ZERO; the engine
takes it to about three quarters of itself, worth 0.42-0.75 us a tile.

**And the realised value is below even that, for a reason the probe cannot see.** A
DOUBLED store is an extra one left in flight; a REPLACING store is on the critical
path of the next band. At `IN_FLIGHT = 0` the ring's `acquire` is
`cp.async.bulk.wait_group.read` at zero groups, so band k+1's `stmatrix` waits out
the engine's read of band k's buffer, four times an item, where `store_shared_rows`
retires into the memory pipeline and blocks on nothing. Depth 1 is not a choice: the
envelope leaves 1920 B and a second set of buffers is 16 384.

**The block barrier was the obvious suspect and the hypothesis was backwards.** The
census says the barriers are real -- `bar.sync` 2/5 and `bar.warp.sync` 3/0 against
`staged84`'s 2/1 -- and **the arm that pays them wins**, by 0.6-1.6% in all four
paired cells. One [128,64] box a band beats four [32,64] boxes by more than eight
`bar.sync` an item cost.

**So `StoreRing` was usable as built and is the faster of the two.** What it could
not express was the layout, so it gained a `Scope` parameter (`Cta`, the default and
the shipped behaviour, and `Warp`): 40 lines, no byte moved, only which barrier
`converge` is and which thread `issuing` is. Every argument in the type survived
untouched, because none of them mentions how many threads are in the barrier. The
parameter earned its keep by producing the arm that lost.

**One hardware fact fell out.** `gemm` rounds its staging run to 128 bytes and not
1024, so every staging tile starts mid-swizzle-period. `store ring warp phased` is
the store side of `swizzle roundtrip short` and it passes: the engine reads the phase
off the absolute address in both directions. That is why no alignment padding was
needed and why both TMA rungs declare `staged84`'s 114 816 B to the byte.

Named and not built: the loss is attributed to depth 1 by mechanism, and a depth-2
warp ring of [16,64] buffers is 2 x 2048 = 4096 B a warp -- exactly what a [32,64]
buffer costs today, so the envelope would not move. It needs a 16-row band out of
`TmemTile::tile_x8`, whose `.x8` shape is 32.

New: `Scope`/`Cta`/`Warp` on `StoreRing`, `Tile::drain_staged_tma`,
`Tile::drain_staged_tma_cta`, `Tile::cta_origin`, three entry points (`s84 tma`,
`s84 tmac`, `s84t 2g`), a C tensor map on the host side, `gemm::tma_ordering` and two
`bench --case residual` tables, two device-test cases. No default, constant or
shipped kernel moved; `staged84` still ships. Both TMA rungs are on the correctness
gate and pass the element-exact bf16 `==` at every size; the doubling probe says
UNCHECKED in its own label. `build` green four times, `regcount` (occupancy gate
green, 98/94/96 against `staged84`'s 96, zero spill), `device_tests` 41 of 41.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant