Repository navigation
Description
#94 priced a shared-memory staging buffer for the epilogue and rejected it:
Against a steady state already at only 67% of dense peak, cutting concurrency
by a third to recover a term now worth 20–22% is a losing trade.
The arithmetic is right and the premise underneath it is unmeasured. "Cutting
concurrency by a third" is MAX_CLUSTERS 222 → 148, which is a third of the
residency. Whether it is a third of the throughput is a different question,
and nothing in this repo has asked it.
Residency buys latency hiding. A kernel whose pipeline already covers its own
latencies does not need the third CTA, and one that is bandwidth-bound may not
either. #84 established that CTAS_PER_SM is a measured property; it did not
establish what each of those CTAs is worth.
This blocks #15. lcsf's store stage needs either 16384 B of shared (one
fp32 band, against 4032 B of headroom — #94 §6) or accumulators held live across
the item boundary (against 3 registers of headroom — #95). Both routes buy the
20–22% boundary term by spending an occupancy step. If a step costs 33% the
trade loses and #15 needs #94's ring-slot-reuse route, which entangles it with
the schedule. If a step costs 10% the trade wins outright and lcsf is a
straightforward epilogue change.
We do not know which, and it is one measurement.
Scope
Price the occupancy step directly, changing nothing about the kernel's work.
- Add a dead shared allocation to
gemm_cg2— enough to cross the step,
4033 Band up — that no code reads or writes. The work, the traversal, the
instruction mix and the register count are all identical either side. The
only variable is residency. - Confirm the step actually happened. Count the CTAs instead of asking, and flash_forward's 1 is real for the other reason (#78) #84's
%smid/%globaltimercensus
indevice-testscounts residency rather than asking for it, and the
occupancy query is confounded by the mere presence oftcgen05.alloc
(The 1 CTA/SM is tcgen05 itself, and a smaller TMEM allocation buys nothing (#74) #77), so the census is the instrument. A run where residency did not move is
a measurement of nothing. bencheither side at 4096³, 8192³ and 16384³. Report throughput per step,
not only the delta.- Repeat at two step sizes if the plan allows it — 3 → 2 and 2 → 1 — since
a linear cost and a cliff are different answers and predict differently for
Sweep the GEMM's pair tile and pipeline depth: [256,256] at three stages should dominate on paper #87, which spends the same budget.
Why the dead allocation rather than building the real thing
Because a real staging buffer changes the epilogue and the residency at once,
and the whole difficulty in #94 §6 was that its cost and its benefit are
entangled. A dead allocation separates them: it has the cost and none of the
benefit, which is precisely the control. Same discipline as #67, #76 and #95 —
the number a decision rests on gets measured on a kernel built to isolate it.
Acceptance
A number for what one CTA per SM is worth to this kernel, with the census
confirming the step occurred, and a stated verdict on whether #15's straight
route is viable. The dead allocation does not land — it is an experiment,
and what lands is examples/README.md recording the result and the method.
Related: #94 §6 (the rejection this re-examines), #84 (the census), #77 (why the
query cannot answer this), #95 (the register half of the same cliff), #15, #87.
Activity
Price the occupancy step on a dead allocation, and #94's third is a s…
The pair tile was the lever, and the mechanism is not the one that lo…
The store stage cost a reordering to try, and it hides nothing (#15) (#…
The two pair tiles cross over between 1536 and 2048 cubed, and the ho…