# Compiler patch qualification, 2026-09-22
This records the original 0.8 qualification. The [0.8.6 refresh](NATIVE-REFRESH.md)
qualifies upstream `468508b9e`, retains six patches including 0010, and expands
the paired corpus with three convolution shapes.
The 0.8 release retains patches **0001, 0003, 0005, 0007, and 0009** on upstream
`556c648e8f301ad9656d325687cc93b417ea78ff`. Correctness and explicit CU/WGP support
remain mandatory. Optional patches require a >=3% improvement with a paired 95%
confidence interval excluding zero and no supported >3% regression in the corpus.
| 0001 VOPD banks | Illegal source-cache pairings remain upstream | Keep correctness fix |
| 0002 fragment repack | No benefit in the shared supported corpus; queried consumer repack form cannot compile upstream | Remove from applied set; preserve under `patches/retired` |
| 0003 SMEM reuse | Upstream can reuse unordered load destinations too early | Keep correctness fix |
| 0004 fragment read order | All six tested artifacts are byte-identical to baseline in default/CU/WGP modes | Remove from applied set; preserve under `patches/retired` |
| 0005 encoding config | Configured encodings still require materialization | Keep compilation fix |
| 0006 inline types | Original regression cases pass upstream | Already removed |
| 0007 VMEM source reuse | Final Ubuntu build improves both fp16 GEMM sizes in all three modes | Keep performance patch |
| 0008 dma-buf export | Old HRX runtime is removed; libamdf supplies native export/import | Remove |
| 0009 processor mode | Typed explicit CU/WGP extension remains downstream | Keep |
Final patch-0007 gains against the mandatory-only compiler:
| fp16 GEMM M256 N512 K256 | 8.58% (7.75–9.86%) | 8.12% (6.38–10.92%) | 8.66% (7.76–10.04%) |
| fp16 GEMM M256 N1024 K1024 | 7.91% (7.03–9.52%) | 10.81% (9.98–12.10%) | 8.03% (7.01–9.88%) |
There was no statistically supported >3% regression in this corpus. One large
int8 CU comparison has a wide interval spanning both improvement and regression;
this is inconclusive, not proof of equivalent performance.
## Method and evidence
`examples/patch_bench.rs` executes attention at 128/512 tokens, fp16 GEMM at two
sizes, and int8 GEMM at two sizes. Each case has an independent CPU oracle;
attention allows absolute error 0.001, fp16 GEMM one minimum-normal fp16 value
(2^-14) for near-zero accumulation residuals, and int8 GEMM is exact. Inputs
are nonuniform. Every arm is checked before and after timing.
Each comparison uses 50 alternating pairs, five warmups, and 32 dependent
dispatches per graph. Both arms share exactly the same data buffers to remove
address-placement bias. The baseline-versus-itself control, each optional patch,
and the all-patch combination were run in default, CU and WGP modes. The retained
combination (0007 alone) was then rechecked using the final Ubuntu library.
Intervals use 10,000 paired bootstrap resamples of log speed ratios with a fixed
seed. Identical artifact bytes cannot count as a compiler optimization gain.
The initial separate-buffer experiment showed allocation-dependent timing bias
and is excluded from qualification. A query32 repack experiment also compared
different attention implementations because upstream rejected that source; it
is excluded from the matched corpus. No performance claim is made for 0002.
[Summary and host identity](qualification/compiler-results.json) and
[raw pairs, artifacts and compiler reports](qualification/compiler-pairs.json.gz)
are checked in. Kernel source origins and hashes are in
[native/qualification/sources.json](../native/qualification/sources.json).
`scripts/analyze-patch-bench.py` reproduces the statistics from extracted JSONL.
`scripts/build-compiler-variants.py` builds the original optional combinations
from a disposable tree with all three optional patches applied. Never run it
against a source tree used concurrently by another build.
## Consumer impact
Removing 0002 removes its particular accumulator-f32 to RHS-b16 permlane
extension. The query32 consumer fixture that uses it is rejected explicitly;
use the supported LDS attention kernel or port the repack to an upstream form.
This is a documented 0.8 breaking change. The rejected form is preserved in the
qualification sources for future upstream work. These results cover the stated
kernels and device, not complete model pipelines or every scheduling pattern.