Independent review: KT1 coalesced output + prefetch (head 4009ec53)
Verdict: the kernel change looks correct and the speed evidence matches its receipts. One CI blocker; several test gaps should be closed before merge.
Blockers
- Crumb CI fails on this PR. Both
crumbandAIEN Verificationreport3 of 157 crumbs stale(src,tests,.). I reproduced it locally with the tool pinned incrumb.lock: the PR head is STALE, whileorigin/main(b93dfa12) isOK: 157 crumbs current. Fix: runcrumb compilewith the pinned tool and commit the regeneratedsrc/.crumb,tests/.crumband./.crumb. Also rebase: the branch is 8 commits behind main (no overlapping files).
Should-fix
- The simulator cannot see the slot-set race the design guards against.
tests/bw_warp_sim_k.h:314always runs warps 0..W-1 in that order within a barrier phase, so warp 0 always reads its slots before any other warp writes the next round. Mutant check: forcing a single slot set (stog = 0atsrc/omega_blackwell_codegen_tern.c:382) still passes 34/34. By contrast, dropping the round barrier (:480) is caught. The two-slot design is correct on paper: writes to set S in round i+2 come after barrier i+1, and warp 0 only reaches that barrier after round i's LDS→STG. But nothing tests it. Suggest a reverse-warp-order phase (anorderfor warps, not only fragments) so the single-slot mutant goes red. - The partial last round with more than one K iteration is not covered. Mutant check: removing the unit clamp (
ueff = uatsrc/omega_blackwell_codegen_tern.c:400) still passes 34/34. Every coalesced sim point that has warps past U also hasKSC/D == 1, so only the clamped prefetch is ever used and later iterations never load. Add a point such as{ 1024, 40, 0, 4, 4, 1, 2 }(U=5, stride 8, 4 K iterations). The unclamped prefetch is caught (mutant at:338gives a sim memory error), so the prefetch bound itself is tested. - The test target is not in CI. No workflow runs
test-gpu-tern, even though this PR changes the shared encoder (src/omega_blackwell_codegen.c:383) and adds the coalesced path. Its host and sim runs take seconds; please wire it into a host-suites job (thenumeric2/gpuengineselectors already matchsrc/omega_blackwell_codegen*). - The clock claim's primary data is not in the evidence.
evidence/.../README.md:21(andinvestigation/plan.md:39) citeclockcam-1-cam.csv, which is not committed;investigation/clockcam-1.jsonhas no clock figures. Either commit the CSV or mark the 2560 MHz figure as not receipted here.
Nits
src/omega_blackwell_codegen.h:30: the comment still readsdesc[URd][Ra.64]; make it[Ra.64+imm].- The other simulators still ignore the LDG.E immediate now that the encoder honors it:
tests/bw_warp_sim.h:150,tests/bw_warp_sim_pa.h:166,tests/bw_warp_sim_tc.h:177,tests/gpu_attention_test.c:727. Today every non-tern caller passes 0, so this is harmless, but it is a trap for the next kernel. Mirror thebw_warp_sim_k.h:156change or refuse a nonzero imm there. src/omega_blackwell_codegen_tern.h:109:OMEGA_TERN_SHARED_MAXcopiesOMEGA_BW_QMD_MAX_SHARED_BYTESby value. Includeomega_blackwell_qmd.hor add a_Static_assertso the two cannot drift.src/omega_blackwell_codegen_tern.c:493: the XOR toggle relies onx_bytes(a multiple of 512) andslot_bytes(at most 128) having no common bits. That holds today; a one-line comment or assert would keep it true.- Coalescing needs 2RW ≤ 32 (
:145), so the block layout at R=4, W=8 keeps per-row stores. That is fine, but worth one line in the README, since the speed table is row-major R=1 only.
Verification done (fresh /tmp clone, no GPU)
- Shared-memory staging. Read the full round: lane 0 writes STS into slot set S, then BSYNC, then BAR, then warp 0's LDS → STG, then XOR. The CTA-uniform exit (
:393) keeps barrier counts equal across warps. Rows ≥ 2RU are never stored. Footprint: x + 2·(8RW) ≤ 16384 is checked incoalesced_out, and the QMD rounds up to 128 within the cap. nvdisasm of k2560/R2/W8 shows 2× BAR.SYNC, a single LDS→STG in the store region, and LOP3 0x3c. - LDG.E immediate. The words match the sealed nvdisasm layout in
docs/numeric/E1_LDST_GB10.md:24(w1 =ureg | off24<<8, w20x0c1e1900). nvdisasm 13.0 of the PR kernel decodesLDG.E R33, desc[UR4][R34.64+0x40],+0x280, and so on, as intended. Byte identity: every otherBW_IR_LDG_Eemitter (gemm, qg, tc, dec, moe, moe2, bf16, elementwise, attention, bw_em.h, codegen.c BW_APPEND) leaves imm 0, so their words are unchanged. elementwise, attention, moe-window, fp8, decode-attn, router, bf16-gemv, fp8gemm, gpr-boundary and matmul-api host+sim gave the same results on base and head. test-gpu-attention fails the same way on both, so that failure predates this PR. - Prefetch. The clamp to U-1 is correct (n == 0 is refused by the API, so U ≥ 1). The x staging lanes clamp to KWC-1. k=256 (one K iteration) passes in the sim.
- Tests.
make test-gpu-tern: host 56/56, sim 34/34, mutants 1/2/3 caught. Peak 54 / declared 56 at k2560 row-major i32 is reproduced. - Evidence. All 20 "after" fractions in the README match
receipt-cold-{1..5}.json(minus_floor_of_practical_237_2), and all 12 "before" fractions match the 18185404receipt-mainand repeat2/3 receipts. Gates 180/237.2 = 0.759 and 200/237.2 = 0.843.device.txtpins d58a46a0 with dirty=0, and the second commit only adds files underevidence/. The folder has no checksum manifest; the only hashes are binary sha256s ininvestigation/*.meta, which point at paths outside the repo and cannot be re-checked. - Thresholds and honesty.
tests/gpu_tern_test.candtools/run_gpu_tern_chip.share untouched by both commits, so no threshold moved and no stray diagnostic line was committed. The PR body and README state the 2560x2560 FAIL plainly, and the 150-launch gate is framed as a proposal only. - Trailers. Both commits carry
Co-Authored-By: Claude Fable 5.1. No repo policy conflicts with that.
Reviewed by an independent Claude Opus 5.5 reviewer for the orchestrator.