Repository navigation
docs: record #1803 Metal gate, add paged decode counter A/B - #1881
Conversation
Closes the Metal half of #1803's last acceptance criterion: that Metal and CUDA select exactly the same kernels as before the GpuKernelBackend refactor. The CUDA half stays open as #1873. The record covers four arms (the backend probe, greedy byte-identity across six configurations, the batched paged decode counters, and the workspace gate) and names what was not measured. Its most reusable part is the two runs that passed for the wrong reason: five checkpoints reported 5/5 EQUAL while three of them never reached a changed decision point, and the paged arm compared gather against gather because the dispatch floor declined both sides. Each cost a re-run and each recurs unchanged on CUDA. The script is the harness for that paged arm, generalized so #1873 can run it on GB10. Output equality cannot judge that path: every gate on it chooses between the fused kernel and a gather fallback that computes the same thing, so a disabled fused path is byte-identical and silent. The verdict is gather_fallbacks, not declines, which is never exported to the gauges. The script also refuses the vacuous run where neither side launched the fused kernel, which is the failure the paged_decode_batched doc comment records from the first #899 sweep. Validated end to end against the two binaries the record describes, reproducing its counters exactly. shellcheck clean. Refs #1803, #1873, #1877
|
Read the script and the report. The shape is right, and the part I would have got wrong is the part you got right: refusing a run where neither side took the fused path, instead of reporting EQUAL. That is the failure your own first measurement produced, and a comparison tool that cannot fail for the right reason is worth less than no tool. Checked here: Three things from the ROCm and GB10 side, none blocking.
The requests are sequential, so the launch is a batch of one even with The 180 second readiness wait is generous for an 8B on a warm page cache and thin for a first load from cold storage on a machine nobody has touched, which is the GB10 case. A knob would do; so would saying in the usage text that a cold first load may need it raised. One question rather than a finding: on a failure path the script kills the server and returns, and the On the vendor design, agreed, and the invariant test is the part I would not have thought to add. Writing the lesson in a comment and fixing it in a test are different things: I have put the reasoning in comments twice today and both times the next person who needs it is me, later, with the comment scrolled off. A test that fails when someone adds a vendor and forgets is the version that survives. I will take |
Records the Metal regression gate for #1803 and lands the harness for its paged arm, so #1873 can run the CUDA half without rediscovering how.
docs/benchmark_results/kernel-backend-kind-metal-m1ultra-2026-09-13.mdcovers four arms: the backend probe #1803 itself ships, greedy byte-identity across six configurations, the batched paged decode counters, and the workspace gate (11119 passed, 0 failed). Verdict is that Metal selects the same kernels. It also names what was not measured, including the sampler's two-arm diff, which greedy decode cannot reach.The reusable part is the two runs that passed for the wrong reason. Five checkpoints reported 5/5 EQUAL while three never reached a changed decision point, because
FUSED_ADD_RMSNORM_DEFAULTandFUSED_ROPE_APPEND_DEFAULTare opt-in,falcon-mambadoes not usessm_update_kernel, andsplit_kv_enabled()short-circuits onabsorbed_enabled(). And the paged arm compared gather against gather because the dispatch floor declined both sides. Each cost a re-run; each recurs unchanged on CUDA.scripts/paged_decode_counter_ab.shencodes that. Output equality cannot judge the batched paged path, since every gate on it chooses between the fused kernel and a gather fallback computing the same thing, so a disabled fused path is byte-identical and silent. The discriminator isgather_fallbacks, notdeclines, which is never exported to the gauges. The script also refuses the vacuous run where neither side launched the fused kernel.Validated end to end against the two binaries the record describes, reproducing its counters exactly. shellcheck clean,
insert_apache_header.py --checkandcheck_cross_repo_refs.pypass. No product code changes.Refs #1803, #1873, #1877