You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Port oxide-train's deferred accumulator release: the drain leaves the critical path #221
oxide-train PR #119's survey found the structural reason the warpgroup-split epilogue wins here (+2.1% at 8192³, merged as #197/ada5f34) but measured a null (0.998) when re-derived onto oxide-train: oxide-train's epilogue is deferred — an item releases `empty(i + SLOTS)`, so the accumulator it waits on drained a full item ago and the drain is off the critical path entirely. Here the drain still sits between an item and its successor, which is exactly why making it cheaper (the split) pays.
The proposal: bring the deferred-release timing to gemm_sol.
Verify first — two survey agents disagree on the current state:
The likely reconciliation is that the 512-column two-slot allocation exists but the release still happens at empty(i + 1) rather than empty(i + SLOTS) — i.e., the slots ping-pong but the wait doesn't skip a generation. Establish the actual current semantics before implementing.
Prior art: oxide-train #86 measured the deferred release collapsing the accumulator handoff from 4,815 to 100 SM ticks with a phase probe (one binary, SLOTS behind a const, same residency both arms). The equivalent probe here would make the before/after unambiguous.
Expected interaction with #197: if the drain leaves the critical path, the warpgroup split's win should shrink toward oxide-train's null — worth re-running sol-ablate (fixed on main as of #218) after, and keeping whichever combination measures best. cuBLASLt reference ratios to beat: 0.948 at 8192³, 0.989 at 16384³.
Cost note from the oxide-train port: their release is guarded to one lane per warp (8 arrivals); #218 just landed the same guard here (measured null on its own, but the arrival arithmetic is already consistent for a deferred release).
Semantics established before changing anything, and the two surveys were each half right — because the two entries differ:
[256, N]: already deferred.Small::multiply (examples/src/gemm_sol.rs:646-648) waits empty.wait(sequence - ACCUMULATORS), and SemaphoreRing::<2>::wait(i - 2) (src/sync.rs:434) resolves to slot i % 2 at the phase item i - 2 ended. That is empty(i - SLOTS) exactly — What binds the GEMM at 1081 TFLOP/s, and does the curve flatten at 16384 cubed #86's timing, already here, and literally wait_recycled(sequence).
[512, 256]: not deferred, and cannot be.:836-838 and :791-793 both wait on item i - 1's drain. Its two slots are the item's own two M-halves, not a ping-pong, and alloc_cluster::<512> is already an SM's entire tensor memory (src/tmem.rs:15). A third slot does not exist.
That reconciles #197 against oxide-train PR #119: oxide-train's kernel is this tree's [256, 256], so its null was measured against an already-deferred release, and ferro's +2.1% was measured at [512, 256], where the drain is exposed ~1:1 (arithmetic in the PR).
Shipped instead: the release moves to the last band's tcgen05.wait::ld. And the prediction in this issue is wrong — table 6, now the 2×2 square, has the split at 1.019/1.019 late and 1.020/1.021 early. Additive, not substitutes.
Activity
feitreim commentedon Aug 7, 2026
Semantics established before changing anything, and the two surveys were each half right — because the two entries differ:
[256, N]: already deferred.Small::multiply(examples/src/gemm_sol.rs:646-648) waitsempty.wait(sequence - ACCUMULATORS), andSemaphoreRing::<2>::wait(i - 2)(src/sync.rs:434) resolves to sloti % 2at the phase itemi - 2ended. That isempty(i - SLOTS)exactly — What binds the GEMM at 1081 TFLOP/s, and does the curve flatten at 16384 cubed #86's timing, already here, and literallywait_recycled(sequence).[512, 256]: not deferred, and cannot be.:836-838and:791-793both wait on itemi - 1's drain. Its two slots are the item's own two M-halves, not a ping-pong, andalloc_cluster::<512>is already an SM's entire tensor memory (src/tmem.rs:15). A third slot does not exist.That reconciles #197 against oxide-train PR #119: oxide-train's kernel is this tree's
[256, 256], so its null was measured against an already-deferred release, and ferro's +2.1% was measured at[512, 256], where the drain is exposed ~1:1 (arithmetic in the PR).Shipped instead: the release moves to the last band's
tcgen05.wait::ld. And the prediction in this issue is wrong — table 6, now the 2×2 square, has the split at 1.019/1.019 late and 1.020/1.021 early. Additive, not substitutes.PR: #223
The accumulator is released at the load that last read it, and the en…