Skip to content

Commit 6ddd8f1

Browse files
committed
Ledger (85): ledger 81 re-tested under the clause -- the pooled gather's per-block slopes fall as pre-registered; lands as the default-off amr_batched_gather (ledger 81 amended)
1 parent ab091b8 commit 6ddd8f1

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

docs/documentation/amr_action_plan.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,82 @@ possible while AMR aborts on the target machine at 1 rank, and every increment b
226226
on a compiler that does not reproduce it. It also means the ladder should add a CCE arm as soon as one
227227
exists, or the same class of breakage will keep accumulating undetected.
228228

229+
## 2026-09-05 (85) — LEDGER 81 RE-TESTED UNDER THE CLAUSE: the pooled consume's per-block slopes now FALL as pre-registered (gather 0.86 -> 0.44, gfill 0.24 -> 0.09 ms/block/step), so ledger 81's null was the mapper walk; in absolute terms it is a wash at 16 blocks/rank and -1.4%% at 86, so it lands as a default-off flag that pays only at high block counts
230+
231+
**Pre-registration (memory note 21:00, before the build finished; ledger 84 states the hypothesis).** Ledger 81 parked
232+
``amr_batched_gather`` because its pooled consume (one own-copy, one unpack, one ghost fill per wave instead of one
233+
of each per block) cost MORE per block: gather slope 2.80 -> 2.93, gfill 1.01 -> 1.29 ms/block/step at kernel time
234+
unchanged. Ledger 82 then found that, in a unit without ``defaultmap(present:allocatable)``, every launch walks the
235+
components of any allocatable derived-type array it names -- and the pooled kernels name ``amr_cgp(1:sys_size, 1:n)``,
236+
5n components per launch, which at ~33 us each explains ledger 81's +1.6 ms per pooled fill at n ~ 10. The branch
237+
(4 commits, tip 1d7d6fd5) was rebased onto b5b1782e as c1e454b3 (the pooled branches keep the parked code; the
238+
per-block else-branches are up/mega's instrumented loops) and gated exactly as in ledger 81 (``inc.sh gate``: 60-step
239+
identity OFF vs ON, then two reps of cap-64/32 arms OFF and ON, all amr_device_pack=T, hold 405930 on k004-001).
240+
Falsifier, inverted: if the gather and gfill slopes now FALL under the flag, ledger 81's null was the mapper walk and
241+
the design is alive (merge as default-off flag, A/B per the rule); if they do not fall, the pooled design is dead on
242+
its own terms and this entry closes it.
243+
244+
**Result (c1e454b3, hold 405930 on k004-001, ``inc.sh gate`` protocol of ledger 81, all arms amr_device_pack=T).**
245+
Identity: ``lustre_60.dat`` (3,072,000,000 bytes) and ``lustre_amr_60.dat`` (8,942,976,652 bytes) IDENTICAL OFF vs ON
246+
(60 steps, cap 64). Two reps of the four 40-step arms:
247+
248+
| | OFF | ON |
249+
|---|---|---|
250+
| wall cap 64, s (rep 1 / rep 2) | 33.11 / 34.35 | 33.06 / 36.32 |
251+
| wall cap 32, s | 45.98 / 46.04 | 44.97 / 45.73 (per-rep -2.2%% / -0.7%%; mean -1.4%%) |
252+
| gather slope, ms/block/step | 0.86 (per-rep pairings 0.83-0.89) | 0.44 (rep 1: 0.52, rep 2: 0.36) |
253+
| gfill slope | 0.24 (all pairings) | 0.09 (0.12 / 0.07) |
254+
| wall slope | 8.80 (pairings 8.33-9.27) | 7.65 (8.54 / 6.75): NOT resolved, see below |
255+
| rhs / regrid / seam / swap slopes | 4.42 / 2.82 / 1.02 / 0.26 | 4.41 / 2.78 / 0.94 / 0.26 |
256+
| reflux slope | 1.30 | 0.79 (artefact of the rep-2 ON arm; with the rep-1 arm 1.05, inside OFF's 1.17-1.44) |
257+
| gfill absolute at cap 64, s (gate reps + 2 extra pairs) | 0.296 / 0.296 / 0.298 | 0.310 / 0.374 / 0.312 / 0.312 (+5%%; the 0.374 is the disturbed arm) |
258+
| gather absolute at cap 64, s | 1.034 mean; 1.046 / 1.080 | 0.927 / 1.171 / 0.928 / 0.850 (-11..-21%% outside the disturbed arm) |
259+
| wall cap 64, s, two extra OFF/ON pairs (run1, same deck) | 33.94 / 35.73 | 33.56 / 33.72 |
260+
261+
The gather and gfill per-block slopes fell -- gather by 0.37-0.47 against an OFF rep spread of 0.06, gfill by
262+
0.12-0.17 against a flat 0.24 -- the same two rows that did NOT move in ledger 81 (2.80 -> 2.93 and 1.01 -> 1.29
263+
there, on the un-clause'd unit), with rhs/regrid/swap flat as the drift control. The cap-32 phase rows are tight in
264+
both reps (gather 2.27/2.19 -> 1.66/1.67 s, gfill 0.63/0.63 -> 0.47/0.48 s, -0.72 s together, matching the -0.66 s
265+
mean wall). The wall SLOPE delta (-1.16) is not resolved: with rep-1 arms it is -0.69, inside OFF's own 0.85 spread,
266+
and the mean is driven by one arm. That arm -- ON cap 64 rep 2 at 36.3 s -- is a whole-run disturbance, not a
267+
gather/gfill effect: every [mpiwait] row rose on all 8 ranks (TOTAL 6.97 -> 9.62 s; halo, seam, restr, reflux all
268+
up) while rhs and coarse barely moved, and the OFF cap-64 arm of the same round was elevated too (34.35 vs 33.11);
269+
no competing SLURM step or build touched the node in that window, so the cause is unattributed. Two extra cap-64
270+
OFF/ON pairs after review (run1 arms, same deck and job) settle it: gfill ON is 0.312 s in both (+5%% over OFF's
271+
0.296-0.298), gather ON 0.928 / 0.850 vs OFF 1.046 / 1.080 (-0.12..-0.23 s), and the ON wall is at or below the OFF
272+
arm in every pair of the day but the disturbed one (33.06 / 33.56 / 33.72 vs 33.11 / 33.94 / 35.73). So cap 64 is a
273+
slight net gain (~-0.13 s, -0.4%%), not a loss; at cap 32 (86 blocks/rank) both reps are negative (-2.2%% / -0.7%%). The pooled fill's own numbers give the crossover: its ms/call is 2.29 at ~7 members per wave and 2.52
274+
at ~28, i.e. ~2.2 ms fixed per wave and ~0.01 ms per member, so it breaks even against 0.225 ms per-block launches
275+
at ~7 members per wave -- about cap 64's operating point on this deck, which is why gfill alone is +5%% there
276+
while gather, whose pooled kernels replace many more per-block launches, already wins.
277+
278+
279+
**Verdict and what ships.** The design is alive and the ledger-81 entry is amended by this one: its "pooling saves
280+
nothing" was true on a unit whose every launch walked the pool's components; it is false once the walk is gone. The
281+
pre-registered DIRECTION is confirmed; the magnitude is "consistent with", not "explained by": the pooled fill fell
282+
from ledger 81's 4.8 ms/launch to 2.3-2.5 ms, more than 5n x 33 us at n ~ 7 predicts, and still ~1 ms above its
283+
census kernel time -- the pooled kernels keep 9 copyin maps per launch, so ledger 84's table lever applies to them
284+
too and is not yet applied.
285+
The flag stays DEFAULT OFF for this landing: at the campaign's operating point (~16 blocks/rank at cap 64) it is
286+
worth ~0.4%% and inside the day's spread; it pays clearly only where blocks/rank is high (-1.4%% at 86). Flipping
287+
the default waits on the CCE/NVHPC lanes running it and an A/B at a second operating point, per the rule. Ships as the default-off, bit-identical ``amr_batched_gather``
288+
(requires ``amr_device_pack``; excludes ``amr_subcycle``; falls back silently to the per-block path under
289+
non-polytropic QBMM, as ``amr_device_pack`` does) with this A/B as its measurement; the CCE/NVHPC lanes see
290+
the code only behind the flag. It is not counted on the scorecard. What it does buy the program: a measured
291+
per-block floor for the consume path -- gather 0.44 + gfill 0.09 ms/block/step with pooling vs 0.86 + 0.24 without
292+
-- so any future "per-block launch" argument for the gather family starts from 0.5, not 1.1, ms/block/step.
293+
294+
**Gates (c1e454b3 for the arms and identity; the landed tip ab091b8f adds only the four preprocessor directives restored to
295+
column 1 that the rebase had indented, a whitespace change).** Identity OFF vs ON (60 steps, cap 64, amr_device_pack=T):
296+
``lustre_60.dat`` (3,072,000,000 bytes) and ``lustre_amr_60.dat`` (8,942,976,652 bytes) IDENTICAL. Goldens on the GPU
297+
lane, flag off: 70 passed, 0 failed, TOUCHED=0. Oracle np=2 with the flag OFF and again ON: F57C3A5B and EF58E377 both
298+
6 families, 0 unbalanced, 0 mismatches, seed controls PASS in both runs. CPU build passes. NVHPC compile gate
299+
(``amr-bench/nvhpc_gate.sh``, nvfortran 24.1, ``-tp=px``): no compiler error on the branch, nor on up/mega daaa80c7
300+
(the first NVHPC reading for ledgers 82-84's code). Independent review before this was written: no blocker; its
301+
corrections (per-rep reporting, the disturbed arm, the reflux artefact, the mechanism's magnitude, the directive
302+
indentation, the missing NVHPC gate) are applied, and two extra cap-64 pairs were run at its suggestion. Default-off
303+
flag ``amr_batched_gather``; the CCE/NVHPC lanes execute the pooled code only behind it.
304+
229305
## 2026-09-05 (84) — PRE-REGISTERED, CONFIRMED ON THE FILL LAUNCH: eight per-launch copyin maps -> one device table + one update cuts the ghost-fill launch by 0.08-0.09 ms (-29%% / -40%% of the gfill phase); that is ~0.3%% / ~1.0%% of wall, and the larger wall deltas in the arms are MPI-wait movement, unresolved
230306

231307
**Pre-registration (memory note 20:00, before the build finished):** microbench rows of ledger 82 -- eight copyins of
@@ -502,6 +578,10 @@ block-count-independent floor too, and the whole-step number is the one that mat
502578

503579
## 2026-09-05 (81) — NEGATIVE, PRE-REGISTERED, FALSIFIER FIRED: pooling the gather consume into three launches per wave is bit-identical and saves nothing on the first attempt -- the pooled kernels cost more per block than what they replaced, and gather's residual cannot be apportioned from these runs
504580

581+
**AMENDED by ledger 85 (same day): the null below was the amdflang per-launch component walk of ledger 82, not the
582+
design; under the file's ``defaultmap(present:allocatable)`` the pooled consume's gather+gfill slopes fall as pre-registered,
583+
and the flag landed default-off.**
584+
505585
**The increment (parked on `task12/batched-gather`, NOT merged).** Behind the default-off `amr_batched_gather` (requires
506586
`amr_device_pack`), the gathered coarse patch `amr_cg` becomes a pool with one patch per owned block, and each wave's
507587
per-block consume -- own-copy kernel, fused unpack, ghost-fill kernel, two phase brackets, per block -- becomes a host loop

0 commit comments

Comments
 (0)