interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / evidence / amd-speed-20261114 / REPORT.md

747 lines · 64342 bytes Raw Blame History Rendered
1---
2title: "Omega on one AMD Instinct MI300X: Qwen3.8-27B-FP8 decode speed, 13 and 14 November 2026"
3author: "Drake Stapleton"
4date: "14 November 2026"
5---
6
7# Omega on one AMD Instinct MI300X: Qwen3.8-27B-FP8 decode speed
8
9Final report, 14 November 2026. Readers: engineers at Intel (UXL) and AMD. Status of every section is in its first line.
10
11This report was written by the author's AI agents under the author's direction (section 2).
12
13## 1. Summary
14
15State: FINAL. COMPLETE for every result measured on the card. Four card items are to be done when equipment is
16available; for each, the CPU work done so far is listed with its source (local, unreviewed and not landed):
17
18- Several tokens per pass, timed on the card (section 7): the multi-token host loop passes its CPU gate on local branch `spec-decode2` (commit `f859c88f`), and the R-row kernels and the whole-pass plan gate pass theirs (their reports name no branch; section 7 names each file and the one mutant the whole-pass gate does not catch). The card bundle was rehearsed on the Spark CPU (`spec-decode/card-s4/dry4.log`): the launchers accepted all 11 plans in 14 plan checks (11 with `launch-spec`, 3 with `launch-x86`), the log ends `SPEC-S4 PASS`, a corrupted bundle was refused and a wrong id caught. The rehearsal script says the real launchers ran under qemu and stopped at the device, and a stand-in printed the timed output (`spec-decode/card-s4/dry_s4.sh` lines 4 to 5, `spec-decode/card-s4/fake_launch.py` lines 2 to 4); the 26.157 ms per token in the log's two `RUN` lines is the stand-in's output, not a measurement. The extra-row cost of the FP8 kernel is already measured on the card (section 7). To be done when equipment is available.
19- 4-bit quality on the card and the four-row kernel's timing (section 6): the 4-bit gate, extended to `q4gemv_d8r4`, passes: 57 cases over the three kernels (19 for `q4gemv_d8r4`), 9 of 9 mutants caught, 2 of them specific to the four-row kernel (`four-bit/evidence/gate-r4.log`). To be done when equipment is available.
20- Kernel step 2 (section 5): fused add and norm (1,126 to 998 dispatches) and merged delta-net a/b projection (48 fewer), both plan rewrites logged in the Spark simulation (`raw/amd-report/extracted/spark-logs-20261114/kernel-step2-sim-next.log`); FP8 kernels with 2 and 4 rows per wave. `addnorm5120` v2 passes its CPU gate, 6 cases, 3 mutants caught (`amd-kernel-speed/gates/gate-addnorm5120.log`); `fp8gemv_b128f` v3r2 (`9377954c`) and v3r4 (`5620081b`) are each row bit-identical to v1 on the CPU and pass their gates with 62 cases and 22 and 27 mutants caught (`raw/amd-kernel-speed/kernels/FP8-R2-RESULT.md` lines 12 to 13, 116 to 121 and 126 to 142). In the same simulation 31 of 31 runs of the card bundle exit 0; that the real launcher validated every plan and argument list in them is quoted from `amd-kernel-speed/RESULT.md`, a lane note not in this folder. To be done when equipment is available.
21- Launcher run 4 (section 4): launcher modes `plan3a` (2 MiB buffer placement) and `plan3v` (token cell in VRAM). That they are built is quoted from `amd-launch-gap/RESULT.md`, a lane note not in this folder. The prepared card script runs both modes with launcher `657db853`, which it checks by sha256 (`amd-launch-gap/card/bundle4/gap-run4.sh`). That launcher's Spark gate is 308 checks, 0 failures (`amd-launch-gap/build-r15-spark-gate.log`); the log does not name the two modes, so it shows that the existing checks pass with that launcher, not that the new modes are gated. To be done when equipment is available.
22
23**4-bit quality on the CPU: IN PROGRESS.** The frozen-bar comparison of the `fp8` and `q4` arms had not finished when
24this report was written; its result is not in this report, so 4-bit weights are neither accepted nor rejected here
25(section 6).
26
27On 13 November an Omega program ran Qwen3.8-27B-FP8 on one AMD Instinct MI300X at a median decode time of 26.726 ms per
28token, with no AMD user-space runtime in its process (the published run). Since then the work has gone after one goal set by
29the author on 14 November: as fast as possible on one card.
30
31**Headline (MEASURED, one card, one session 6e585e21, three interleaved 256-token runs per arm).** The fixed launcher and
32the new kernels together decode at **16.226 ms per token (61.6 tokens per second)**, against 27.164 ms for the published
33launcher and kernels in the same session: **1.674 times faster**. Every one of the 21 timed runs printed the published 256
34token ids, and the altered-weights control differed at index 0. That run uses a plan sized for this request's 286
35positions; on the general plan (131,072 positions) the same launcher and kernels take 16.519 ms (1.644 times). Each step
36in the same session:
37
38| Arm | What changed | Decode, ms per token (MEASURED) | Percent of 5.3 TB/s (estimate) |
39|---|---|---|---|
40| A | published launcher and kernels | 27.164 | 18.7 |
41| B | launcher fix (plan3) | 25.425 | 20.0 |
42| C | plus RMSNorm v2 and delta-net state update v2 | 19.619 | 25.9 |
43| D2 | plus FP8 matrix-vector v2b2 (taken over from lane GpuBenchSync) | 16.519 | 30.7 |
44| E2 | D2 on the 286-position plan | 16.226 | 31.3 |
45
46The launcher fix is the first 1.739 ms; the RMSNorm and state rewrites 5.806 ms; the faster FP8 kernel 3.1 ms; the smaller
47plan 0.293 ms. The output-identical floor for this plan, reading every weight byte once per token at the card's quoted
485.3 TB/s, is 5.08 ms per token (MODELED), so the best arm is still 3.19 times the floor and moves weights at 31.3 percent
49of that bandwidth (an estimate: modelled bytes per step over measured time).
50
51Earlier sessions found the pieces separately (sections 4 and 5): the launcher was 1.98 ms per token behind AMD's HIP
52runtime replaying the same 18 kernels, because of system-scope memory fences on all 1,126 dispatches of a step and a single
53doorbell after the host wrote the whole step; fixing both took 26.490 to 24.812 ms in one session and 26.641 to 24.891 in
54another. A third session paired each Omega run with a HIP run over nine cycles: with the same clock on both sides, Omega
55still trails HIP by 0.08 ms per token after each side is charged its own token read (paired median, 0.3 percent;
56behind in 8 of 9 cycles; 0.096 ms on the raw step clocks), the launch path itself
57costs the same on both, and the remaining gap is by elimination inside kernel execution (section 4).
58
594-bit weight kernels now run bit-exact on all 10 matrix shapes of the model on the card, at 2.98 to 3.18 TB/s isolated
60against 2.09 to 2.15 for the v1 FP8 kernel on the same tensors. Their isolated times add up to 4.44 ms per token for
61every FP8 linear and the head (MODELED), against 12.2 ms for the v1 FP8 kernel; v2b2, the fastest FP8 kernel of the
62headline, was not timed by this method. But the measured whole step on the v1 kernels (21 to
6327 ms) is about twice the isolated sum of its FP8 matrix kernels, so the kernels between and around the matrix products,
64and the gaps between dispatches, matter as much as the weights (section 6). 4-bit quality is IN PROGRESS on the CPU.
65
66| One MI300X, lighthouse request, greedy, 256 tokens | Decode, ms per token (median) | Label | Session (short id) |
67|---|---|---|---|
68| Published Omega run, 13 Nov 10:12 UTC | 26.726 | MEASURED | 76e03a28 |
69| Repeat from public instructions, 13 Nov 19:07 UTC | 26.721 | MEASURED | 46d1b9c5 |
70| AMD HIP graph replay of the same 18 Omega kernels, same session | 24.741 | MEASURED | 46d1b9c5 |
71| Launcher before (plan), 14 Nov run 1 | 26.490 | MEASURED | 52ef268c |
72| Launcher after (plan2), same session | 24.812 | MEASURED | 52ef268c |
73| HIP graph replay, same session | 24.722 | MEASURED | 52ef268c |
74| Launcher plan3 (plan2 plus agent-scope acquire on decode steps), 14 Nov run 2 | 24.891 | MEASURED | e8cddcb1 |
75| Launcher before (plan) and HIP replay, same session | 26.641 and 24.741 | MEASURED | e8cddcb1 |
76| Kernels before (full plan, v1 kernels), one run | 27.007 | MEASURED | e787e65d |
77| Kernels after (v2 RMSNorm and state kernels, 286-position plan), one run | 20.968 | MEASURED | e787e65d |
78| Combined: published launcher and kernels (A) | 27.164 | MEASURED, 3 runs | 6e585e21 |
79| Combined: launcher fix and all new kernels, general plan (D2) | 16.519 | MEASURED, 3 runs | 6e585e21 |
80| Combined: the same on the 286-position plan (E2) | 16.226 | MEASURED, 3 runs | 6e585e21 |
81| Several tokens per pass (speculative decoding with the model's own head) | NOT_RUN on the card | CPU gates PASS | |
82| 4-bit weights, whole model | NOT_RUN | kernels bit-exact on 10 shapes, `q4gemv_d8r2` 2.98 to 3.18 TB/s isolated; quality IN PROGRESS | c715b669 |
83| v1 FP8 linears and BF16 head, sum of isolated kernel times | 12.2 | MODELED: no launch gaps, no non-matrix kernels | c715b669 |
84| 4-bit linears and 4-bit head, same method | 4.44 | MODELED: same exclusions, quality IN PROGRESS | c715b669 |
85| Output-identical lower bound at 5.3 TB/s, this plan | 5.08 | MODELED | |
86| 4-bit floor at 5.3 TB/s, candidate A bytes, head kept in BF16 (4-bit linears with BF16 head above are 1.70 times it) | 2.93 | MODELED: not output-identical, needs the quality bar | |
87
88Two numbers for the same arm in different sessions differ (the published launcher and kernels on the full plan measured
8926.726, 26.721, 26.490, 26.641, 27.007, 27.164 and 27.051 ms per token in seven sessions), so every before and after pair above is compared only inside
90one session. Drift on this hosted card is as large as the remaining gap to HIP, so that gap is measured only by paired
91runs (section 4, run 3).
92
93## 2. Machine and method
94
95State: COMPLETE.
96
97- **Card.** AMD Instinct MI300X, gfx942, reported as "AMD Instinct MI300X VF" (one virtual function), in AMD's hosted
98 One-Click notebook "Qwen/Qwen3.8-27B on AMD Instinct MI300X", opened from the author's AMD developer sign-in. Linux
99 6.12.48, ROCm 7.2.2 in the container; root inside the container with `/dev/kfd`. The card is one GPU of a shared
100 host; exclusive use of the card was not established.
101- **Model.** `Qwen/Qwen3.8-27B-FP8`, revision `017b9c7af6b5689d5dd426a76e0bc077eb5ca20a`, text path only, every file
102 checked against pinned sha256 values before use.
103- **Request.** The lighthouse essay prompt, 30 prompt tokens fed as recorded ids, greedy, 256 generated tokens. The
104 launcher runs the prompt one token at a time, so the first 30 steps are prefill and the remaining 255 are decode.
105- **Clock.** The launcher prints the wall time of every step (`OMEGA_STEP i tok=T us=U`), from the first packet write to
106 the completion signal. Decode time is the median of the 255 decode steps of one run; an arm's figure is the median of
107 its runs' medians. HIP figures are synchronized wall time for one replayed step, from the same Python driver.
108- **Interleaving.** In the launcher session every arm ran one warmup and its timed runs in turn (old, new, HIP), so a
109 drifting card affects all arms alike. The first kernel session ran one run per candidate; the combined session ran all
110 seven arms in turn, three times.
111- **Software in the process.** `omega-launch`, an Omega program compiled by the seeded Omega compiler (omc sha256
112 `26540e6d...`, omega-mv `2ee0a70d`), and 18 gfx942 code objects written by Omega's own code-object writer. Python,
113 PyTorch and HIP are measuring and comparison tools outside that process.
114- **Numbers.** `numbers.json` lists each checked number with its label (MEASURED, DERIVED, MODELED, QUOTED, COUNT,
115 RECORD), unit, source file and sha256. `recompute/run-all.sh` recomputes the MEASURED, DERIVED and COUNT values from the
116 raw logs; the QUOTED and MODELED constants (`recompute/constants.json`) are listed with their sources and not
117 recomputed. `recompute/check_report.py` then checks this report: every decimal number outside code spans equals a value
118 in `numbers.json` to its printed precision; a decimal followed by a unit word (ms, us, percent, times, TB/s, GB, tokens
119 per second, tokens per pass) must equal a value of that unit; and the claims listed in `recompute/claims.json` (the
120 headline ratios and the counts of runs, launches and gate cases, integers included) must equal
121 their named values. Other integers, and decimals in tables without a unit word, are checked only by the first rule or
122 not at all. A self-test changes one number at a time in a copy and requires the check to fail. Ratios and percentages
123 were also checked in Wolfram (`recompute/WOLFRAM.md`). A few QUOTED and MODELED figures come from the lanes' own
124 notes, named where they are used (for example `amd-kernel-speed/RESULT.md`, `spec-decode/model/wolfram.md`); those
125 notes are not in the publication folder. Paths in this report are written relative to the evidence folder `raw/`
126 (for example `amd-launch-gap/HANG-20261114.md` means `raw/amd-launch-gap/HANG-20261114.md`), except where a sentence
127 says it quotes a lane note; those notes are named by their own path and are not in the folder. One planning note is
128 referred to by a file in `raw/` but is not published: `multi-card/ACCESS.md` (named in
129 `raw/multi-card/model/WOLFRAM.md`).
130- **Who did the work.** The author directed AI coding agents, which ran every card session and wrote this report. A
131 *lane* is one agent's line of work, named after it: AmdLaunchGap (launcher), AmdKernelSpeed (kernels), FourBit (4-bit
132 weights), SpecDecode and SpecDecode2 (several tokens per pass), GpuBenchSync (an earlier kernel-timing lane), MultiCard
133 (eight cards), AmdReport (this report). *Main* is the coordinating agent that assigned the work and decided between
134 lanes. *The Spark* is the author's own NVIDIA DGX Spark, used for CPU gates and CPU reference runs; *the Mac* is the
135 author's workstation, where the agents ran and the files were kept.
136- **Terms.** The *lighthouse request* is the 30-token essay prompt above with 256 greedy tokens. The *published run*
137 is the 13 November run in CUDApp `dc536882`. *Level 3* is the brief's on-card repeat procedure. `plan`, `plan2`,
138 `plan3`, `plan3c`, `plan3t` are launcher modes (section 4). *v1* is a published kernel, *v2* and *v3* its rewrites;
139 `v1all` and `cap286` are plans (section 5). *Delta-net* is the gated delta-net recurrent layer of this model. *S4* is
140 the on-card step of several tokens per pass (section 7). The *frozen bar* is the 4-bit quality threshold fixed before
141 any 4-bit result (section 6).
142- **Bandwidth percentages are estimates.** They divide the modelled weight bytes per step (26.92 GB: every weight and
143 block scale once, the BF16 output head in full, one embedding row) by the measured time, against AMD's quoted 5.3 TB/s.
144 No memory counter was read.
145- **Paths.** A path in this report is under `raw/` unless it starts with `raw/` or `recompute/`, or is named as a lane
146 note not in this folder.
147
148## 3. Baseline
149
150State: COMPLETE.
151
152| Run | Run medians, ms per token | Decode median | Prefill, 30 tokens |
153|---|---|---|---|
154| Published, session 76e03a28, launcher `08a50491` | 26.731, 26.642, 26.675, 26.726, 26.76 | 26.726 | 779.042 ms |
155| Repeat from the public clone, session 46d1b9c5 | 26.743, 26.803, 26.706, 26.671, 26.721 | 26.721 | 779.599 ms |
156
157Same session as the repeat (46d1b9c5):
158
159| Path | Decode, ms per token |
160|---|---|
161| Omega launcher and Omega kernels | 26.721 |
162| The same 18 Omega kernels replayed by AMD's HIP runtime (graph replay) | 24.741 |
163| PyTorch with transformers on ROCm, same FP8 checkpoint, plain greedy loop: eager, transformers' fast path not available, FP8 kernels from an older community kernel package on the Hugging Face Hub falling back from DeepGEMM to Triton | 131.011 |
164| The notebook's stock pipeline, BF16 checkpoint, 70 prompt tokens, thinking on (not like for like) | 70.628 |
165
166Neither PyTorch row is a speed baseline; both are correctness references under the conditions in the rows. No vLLM
167or SGLang ran on the card. The comparison that matters for the launcher is
168the HIP row, because it runs the same kernels in the same order.
169
170## 4. Launcher
171
172State: COMPLETE for runs 1, 2 and 3. Run 3 (paired) shows a small remaining gap to HIP; its cause is open, owner
173AmdLaunchGap. Run 4 is to be done when equipment is available (section 1).
174
175**The gap.** In session 46d1b9c5 the Omega launcher took 26.721 ms per token and HIP graph replay of the same kernels
17624.741: 1.98 ms per token.
177
178**The clocks were not the cause.** Both timers stop before the host reads the token back, and both include the on-device
179argmax (lane analysis from source: Omega `plan.om` lines 549 to 565 at `dc536882`; HIP driver `amd-launch-gap/src/CUDApp-base/evidence/amd-qwen38-native-20261113/oracle/driver-real2.py`
180lines 206 to 210). HIP's interval contains extra host work, so the clock choice, if anything, understates the gap.
181
182**Root cause, two parts** (read from ROCm 7.2.2 ROCclr source and the Omega launcher):
183
1841. *System-scope fences on every packet.* Every one of the 1,126 AQL packets in a step carried header `0x1502`: acquire
185 and release at system scope. On gfx942 that writes back and invalidates the L2 for system-coherent lines at every
186 kernel boundary. HIP marks packets with agent scope between kernels and uses system scope only at the step boundary.
1872. *One doorbell after the whole step.* The host wrote all 1,126 packets and then rang the doorbell once, so the card sat
188 idle while the host wrote. HIP rings a doorbell after batches of 1, 2, 4 and so on up to 256 packets, so the card
189 starts after the first packet.
190
191**The fix** (CUDApp local branch `amd-launch-gap`, commit `139bb6a9`, two commits on `dc536882`; not landed, not reviewed
192yet by the author's order to review at the end). New launcher modes, the old `plan` mode unchanged:
193
194- `plan2`: system acquire on packet 0 and system release on the last packet of each step, agent scope between; doorbells
195 after batches of 1, 2, 4 up to 256 packets.
196- `planscope` and `planstage`: one of the two changes each, for attribution.
197- `plan3`: plan2 plus an agent-scope acquire on packet 0 of decode steps, where the host wrote nothing a kernel reads.
198
199CPU gate: `tests/amd-kfd-launch/check.py` 308 checks PASS, 0 failures, device rows NOT_RUN, at commit `d957526e` (the script is a CUDApp repository path, not in this folder),
200which adds the alarm diagnostics of the hang paragraph below to this fix (`amd-launch-gap/build-r14-spark-gate.log`; the
201log names the x86 launcher it built, `a6aee5ef`, the one run 3 used, and no commit; `amd-launch-gap/HANG-20261114.md`
202line 20 ties `d957526e` to `a6aee5ef`). Section 11 lists each commit with its launcher.
203
204**Measured, one card, one session** (run 1, session 52ef268c, 14 Nov from 00:50 UTC; 1 warmup plus timed runs, arms
205interleaved; every run printed the published 256 ids):
206
207| Arm | Runs | Decode, ms per token | Gain against plan, ms |
208|---|---|---|---|
209| plan (published launcher `08a50491`) | 5 | 26.490 | |
210| plan, rebuilt binary (contract unchanged) | 2 | 26.4905 | |
211| planstage (doorbells only) | 2 | 26.2925 | 0.1975 |
212| planscope (fence scope only) | 2 | 25.014 | 1.476 |
213| plan2 (both) | 5 | 24.812 | 1.678 |
214| HIP graph replay, same kernels | 5 | 24.722 | |
215
216plan2 is 6.3 percent faster than plan in the same session (40.30 tokens per second). It is 0.090 ms per token behind HIP
217(0.36 percent). The two parts add up: 1.476 plus 0.1975 is within a few microseconds of the 1.678 measured together. The
218lane had modelled at most 1.854 ms for the fence change and 0.126 ms for the doorbells before the card run.
219
220**Run 2, one card, one session** (session e8cddcb1, 14 Nov from 01:26 UTC; old plan, plan3 and HIP interleaved, 1 warmup
221plus 5 timed runs each, then two plan2 runs and a plan3 altered-weights control; all 20 non-control runs printed the
222published 256 ids, the control differed at index 0):
223
224| Arm | Runs | Decode, ms per token | Behind HIP, ms |
225|---|---|---|---|
226| plan (published launcher `08a50491`) | 5 | 26.641 | |
227| plan2 | 2 | 24.8975 | 0.1566 |
228| plan3 | 5 | 24.891 | 0.1501 |
229| HIP graph replay, same kernels | 5 | 24.741 | |
230
231plan3 is 1.75 ms per token faster than plan in this session (6.6 percent, 40.18 tokens per second), which repeats the
232run 1 result. plan3 against plan2 is 0.0065 ms, from 5 against 2 runs, far inside the drift described next, so this run
233shows no effect of the plan3 change and cannot rule one out.
234
235**Drift is as large as the remaining gap** (found by Main's independent recomputation, `MAIN-VERIFY.md`; numbers
236recomputed here). The unchanged published launcher measured 26.490 ms in run 1 and 26.641 ms in run 2, 0.151 ms apart.
237Within run 2 its five timed runs rose in every step, 26.602, 26.626, 26.641, 26.653, 26.658 (0.056 ms first to last),
238after a warmup of 26.489; HIP rose over the same interleaved period (24.704 to 24.747). The gap to HIP read 0.090 ms in
239run 1 and 0.150 ms in run 2, the same size as that drift. So runs 1 and 2 could not establish whether Omega still trails
240HIP at all: that needs interleaved, paired arms (each Omega run next to a HIP run, the difference taken per pair) and more
241than five repeats. Run 3 below is designed that way. The 1.7 ms launcher gain is many times the drift and repeats in every
242session.
243
244**A launcher hang (section 13).** In the 4-bit rerun, 2 of 175 single-kernel launches of the published launcher never
245finished and spun until killed. Why their completion never arrived is not established. Commit
246`d957526e` adds the card's queue pointers and the signal value to the 10 s slow-wait alarm (CPU gate PASS); it ran on
247the card in run 3 as launcher `a6aee5ef`, where no wait reached 10 s, so the new alarm rows have not yet fired. The next
248occurrence will show whether the card consumed the packet. None of the 71 plan processes behind this section and section
2495's earlier sessions hung or raised the alarm, nor did any of the 22 in the combined session (each launch there also ran
250under a 150 s timeout) or the 67 in run 3 (64 of them with `a6aee5ef`).
251A hung launch prints no timing, so no number here is affected.
252
253**The launcher fix in the combined session.** With the same v1 kernels and full plan, arm B (plan3) took 25.425 ms per
254token against 27.164 for the published launcher (arm A): 1.739 ms, 6.4 percent, the same size as in runs 1 and 2. That
255session had no HIP arm.
256
257**Run 3, paired against HIP (MEASURED, session 7f66e322, 14 Nov from 02:23 UTC).** New launcher `a6aee5ef` (commit
258`d957526e`), published launcher `08a50491`, both hash-checked on the card; the card-emitted plan is the published
259`2a292dad`. The tarballs' sha256 equal the card-side values and every file in the run's checksum list matches. The run
260log's start stamps show nine strictly interleaved cycles, each plan3, then plan3c (the same with a cached ring), then HIP
261graph replay of the same 18 kernels, after one warmup of each. The published launcher ran three times after the nine
262cycles, so it is not interleaved with them.
263
264| Decode, ms per token | c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8 | c9 | Median |
265|---|---|---|---|---|---|---|---|---|---|---|
266| plan3 | 25.153 | 25.155 | 25.147 | 25.148 | 25.243 | 25.289 | 25.312 | 25.303 | 25.222 | 25.222 |
267| plan3c | 25.148 | 25.152 | 25.172 | 25.159 | 25.212 | 25.201 | 25.29 | 25.315 | 25.247 | 25.201 |
268| HIP `decode_ms` | 25.048 | 25.078 | 25.07 | 25.17 | 25.147 | 25.135 | 25.169 | 25.153 | 25.181 | 25.147 |
269| HIP `forward_wall_ms` | 25.202 | 25.278 | 25.226 | 25.373 | 25.345 | 25.29 | 25.325 | 25.363 | 25.381 | |
270| Like for like: (plan3 + 0.00051) minus (HIP + 0.0158) | 0.09 | 0.062 | 0.061 | -0.037 | 0.08 | 0.139 | 0.127 | 0.134 | 0.026 | 0.08 |
271
272*Which clock is fair.* Like for like here means "the next token id is in host memory": Omega's step time plus its own
273token read (0.00051 ms, from the plan3t phase timer), against HIP's `decode_ms` plus HIP's 4-byte token readback (0.0158
274ms, median of 15.0 to 17.4 us measured in the micro-benchmark below, not inside these model runs). The table uses these
275unrounded medians. HIP's `forward_wall_ms`
276is not that clock: around the same call it also times a blocking copy of all 248,320 logits (about 0.99 MB) to the host,
277the token readback and the Python call (`driver-real2.py` line 210). It runs 0.198 ms above `decode_ms` (median; 0.154
278to 0.209). Omega never copies the logits, and a program that only generates tokens has no need to, so charging HIP for
279that copy would make Omega look faster than it is: against `forward_wall_ms` plan3 is ahead in all 9 cycles (plan3 minus
280wall, median -0.079 ms), and that comparison is not used here. Raw `decode_ms` without either readback gives plan3 minus HIP of 0.096
281ms (median; -0.022 to 0.154).
282
283*Result.* Like for like, plan3 trails HIP by a paired median of 0.08 ms per token (0.3 percent), ranging from -0.037 to
2840.139 over the 9 cycles, behind in 8 of 9. The gap is not closed. Within the session plan3 drifted by 0.165 ms between
285cycles and HIP by 0.133 ms, which is why only the paired differences are used. plan3c against plan3 is -0.003 ms (median;
286-0.088 to 0.025), so the cached ring has no effect. The published launcher read 27.051 ms after the cycles, 1.829 ms
287above plan3, the same size of gain as in the earlier sessions (not interleaved here).
288
289**Run 3 micro-benchmark: the launch path itself (MEASURED, same session).** Each step is N dispatches of the model's own
290`step_advance` kernel with its real arguments and no weight traffic, 100 steps per process, nine interleaved cycles of
291plan3, plan3c and HIP.
292
293| us per step, median over 9 cycles | N = 1 | N = 1,126 | Per dispatch, (N=1,126 minus N=1) / 1,125 |
294|---|---|---|---|
295| Omega plan3 | 7 | 1743 | 1.543 |
296| Omega plan3c | 7 | 1744 | 1.543 |
297| HIP graph replay | 20.0 | 1744.3 | 1.533 |
298| Paired plan3 minus HIP, median (range) | -12.8 (-16.0 to -11.8) | -10.2 (-23.6 to 3.4) | 0.0025 (-0.0067 to 0.0139) |
299
300So the cost of launching 1,126 back-to-back dispatches is the same on both runtimes, 1.743 ms per token under Omega and
3011.744 ms under HIP, and Omega's fixed per-step part is about 13 us shorter. This holds for a trivial kernel; it is the
302launch path, not the model's kernels.
303
304**What is established, and what is not.** Established: Omega's dispatch, doorbell, completion detection and token read
305are not slower than HIP's; the cached ring makes no difference; with the fair clock, plan3 still trails HIP by about
3060.08 ms per token in 8 of 9 paired cycles. Not established: where that 0.08 ms goes. By elimination it is inside kernel
307execution, the same 18 kernels running slightly slower under Omega's memory setup [INFERENCE: not measured directly].
308The lane names two differences in that setup: one large VRAM region with buffers at 4 KiB offsets against PyTorch's
309per-tensor allocations, and the token cell in host-coherent memory against VRAM. Run 4 (2 MiB buffer placement and the
310token cell in VRAM, interleaved against HIP the same way) is prepared. That its modes are built is quoted from
311`amd-launch-gap/RESULT.md`, a lane note not in this folder; the card script runs them with launcher `657db853`, whose
312Spark gate covers the existing checks only (section 1). To be done when equipment is available.
313
314**Node selection (CPU-gated, not run on a card).** At commit `94af5a38` the launcher opens only the KFD topology
315node named by `OMEGA_KFD_NODE=N` and refuses to start when the variable is unset or malformed; `omega-launch discover`
316prints the node once and opens no device. Spark gate: 318 checks, 0 failures
317(`amd-launch-gap/build-r16-spark-gate-94af5a38.log`, launcher `8b6005e8`).
318
319## 5. Kernels
320
321State: COMPLETE. The combined run (launcher fix and all new kernels, three interleaved runs per arm) is the result; the
322earlier one-run ladder is kept as history.
323
324**Floor (MODELED).** One decode step reads 26.92 GB of weights and block scales (`amd-kernel-speed/model/classes.tsv`).
325At 5.3 TB/s that is 5.08 ms per token: a modelled lower bound for an implementation that reads every weight byte once per token.
326With the delta-net state and key/value reads at 286 positions it is 5.14 ms. Only changes that alter arithmetic (a
327smaller output head, fewer weight bits) go below it, and those change output.
328
329**Per-kernel ranking** (MEASURED, session e787e65d). Method: N extra copies of one kernel are inserted into the real
330plan; the time per dispatch is the median step-time increase against three base runs, divided by N. Ordered by time per
331step:
332
333| Kernel class | Dispatches per step | us per dispatch | ms per step | Percent of 5.3 TB/s (weights) |
334|---|---|---|---|---|
335| FP8 matrix-vector 17408x5120 (MLP gate and up) | 128 | 49.62 | 6.352 | 33.9 |
336| FP8 matrix-vector 5120x17408 (MLP down) | 64 | 65.93 | 4.22 | 25.5 |
337| gated delta-net state update (v1) | 48 | 63.86 | 3.065 | n/a |
338| FP8 matrix-vector 5120x6144 (delta-net out, attention o) | 64 | 24.45 | 1.565 | 24.3 |
339| FP8 matrix-vector 10240x5120 (delta-net qkv) | 48 | 31.03 | 1.49 | 31.9 |
340| RMSNorm 5120 (v1) | 129 | 10.22 | 1.319 | n/a |
341| FP8 matrix-vector 6144x5120 (delta-net z) | 48 | 22.85 | 1.097 | 26.0 |
342| attention partial, 131,072-position grid | 16 | 55.54 | 0.889 | n/a |
343| BF16 output head 248320x5120 | 1 | 798.83 | 0.799 | 60.1 |
344| FP8 matrix-vector 12288x5120 (attention q) | 16 | 36.04 | 0.577 | 32.9 |
345| BF16 matrix-vector 48x5120 | 96 | 5.64 | 0.541 | 1.6 |
346| all other classes (residual, SiLU, small delta-net, attention, argmax, embedding) | | | 0.397 or less each | |
347| empty dispatch, 1 workgroup (control) | | 2.87 | | |
348
349The classes sum to 23.612 ms against a 64-token base step of 26.973 ms; the rest (3.36 ms) is not attributed by this
350method. Inserted copies run after the dependent kernel, with warmer caches, so these are lower bounds for the
351in-place cost.
352
353**What changed** (CPU-gated, seeded Omega objects, byte-checked against an LLVM 18 build of the same assembly):
354
355- `rmsnorm5120` v2: 40 serial load round trips per wave become 2 waits plus a bounding wait. Gate: 7 cases, 3 mutants
356 caught.
357- `gdnstate_step` v2: 256 serial round trips per wave become 8-row chunks with the next chunk in flight. Gate PASS on 5
358 cases (both state banks, zeros, a wide range with signed zeros and subnormals, NaN and infinities), relaxed-wait and
359 removed-wait mutants caught.
360- `cap286`: the plan is emitted for the 286 positions this request uses instead of 131,072, so the attention partial
361 grid shrinks. This is a serving-envelope change: output-identical for this request, not a general replacement.
362
363**Measured ladder** (session e787e65d, ONE run per candidate, each printed the published 256 ids). Each row is a single
364run until the combined run lands with repeats. The two runs of the unchanged plan in this session (full-a and full-b) differ
365by 0.15 ms, so differences between rows smaller than that are not resolved:
366
367| Version | Decode, ms per token (MEASURED) | TB/s (estimate: modelled bytes / measured time) | Percent of 5.3 TB/s (estimate) |
368|---|---|---|---|
369| v0, full plan, first run (full-a) | 27.007 | 0.997 | 18.8 |
370| v0, full plan, second run (full-b) | 27.157 | 0.991 | 18.7 |
371| cap286 only | 26.723 | 1.007 | 19.0 |
372| RMSNorm v2 only | 25.614 | 1.051 | 19.8 |
373| state update v2 only | 22.845 | 1.178 | 22.2 |
374| cap286 with both v2 kernels (v1all) | 20.968 | 1.284 | 24.2 |
375
376The ladder gives 1.288 times against full-a and 1.295 against full-b in the same session. The lane's additive estimate for the two kernels without
377cap286 was 21.45 ms (MODELED); that combination has not run alone. 20.968 ms is still 4.13 times the floor.
378
379**Next by measured gap.** The FP8 matrix-vector kernels run at 24 to 34 percent of bandwidth in place and take most of the
380step; the lane's reading of the code is that each wave reloads the activation chunk for every output row (four times the
381weight traffic from cache). Dispatch count (1,126 per step, an empty dispatch costs 2.87 us) is next. Section 6 adds that
382the whole step is about twice the isolated time of its matrix kernels, so both matter.
383
384**Combined run (MEASURED, session 6e585e21, 14 Nov from 02:05 UTC).** Seven arms, each a single 256-token run in turn,
385three rounds (`amd-kernel-speed/combined/card-2026-11-14T0206Z/`, script `card-combined.sh`, the same bytes as the
386one prepared earlier). Objects by sha256: published launcher `08a50491`, plan3 launcher `de67f27e`, `rmsnorm5120` v2
387`7d63972f`, `gdnstate_step` v2 `c689890d`, FP8 matrix-vector v2b1 `00686ea5` and v2b2 `21f4265d`. The card emitted the
388full plan with the published sha256 (`2a292dad`) and the 286-position plan from the same script. The tarball's sha256
389equals the value the card computed, and every file in its own checksum list matches.
390
391| Arm | Launcher and objects | Plan | Run medians, ms per token | Median | Spread | TB/s (estimate: modelled bytes / measured time) | Percent of 5.3 TB/s (estimate) |
392|---|---|---|---|---|---|---|---|
393| A | published, v1 | full | 27.211, 27.164, 27.149 | 27.164 | 0.062 | 0.991 | 18.7 |
394| B | plan3, v1 | full | 25.498, 25.425, 25.349 | 25.425 | 0.149 | 1.059 | 20.0 |
395| C | plan3, RMSNorm v2, state v2 | full | 19.619, 19.623, 19.611 | 19.619 | 0.012 | 1.372 | 25.9 |
396| D1 | C plus FP8 v2b1 | full | 17.056, 17.124, 17.127 | 17.124 | 0.071 | 1.572 | 29.7 |
397| D2 | C plus FP8 v2b2 | full | 16.527, 16.517, 16.519 | 16.519 | 0.01 | 1.63 | 30.7 |
398| E1 | D1 | 286 positions | 16.712, 16.797, 16.721 | 16.721 | 0.085 | 1.61 | 30.4 |
399| E2 | D2 | 286 positions | 16.226, 16.151, 16.237 | 16.226 | 0.086 | 1.659 | 31.3 |
400
401All 21 timed runs printed the 256 published ids (checked here against the published run, not only against each other);
402the altered-weights control, plan3 with all v2 objects, differed at index 0.
403
404Steps, each within this session: launcher 1.739 ms; the RMSNorm and state rewrites 5.806 ms (B to C); FP8 v2b1 2.495 ms
405and v2b2 3.1 ms (C to D1, D2); the 286-position plan 0.403 ms on v2b1 and 0.293 ms on v2b2. Every per-arm spread is at
406most 0.149 ms, so each of these steps is resolved; v2b2 is faster than v2b1 by 0.605 ms on the full plan. Overall A to E2
407is 10.938 ms, 1.674 times; A to D2, without the request-specific plan, 1.644 times. E2 is 3.19 times the 5.08 ms floor.
408
409**The FP8 candidates** were written by lane GpuBenchSync and taken over by AmdKernelSpeed. By the lane's write-up
410(`amd-kernel-speed/RESULT.md`), v2b1 "adds a fast FP8 decode when no byte in a chunk is ±0, 0x7f or 0xff" (the special
411values), and v2b2 "also issues two chunks of loads before one wait". CPU gates, rerun by AmdKernelSpeed on the Spark and
412checked here from the logs (`amd-kernel-speed/takeover-gpubenchsync/`): `FP8GEMV-B128F-V2-GATE PASS` with 39 cases for
413each, 5 of 5 mutants caught for v2b1 and 10 of 10 for v2b2, each log naming the object the card ran; and the repository's
414exact-rounding check on real checkpoint rows, 27 cases and 8 controls, PASS for both. One limit, stated by the lane: no
415wait checker that is sound for loops exists. The linear wait checker refuses both tables because of their loops and
416branches, and finds no other error, but that is not a proof; the CPU executor completes loads at once and cannot see a
417missing wait. So the wait counts of these two kernels are covered only by the card, where every run with them printed
418the published ids (6 runs each: arms D1 and E1 for v2b1, D2 and E2 for v2b2).
419
420## 6. 4-bit weights
421
422State: kernels COMPLETE on the card (rerun, session c715b669): both 4-bit kernels bit-exact on all 10 shapes, two of 30
423timings missing because two launches hung (section 13). Quality against the frozen bar: IN PROGRESS on the CPU,
424result not in this report, so 4-bit is neither accepted nor rejected (section 1). Whole-model 4-bit decode on the card:
425to be done when equipment is available.
426
427**Format, Q4D8-1.** Symmetric signed int4 weights with one BF16 scale per group of at most 128 weights (32 for the
428delta-net input projections); the activation becomes a 16-bit per-token fixed-point vector split into four signed base-16
429digits, so the inner product is `V_DOT8C_I32_I4` (eight int4 products per instruction). gfx942 has no FP4 decode, which is
430why an integer path. Container: 66 shards, 17.61 GB against 30.87 GB for the FP8 source, ratio 0.570.
431
432**Bytes and floor (MODELED).** Candidate A (every FP8 linear in 4 bits, output head BF16) reads 15.54 GB per token, 0.577
433of FP8, a floor of 2.93 ms at 5.3 TB/s. These are not output-identical to FP8: they need the quality bar.
434
435**Kernels.** `q4gemv_d8` (one row per wave) and `q4gemv_d8r2` (two rows per wave), written as gfx942 code objects by
436Omega's writer. CPU gate: 38 cases PASS, 7 of 7 mutants caught. The seeded gfx942 executor gained `V_DOT8C_I32_I4` and
437`V_CVT_F32_I32` for this (local branch `fourbit/q4gemv`).
438
439**Card (MEASURED, session c715b669, 14 Nov 01:46 to 01:59 UTC).** Each shape is tiled to at least 600 MB of 4-bit
440weights per dispatch, more than the card's 256 MB Infinity Cache, and the FP8 baseline is tiled by the same count. Time
441per dispatch is (median of three runs at 50 repeats minus median of three at 1 repeat) / 49, host clock, through the
442published Omega launcher (no HIP in the path). The card converted its own copy of the three source shards it used and got
443the same sha256 as the Spark container (3 of 3). The tarball's sha256 equals the value the card printed.
444
445| Shape | q4gemv_d8, TB/s | q4gemv_d8r2, TB/s | v1 FP8 kernel on the same tensor, TB/s | Output words bit-equal to the oracle |
446|---|---|---|---|---|
447| delta-net qkv 10240x5120 | 2.72 | 3.06 | 2.12 | 204800 of 204800, both kernels |
448| delta-net z 6144x5120 | 2.85 | 3.1 | 2.12 | 208896 of 208896, both |
449| delta-net out 5120x6144 | hung, killed | 3.18 | 2.14 | 189440 of 189440, q4gemv_d8r2 (q4gemv_d8: in session f591aa44) |
450| MLP gate 17408x5120 | 2.67 | 3.05 | hung, killed | 226304 of 226304, both |
451| MLP up 17408x5120 | 2.68 | 2.98 | 2.15 | 226304 of 226304, both |
452| MLP down 5120x17408 | 2.79 | 3.16 | 2.09 | 66560 of 66560, both |
453| attention q 12288x5120 | 2.68 | 3.07 | 2.14 | 233472 of 233472, both |
454| attention k 1024x5120 | 2.67 | 3.04 | 2.13 | 223232 of 223232, both |
455| attention o 5120x6144 | 2.83 | 3.08 | 2.13 | 189440 of 189440, both |
456| output head 248320x5120 | 2.67 | 3.02 | BF16 kernel 3.29 | 248320 of 248320, both |
457
458In the rerun 19 kernel and shape results ran and all 19 are bit-exact; the one `q4gemv_d8` result missing there (delta-net
459out) was bit-exact in the earlier session f591aa44, so each of the 10 shapes has a bit-exact result for both kernels.
460Ranges: `q4gemv_d8r2` 2.98 to 3.18 TB/s (56.3 to 60.0 percent of 5.3 TB/s, 10 shapes), `q4gemv_d8` 2.67 to 2.85 (50.4 to
46153.7 percent, 9 shapes), the v1 FP8 kernel 2.09 to 2.15 (39.5 to 40.6 percent, 8 shapes). The earlier session had read
4622.79 to 2.87 and 3.08 to 3.28 on its five shapes; on the 9 kernel and shape pairs timed in both sessions the rerun read
463-1.3 to 8.6 percent lower (median 0.1 percent), a session-to-session difference on the same kernels. The rerun is the
464record.
465
466**Per-token sums (MODELED from MEASURED per-tensor times).** Adding the isolated per-tensor times of every FP8 linear and the head,
467weighted by how many times each runs per token:
468
469| Linears and output head | ms per token (MODELED) |
470|---|---|
471| v1 FP8 kernel, BF16 head | 12.2 |
472| `q4gemv_d8r2` linears, BF16 head | 4.99 |
473| `q4gemv_d8r2` linears, 4-bit head | 4.44 |
474
475The 4-bit sum is 2.75 times smaller than the v1 FP8 one. Against its own floor, 2.93 ms per token for candidate A's bytes
476(which keep the head in BF16) at 5.3 TB/s, the 4-bit sum with the same BF16 head is 1.70 times; that it is below the 5.08 ms FP8 bound only reflects reading fewer bytes. v2b2, the fastest
477FP8 kernel in section 5, was not timed by this method, so the 2.75 ratio is against the older kernel. These sums leave out the
478launch gaps between dispatches and every kernel that is not a matrix product (delta-net state update, attention, norms,
479residual, SiLU, argmax), and assume back-to-back dispatches behave like the tiled measurement. Two inputs are filled, not
480measured: the FP8 time of MLP gate uses MLP up's (same shape; its own launch hung), and the value projection uses the key
481projection's (same shape, not run). They are not a decode time; no 4-bit model step has run.
482
483**Finding: the whole step is about twice its matrix kernels.** Against the isolated FP8 sum of 12.2 ms, the measured
484whole decode step of section 5 is 2.21 times larger for the full plan (27.007 ms) and 1.72 times for v1all (20.968 ms).
485Inside the plan, the inserted-copy method of section 5 puts the same FP8 matrix-vector classes and the BF16 head at
48616.36 ms per step, so the matrix kernels themselves run slower in the plan than isolated, and the rest of the step is the
487non-matrix kernels, launch and host time. The isolated sums and the plan measurements come from different sessions and
488methods, so this is a ratio of estimates, not a decomposition of one step. It means that faster weight kernels alone,
4894-bit or not, cannot bring the step near its floor: the non-matrix kernels and the gaps between dispatches must shrink too.
490
491**Quality, IN PROGRESS (CPU; result not in this report).** The bar was frozen before any 4-bit result existed (sha256 `3ac61cf9...`): perplexity ratio at most
4921.03 on WikiText-2, top-1 agreement with FP8 at least 94 percent over 2,326 positions and 95 percent on the generated
493positions, mean KL at most 0.05 nats, ARC-100 loss at most 3 items. The CPU arms `fp8` and `q4` had not finished on
494the Spark when this report was written. If `q4` fails, candidate B keeps the delta-net input projections in FP8.
495
496## 7. Several tokens per pass
497
498State: the cost of extra rows MEASURED for the FP8 kernel on the card; the speculative step on the card to be done when
499equipment is available. Design, CPU gates and acceptance measurement, varied prompts included, COMPLETE.
500
501**Idea.** The checkpoint ships a one-layer multi-token-prediction head. Each pass feeds the last token and k drafts
502through the 64 layers together, keeps the longest prefix of drafts equal to the model's own greedy choice, and emits
503those plus one more. Output equals plain greedy by construction: every row's arithmetic is bit-identical to the one-row
504kernels.
505
506**Acceptance (MEASURED on a CPU float32 reference, lighthouse request, published AMD ids):**
507
508| Drafter | k = 1 | k = 2 | k = 3 | best |
509|---|---|---|---|---|
510| model's head, full BF16 output | 1.718 | 2.151 | 2.37 | 2.462 |
511| model's head, 32,768-id shortlist | 1.62 | 2.016 | 2.169 | 2.246 |
512
513Tokens per pass. Acceptance stops growing after about three drafts. On six varied prompts (code, a word problem, a list
514of facts, a translation, a short story, JSON; 96 tokens each, free-run on the same CPU reference) the head gives 1.71
515to 1.96 tokens per pass at k = 1 (MEASURED, `spec-decode/acceptance/accept-mtp-freerun.json`).
516
517**Gated on the CPU (seeded Omega and the seeded gfx942 executor, hardware NOT_RUN):** the pass decision (304,470 cases,
5185 of 5 mutants caught; `spec-decode/om/gate-spec-results.json`); a three-state model proving speculative output equals
519greedy for k = 1 to 8 (576 runs, 8 of 8 mutants caught; `spec-decode/om/gate-loop-results.json`); R-row FP8 and BF16
520matrix-vector kernels that load weights once and match the one-row kernels bit for bit (`s2-run6`); ring-buffered
521convolution and state kernels (`s2b-conv-run3`, `s2b-run4`); batched map kernels (`s2c-run2`, `s2d-run2`); an on-card
522accept kernel (`s3a-run1`). Each named run is a `report.json` with verdict PASS under `spec-decode/kernels/`.
523
524**What it would give (MODELED).** With today's kernels the per-row work that is not a matrix-vector product is 5.33 ms
525per row after the batching built, 3.1 ms of it the state update. The lane's model puts the best case at 18.3 ms per token
526(extra rows free in the matrix-vector kernels) and 22.8 ms if each extra row costs 30 percent more there, against its
52726.309 ms anchor. The cost of extra rows on the card is the first measurement needed. A run in session 3a2e29e5 measured
528the FP8 kernel (MEASURED, R-row variant of `fp8gemv_b128f` on an 81920x5120 matrix built by the timing script, not
529checkpoint weights, median per dispatch of five trials, host clock; rho is the extra time per added row as a fraction of the one-row time, `(t_R / t_1 - 1) / (R - 1)`):
530
531| Rows R | us per dispatch | rho | Each row's output against the one-row kernel |
532|---|---|---|---|
533| 1 | 198.592 | | |
534| 2 | 260.8 | 0.3132 | bit-identical |
535| 3 | 345.157 | 0.369 | bit-identical |
536| 8 | 739.862 | 0.3894 | bit-identical |
537
538The BF16 output head ran at R = 1 only (798.018 us); its R > 1 rows and the whole speculative step (S4) are NOT_RUN. With
539this measured rho applied to every matrix-vector kernel, the lane's model (MODELED, `spec-decode/model/wolfram.md` Q10 and
540Q11) gives 22.922 ms per token at k = 1 against its 26.309 ms anchor, 1.148 times faster, and 25.472 ms at k = 2: more
541drafts cost more than they gain, because each extra row repeats the per-row work that is not a matrix-vector product.
542Over the six varied prompts the same model gives 1.14 to 1.31 times faster at k = 1 (MODELED, Q12; the essay slowest,
543code fastest).
544These are unreviewed measurements from one session, and the model's anchor is the v1 kernels, not the faster combined
545arms of section 5. Since this section was first written the lane has built and CPU-gated: on local branch
546`spec-decode2` (unreviewed), the multi-token host loop in the launcher (312 checks, 0 failures at commit `f859c88f`;
547`raw/amd-report/extracted/spark-logs-20261114/hostloop-gate-final-20261114T022658Z.log`); and, in gate reports that name
548no branch, the per-row position and
549draft hand-over kernels (`spec-decode/kernels/s3c-pos-run1`, `s3c-select-run1`) and a whole-pass gate in which the
550emitted R = 2, R = 3 and head-drafter plans give the plain plan's ids on two prompts with all 8 required wiring mutants
551caught, 48 rows of which 47 pass (`spec-decode/s3c/run3/report.json` and `run3.log`). One further, non-required mutant
552(accept-after-mismatch in `spec_accept_r3`) is not caught by this whole-pass gate on either prompt: `run3.log` line 105
553labels it "caught" in error, with `caught_by` false for both prompts. The accept kernel's own gate catches it (76 of 400
554cases fail, `spec-decode/kernels/s3a-run1/report.json`). The R-row plan emitter (it reproduces the published plan
555byte for byte at R = 1) is quoted from `spec-decode/RESULT.md`, a lane note not in this folder. Drafts 2 to k from the
556head are not built.
557
558## 8. Eight cards
559
560State: design only. Hardware NOT_RUN by the author's decision of 14 November: the AMD effort is one MI300X, as fast as it can
561go, and no money is spent on a multi-card machine.
562
563What exists: a design that splits each layer across 2, 4 or 8 cards by output rows ("exact" mode, bit-identical to one
564card) or by the Megatron column-then-row split ("fast" mode, changes summation order); a KFD topology scan, peer-memory
565mapping and exchange protocol in seeded Omega; and a host gate, `MCGATE PASS cases=203`, on Linux AArch64 and on x86-64
566under QEMU (emulated, not native). Nothing has opened a real multi-card `/dev/kfd`. The model puts the 8-bit weight
567floor on 8 cards at 0.639 ms per token before exchange costs. The lane's own model also says that once per-card kernels
568reach 80 percent of peak bandwidth, a host-mediated exchange at the measured 29 us round trip makes 2, 4 or 8 cards
569slower than one in exact mode. This section stays as design. Files: `multi-card/DESIGN.md` and its Wolfram queries
570`multi-card/model/WOLFRAM.md`, whose line 7 points to `ACCESS.md`, a lane note not in this folder; the 5.3 TB/s cited
571there is AMD's figure, as quoted in `BRIEF.md` line 75.
572
573## 9. Correctness
574
575State: COMPLETE for every run in this report.
576
577- **Same 256 ids.** Every timed run in sections 3, 4 and 5 printed exactly the 256 token ids of the published run (the
578 recompute scripts compare all 256 for every run: 5 published, 5 repeat, all 24 non-control runs of launcher run 1 and
579 all 20 of run 2 including warmups, every 256-token kernel candidate, all 21 timed runs of the combined session, and all
580 34 non-control model runs of launcher run 3 including warmups) and the 64-token kernel-timing runs printed the first 64
581 of them.
582- **Altered-weights controls.** A plan with deliberately altered weights differs from the published ids at index 0: in
583 the repeat session, for the old and the new launcher in launcher run 1, for plan3 in runs 2 and 3, in the kernel
584 session, and for plan3 with all v2 objects in the combined session. So an identical-id result is not something any plan
585 would produce.
586- **HIP replay.** In the repeat session and in launcher runs 1 to 3 the same kernels replayed by AMD's HIP runtime gave
587 the same 256 ids. That checks
588 the launcher, not the model arithmetic.
589- **CPU gates.** Launcher: 308 checks PASS at commit `d957526e` (`amd-launch-gap/build-r14-spark-gate.log`). Kernels: the v2 RMSNorm and state gates PASS with mutants
590 caught; FP8 v2b1 and v2b2: 39 cases PASS each, 5 and 10 mutants caught, wait counts not checkable on the CPU (section 5);
591 4-bit: 38 cases PASS, 7 of 7 mutants caught; several tokens per pass: the gates in section 7; eight cards:
592 203 cases PASS.
593- **4-bit kernels on the card.** Every output word of both 4-bit kernels equals the exact oracle on all 10 shapes, and a
594 repeated launch gives the same output (section 6).
595- **Not claimed.** Agreement with a different implementation or machine. On the same card, same checkpoint and same
596 session, Omega's ids and PyTorch's are equal for the first 29 generated tokens and differ from index 29, a near tie
597 (top two 0.125 apart on the PyTorch side). The published brief records that the AMD and Spark outputs first differ at
598 generated index 109, also a near tie. These are read as rounding differences between implementations; that is not
599 proven.
600
601## 10. What this does not show
602
603- **A combined speed beyond three runs in one session.** The headline is three interleaved runs per arm on one card in one
604 session. The FP8 v2b kernels' wait counts have no sound CPU check; only the card runs cover them.
605- **Why Omega still trails HIP by 0.08 ms per token.** Paired run 3 shows the gap and rules out the launch path; the
606 cause inside kernel execution is an inference by elimination; run 4, which would test it, is to be done when
607 equipment is available.
608- **Serving.** One request at a time, one card, a command-line program. No batching, no HTTP server.
609- **A tuned AMD baseline.** No vLLM or SGLang ran on the card; the HIP row runs Omega's own kernels.
610- **Long contexts.** The request is 30 prompt tokens and 256 generated. `cap286` is sized for this request.
611- **4-bit quality and speed.** Quality is IN PROGRESS on the CPU and not in this report; no 4-bit model output exists. The 4.44 ms per token is a sum of
612 isolated kernel times, not a decode measurement.
613- **Exclusive hardware.** The card is a virtual function on a shared host. Timing noise between sessions is visible
614 (section 1).
615- **Bandwidth measured by counters.** Percentages are modelled bytes over measured time.
616- **Review.** None of the branches behind sections 4 to 8 has had its final review; the author ordered one review at the
617 end. Three end reviews were made of earlier versions of this report (section 14).
618 Nothing is landed.
619
620## 11. How to repeat
621
622- **Where to run the card steps.** On a machine you control, or on a shared host only with the host operator's
623 agreement. The launcher that opens only the node it is given (section 4, node selection; `8b6005e8`, commit
624 `94af5a38`) is CPU-gated only and has never run on a card. Every card run whose logs record a launcher hash used one
625 of the launchers in the table below or, in the two earlier qualification sessions, the launchers named in section 12.
626- **Check the numbers (no GPU).** In this folder: `sh recompute/run-all.sh --verify-sums`. It recomputes the
627 MEASURED, DERIVED and COUNT values from the raw logs under `raw/`, rebuilds `numbers.json` and the session tables,
628 runs the checks described in section 2 and their self-test, builds a second time to prove the output does not change,
629 and then requires `SHA256SUMS` to verify. It exits 0 only if all of that passes. Python 3 standard library only; it
630 leaves every file in `SHA256SUMS` byte-identical.
631- **The published run.** The brief's three levels at CUDApp `dc536882` (Level 1 rechecks the published evidence, Level 2
632 rebuilds the launcher and 18 kernels byte for byte on arm64 Linux, Level 3 runs on an MI300X).
633- **Launcher modes.** On the `amd-launch-gap` branch, build as Level 2 does, then run the plan's command file with
634 `omega-launch plan2` (or `plan3`) in place of `omega-launch plan`. The card scripts that ran are under
635 `raw/amd-launch-gap/card/final/` (`gap-run.sh`, `cmd-*.sh`, `gap-verdict.py`).
636- **Kernel ladder and combined run.** `raw/amd-kernel-speed/card/261114001549-e787e65d/out/card-measure.sh` and that `out/` hold
637 the one-run ladder; `raw/amd-kernel-speed/combined/card-2026-11-14T0206Z/out/` holds the combined run's script
638 (`card-combined.sh`), object hashes, plans' emission log and per-run logs.
639- **Branches.** Local only today (not landed): CUDApp `amd-launch-gap` (latest commit with a gate log in this folder
640 `94af5a38`), the kernel lane's v2 objects, `fourbit/q4gemv`, `spec-decode` `48d68c6d` and `spec-decode2` `f859c88f`.
641 Whether this report and they are published, and when, is the author's decision.
642
643Each x86 launcher (sha256 prefix), the commit it was built from and the card runs that used it:
644
645| Launcher | Commit | Where this folder ties them | Card runs that used it |
646|---|---|---|---|
647| `08a50491` | CUDApp `dc536882` (published) | `amd-launch-gap/src/CUDApp-base/evidence/` | published run 76e03a28; repeat 46d1b9c5; the plan arm of runs 1 to 3; arm A of the combined run 6e585e21; kernel sessions 7605956f and e787e65d; 4-bit rerun c715b669; extra-row session 3a2e29e5 |
648| `78e09581` | not recorded in this folder | `amd-launch-gap/card/final/logs/gap-run.sh` line 14, `run.log` line 204 | run 1, 52ef268c (plan2, planscope, planstage) |
649| `de67f27e` | `9076c537`, squashed as `139bb6a9` | `amd-kernel-speed/combined/card-2026-11-14T0206Z/README.md` lines 7 to 8 | run 2, e8cddcb1 (plan2, plan3); arms B to E2 of the combined run 6e585e21 |
650| `a6aee5ef` | `d957526e` | `amd-launch-gap/HANG-20261114.md` line 20; `amd-launch-gap/build-r14-spark-gate.log` line 317 | run 3, 7f66e322 (plan3, plan3c, plan3t) |
651| `657db853` | not recorded in this folder | `amd-launch-gap/build-r15-spark-gate.log` line 317; `amd-launch-gap/card/bundle4/gap-run4.sh` line 11 | none: run 4 is prepared |
652| `8b6005e8` | `94af5a38` | `amd-launch-gap/build-r16-spark-gate-94af5a38.log` (file name, line 327) | none: node selection, CPU gate only |
653
654## 12. Card sessions
655
656Every MI300X session behind this report. The UTC start is encoded in the session name. Hashes are of the evidence file
657as kept; where a lane recorded the card-side hash of a tarball, the two are equal.
658
659<!-- sessions:begin (generated by recompute/render_sessions.py) -->
660| Session | UTC start | Lane | What ran | State |
661|---|---|---|---|---|
662| bb2a389c | 2026-11-13T07:22:40Z | earlier qualification (Main) | launcher 373e76cd, warmup + 5 lighthouse runs | COMPLETE |
663| 5a0c78a1 | 2026-11-13T08:00:38Z | earlier qualification (Main) | launcher f646ea5d, warmup + 5 lighthouse runs | COMPLETE |
664| 76e03a28 | 2026-11-13T10:10:13Z | published run (Main) | launcher 08a50491, warmup + 5 lighthouse runs, controls | COMPLETE |
665| 46d1b9c5 | 2026-11-13T18:50:25Z | UXL brief repeat (Main) | public-clone repeat, HIP graph, PyTorch FP8, stock BF16, control | COMPLETE |
666| 7605956f | 2026-11-13T23:27:37Z | GpuBenchSync | per-kernel timing, first build of the cells | COMPLETE |
667| e787e65d | 2026-11-14T00:15:49Z | AmdKernelSpeed | per-kernel timing, v2 kernels, cap286, v1all ladder | COMPLETE |
668| 52ef268c | 2026-11-14T00:50:45Z | AmdLaunchGap | run 1: plan, plan2, planscope, planstage, HIP graph, controls | COMPLETE |
669| f591aa44 | 2026-11-14T01:18:36Z | FourBit | q4gemv_d8 and q4gemv_d8r2 bit checks and timing; ended early at about 01:26Z (section 13) | PARTIAL: 5 of 10 shapes |
670| e8cddcb1 | 2026-11-14T01:26:02Z | AmdLaunchGap | run 2: plan, plan3, HIP graph, plan3 control, plan2 | COMPLETE |
671| c715b669 | 2026-11-14T01:45:16Z | FourBit | rerun: q4gemv_d8, q4gemv_d8r2 and FP8/BF16 baseline on 10 shapes, two launches hung and were killed | COMPLETE for the 4-bit rerun, 2 timings missing |
672| 6e585e21 | 2026-11-14T02:05:44Z | AmdKernelSpeed | combined run: 7 arms (launcher, v2 kernels, FP8 v2b1/v2b2, cap286) x 3 interleaved runs, control | COMPLETE |
673| 7f66e322 | 2026-11-14T02:23:48Z | AmdLaunchGap | run 3: launch micro-benchmark; 9 paired cycles plan3, plan3c, HIP; plan3t phases; published launcher; control | COMPLETE |
674| 3a2e29e5 | 2026-11-14T02:52:37Z | SpecDecode2 | extra-row timing of the R-row kernels (fp8 R=1,2,3,8; bf16 R=1) | PARTIAL: BF16 rows at R > 1 and the speculative step not reached |
675
676Evidence file and hash for each session (full session name; paths under `raw/`):
677
678| Session | Evidence | sha256 |
679|---|---|---|
680| `jupyter-user-261113072240-bb2a389c` | `amd-launch-gap/src/CUDApp-base/evidence/amd-qwen38-native-final-20261113/host/qualification.json` | `a836b11106efb5060fdae656996fb98caaf89445efea65a89fef345b64d68b29` |
681| `jupyter-user-261113080038-5a0c78a1` | `amd-launch-gap/src/CUDApp-base/evidence/amd-qwen38-native-compatible-20261113/host/qualification.json` | `e35dead2c6ec31829176815dc5b3a962357563521b467a3fd4dbcae84011b4e0` |
682| `jupyter-user-261113101013-76e03a28` | `amd-launch-gap/src/CUDApp-base/evidence/amd-qwen38-native-refusal-20261113/host/qualification.json` | `57b382fe3943be5be7af42838c5aa8493611b1cd0dac931502409b39b856ab7c` |
683| `jupyter-user-261113185025-46d1b9c5` | `card-evidence/uxl-evidence.tar.gz` | `94940b02854c2c9c07a41fe27d3a7107940f284d3f099b6ba6533b42104a7ac7` |
684| `jupyter-user-261113232737-7605956f` | `amd-kernel-speed/card/GpuBenchSync-20261113T232737Z/aks-results.tar.gz` | `d6502d8957495f25a0ae56ae2f74a020903c733295a9d33d45e3501e47eb9be6` |
685| `jupyter-user-261114001549-e787e65d` | `amd-kernel-speed/card/261114001549-e787e65d/aks-results.tar.gz` | `9894a97b9ddaa78c688aace5ce2d16814f435cadad0dbf43df6b77da3285baf2` |
686| `jupyter-user-261114005045-52ef268c` | `amd-launch-gap/card/gap-evidence.tar.gz` | `3af4ee59322e06773d26cb1caace5ea85628a7c473d3a394e6ec541d5e9000b0` |
687| `jupyter-user-261114011836-f591aa44` | `four-bit/evidence/card-partial-20261114/card_q4.log.partial` | `dbb33379bef1ac6c7267e7d043d832c3e395231fab3d6b0376157143377c795d` |
688| `jupyter-user-261114012602-e8cddcb1` | `amd-launch-gap/card/run2/gap-evidence.tar.gz` | `8471a458c97f4339e4ff0b5b20449ac124cf91db0dfc732aaae4754b421a73ec` |
689| `jupyter-user-261114014516-c715b669` | `four-bit/evidence/card-20261114/q4card.tar.gz` | `24f6cc267888bb2e175acd51b18419bfa13ad071f8056b7b270ed5398e206c01` |
690| `jupyter-user-261114020544-6e585e21` | `amd-kernel-speed/combined/card-2026-11-14T0206Z/akc-results.tar.gz` | `493d6c29b79c7474659a9f69f877dcd8b597ffbb95a03b8230c5d21d57da9cee` |
691| `jupyter-user-261114022348-7f66e322` | `amd-launch-gap/card/run3/gap-evidence.tar.gz` | `de086a5e56e56ce949615e9ff6158e7a327d1f4c798264a8d75df23c125e9af3` |
692| `jupyter-user-261114025237-3a2e29e5` | `spec-decode/card-s4/results/jupyter-user-261114025237-3a2e29e5/rho-results.json` | `a136ad815610edacf15a6694dcf833e6dd20a59bd18c5b509f8d08c0da7c8c51` |
693<!-- sessions:end -->
694
695## 13. Runs with missing results
696
697State: facts from the raw logs. None of these changes a number in this report; each missing result is named where it
698would have appeared.
699
700- **4-bit session f591aa44 ended early (14 November, about 01:26 UTC).** Another lane replaced the session by mistake,
701 four minutes into FourBit's run, before its results were downloaded. The only record is the log text read through the
702 notebook's contents API at 01:24:40 UTC, with each line cut at 900 characters: 5 of the 10 planned shapes survive with
703 timings and bit checks. The rerun, session c715b669 (14 November from 01:45 UTC), recovered all of the rest except two
704 timings (next item). The FourBit script that ran in both sessions is the one in bundle `10c93d3d`
705 (`raw/amd-report/extracted/four-bit-bundle-10c93d3d/card_q4.py`, hash-checked against the bundle).
706- **Two launches hung in the 4-bit rerun (launcher defect: where it waits is located, why is not established).** Of 175
707 single-kernel launches of the published launcher `08a50491` in session c715b669, 173 completed and 2 never finished.
708 Their captured output (`four-bit/evidence/card-20261114/q4card.tar.gz`) shows:
709 - Hang 1, `q4gemv_d8` on delta-net out at 1 repeat: the dispatch was written and the launcher entered its wait for the
710 completion signal, which never reached zero; it spun for 7 minutes until SIGTERM.
711 - Hang 2, the FP8 baseline on MLP gate: the third launch at 50 repeats. Its output stops before the launcher reports the
712 dispatch written, and it spun for 1 minute 52 seconds until killed (`hang-2.txt`: `/dev/kfd` and the render node open).
713 Five launches of the same kernel and shape (three at 1 repeat, two at 50) had completed just before it.
714 - Both printed the 10 s slow-wait alarm; no completed launch did.
715
716 What is established (AmdLaunchGap, `amd-launch-gap/HANG-20261114.md` with its dated correction, checked against those
717 logs): the caller passed no deadline (`wait_timeout_ns 0`), and with no deadline the launcher's waits spin forever by
718 their contract, which explains the launcher's 100 percent CPU use and the hang. From the logs and the launcher source, hang 1 was in the
719 completion wait and hang 2 in the wait for ring space (its 16-slot ring must wrap for 50 packets), so in both the card's
720 packet processor stopped consuming or completing packets on that queue. What is not established: why it stopped, and in
721 hang 2 whether it stopped part-way or never started. Fix, IMPLEMENTED and CPU-gated, never run on a card that hung:
722 from commit `d957526e` the 10 s alarm prints the queue's read and write pointers and the signal value, in both
723 waits and both launch paths, and callers are told to pass a positive deadline so a stuck wait exits 75 with
724 diagnostics. Launcher run 3 used that launcher for 64 processes and none hung, so the diagnostics never fired.
725
726 Effect on timings: none on the numbers in this report. A launch prints a timing only after its completion signal, so a
727 hung launch gives none and is visibly incomplete, as these two were (they are the two missing timings of section 6). All
728 71 launcher plan processes behind sections 4 and 5's earlier sessions printed their ids line and none raised the alarm,
729 nor did any of the 22 in the combined session or the 67 in launcher run 3. A completed launch never waited 10 s;
730 shorter stalls inside a completed launch are not excluded by this check.
731- **Kernel timing, attempt 1 timed nothing.** In session e787e65d every first-attempt run exited 74 because the measuring
732 script passed an unexpanded `$AMDSERVE_WEIGHTS` to the launcher. The fixed script expands it and refuses to start on a
733 missing input; attempt 2 ran all 36 runs with exit 0. GpuBenchSync's earlier session 7605956f hit the same defect and
734 fixed it separately.
735- **Session-to-session drift.** The unchanged published launcher and kernels on the full plan measured 26.726, 26.721,
736 26.490, 26.641, 27.007, 27.164 and 27.051 ms per token in seven sessions. Every comparison in this report is within one
737 session.
738
739## 14. Review
740
741State: three end reviews were made of earlier versions of this report, each by a fresh agent with no memory or
742past-session tools, given only the review packet. Their findings are applied, except those about material the author
743chose to leave out of this publication. Reviewers: AI models; the first and third were Claude models made by Anthropic
744(model ids `claude-fable-5-2` and `claude-opus-5-5`), the same model family as the agents that wrote this report. The
745first reported that every headline number reproduces from the raw card logs, both by the packet's recompute and by its
746own independent script; the third, that every number reproduces byte for byte from the raw logs. None of the branches
747behind sections 4 to 8 has had its final review, and nothing is landed.