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 / raw / amd-kernel-speed / kernels / FP8-R2-RESULT.md

284 lines · 16708 bytes Raw Blame History Source

fp8gemv_b128f v3r2 (two rows per wave) and v3r4 (four rows per wave)

Lane uxl-brief/AmdKernelSpeed.Fp8TwoRow, Spark (Linux AArch64, no /dev/kfd), 2026-11-14. CPU only. Every step ran under flock -o ~/handoffs/hive/queen/pool-15.lock taskset -c 15 nice -n 10. No GPU work was done, and nothing was landed or published. The final run is run-all.log: START 2026-11-14T03:05:46Z, RUNALL PASS 2026-11-14T03:09:24Z, rc=0.

Outcome

CandidateObject sha256Kernel gate (seeded gfx942 executor + LLVM 18)Repository acceptance, adapted to the gridLauncher, rewritten real2.plan
v3r29377954c28eae8597273a6bf99ed2964905a8a27f8512cb7cc1c140d1dc91e9cPASS: 62/62 cases; 22/22 mutants and 2/2 grid controls CAUGHT; waitcheck control CAUGHTPASS: cases=27 controls=8exit 77; 6/6 checks PASS
v3r45620081b0d2cfa5d6bcc35daa5d1093663424f3721350748357d0b375028b4b3PASS: 62/62 cases; 27/27 mutants and 2/2 grid controls CAUGHT; waitcheck control CAUGHTPASS: cases=27 controls=8exit 77; 6/6 checks PASS

Status: EXERCISED on the host (seeded CPU executor, LLVM 18 encoding oracle, seeded launcher up to the device boundary). Hardware and performance are NOT_RUN. No MI300X timing exists for either candidate, so this does not show whether either one is faster than v2b2.

For comparison, v1 built from the repository table in the same gate has object sha256 72049eeefffe5431c0f8972d1d9f3e4f93e39841312aeb492ac24f455d23adbd (GpuBenchSync recorded the same value).

What the kernels do

gen_r2.py generates both candidates (default --rows=2; --rows=4 gives v3r4).

Generator

Row mapping

What is shared and what is per row

Bit identity with v1

M not a multiple of R

ABI and resources

VGPRsInstructions (v1: 422)Loads in flight per pair of chunksCode bytes
v3r29622723211948
v3r412843854823064

Files (fp8r2/)

Filesha256
fp8gemv_b128f-v3r2.hsaco9377954c28eae8597273a6bf99ed2964905a8a27f8512cb7cc1c140d1dc91e9c
fp8gemv_b128f-v3r4.hsaco5620081b0d2cfa5d6bcc35daa5d1093663424f3721350748357d0b375028b4b3
kernels/fp8gemv_b128f/v3r2/fp8gemv_b128f.isa (table for seeded hsaco.om)82a44f25f0b78fb469186642815757e30355051eb2d461c18d0c115873795c7f
kernels/fp8gemv_b128f/v3r2/fp8gemv_b128f-gfx942.s (LLVM oracle listing)51f0978cbc69ad6b2bfd326b32d0fdd4a738cf8ba8b1e015ac7522654e6b4e8a
kernels/fp8gemv_b128f/v3r4/fp8gemv_b128f.isa016c1085814f9507109840ebc8e577099b89cdc148d3c1ff3a3b091f52594cca
kernels/fp8gemv_b128f/v3r4/fp8gemv_b128f-gfx942.s7fd518329da90a6a6cb2250191946f4c2fb3ad591dad6d64b9a138ebd3cfc43a
gen_r2.py (generator)8e783484955c74d080d1cc57984b5e71ac9b07eb3249aa746a4f62524b663b7b
halve-grid.py (plan rewriter)e03577aa4c10bc5f59b818a3cfb8d9f0ad64d5e3f3173b1cb6000aebc93db18f
gates/kernel-gate-r2.sh78afcf49a7edbc9b00e83a30220eeef02bade3c67f4f3bc610b184f5e3bec3b2
gates/fp8gemv_b128f_compare_r2.pydc783782ae728880c84532e228ff5df9525e73f860fb9c56aca82d14197d426e
gates/waitcheck.py (GpuBenchSync's, copied unchanged)2b75cfab33d5d77e8adcce02ca3648d84f99d5b0f047f2d3ac32da04d35de6ae
make-acc-r2.py (writes the adapted acceptance)92cc65f78ccd5a620dbec184e19da0f40f0e077acaaabd526395e729c5743d24
acc-r2.sha4e81cead4090e3902ec5bb05d4b0f252fe87a86befad871eca13ba15eab7189
launch-check.sh679d9e829217011f837440caff5875de6475a5fa7ce8ebd616fc82516e4c4f8c
run-all.sh0bac41230b9cebfe1715fb793c642e57f4f69a1649e1397e74e7fb19eb970fd7

Inputs

Logs

1. Kernel gate (seeded gfx942 executor, LLVM 18 parity)

gates/kernel-gate-r2.sh is GpuBenchSync's kernel-gate.sh, adapted to R rows per wave.

Steps

  1. Check the omc pin.
  2. Build v1 and the candidate with the seeded hsaco.om; two candidate builds must be byte-identical.
  3. Check LLVM 18 parity of .text and of the 64-byte descriptor (all bytes except the entry offset 16..23), the same check as kernel-gate.sh.
  4. Run waitcheck.py. The table has no partial waits, so it runs on the executor unchanged (checked).
  5. Run fp8gemv_b128f_compare_r2.py.

Cases and controls in fp8gemv_b128f_compare_r2.py

v3r2 object sha256 9377954c28eae8597273a6bf99ed2964905a8a27f8512cb7cc1c140d1dc91e9c
PASS v3r2 two builds byte-identical
PASS v3r2 code bytes equal independent LLVM 18 oracle (11948 bytes)
PASS v3r2 descriptor bytes (except entry offset 16..23) equal LLVM oracle
WAITCHECK PASS peak_outstanding=32 errors=0
CONTROL ctl-nowait CAUGHT by waitcheck: WAITCHECK FAIL peak_outstanding=32 errors=115
MUTANTS listed=22 built=22
FP8GEMV-B128F-R2-GATE PASS cases=62 mutants=22 controls=24 fail=0

v3r4 object sha256 5620081b0d2cfa5d6bcc35daa5d1093663424f3721350748357d0b375028b4b3
PASS v3r4 two builds byte-identical
PASS v3r4 code bytes equal independent LLVM 18 oracle (23064 bytes)
PASS v3r4 descriptor bytes (except entry offset 16..23) equal LLVM oracle
WAITCHECK PASS peak_outstanding=48 errors=0
CONTROL ctl-nowait CAUGHT by waitcheck: WAITCHECK FAIL peak_outstanding=48 errors=225
MUTANTS listed=27 built=27
FP8GEMV-B128F-R4-GATE PASS cases=62 mutants=27 controls=29 fail=0

Mutants

MutantWhat it breaksCaught by
rowswap (requested)the two rows' outputs swapped61 / 61
sharedacc (requested)row B adds its scaled group sums into row A's accumulator62 / 62
sharedgrouprow B uses row A's group partial register (bites in the interleaved residual)21 / 21
oddstorestores of later rows not masked by M45 / 48
browrow B's W pointer not advanced by K61 / 61
bshortadvancerow B's W pointer advances 1024 instead of 2048 per pair41 / 41
wrongw-brow B's second chunk of a pair loads the first chunk's W40 / 40
residbrow B's residual bytes read from row A20 / 20
pairwrongxshared x pointer not advanced between the two chunks of a pair48 / 48
pairdropscaleone shared scale load dropped48 / 48

Detection-path mutants, per row (v3r2 / v3r4):

MutantRow ARow B
neverslow-*-pair47 / 612 / 9
neverslow-*-single42 / 36 / 6
missnan-*6 / 612 / 10
misszero-*53 / 36 / 5
fastnodouble-*49 / 4938 / 38
fastwrongbyte-*49 / 4938 / 38

v3r4 only:

Grid controls (v3r2 / v3r4):

2. Repository acceptance (fp8block_fast.py, real checkpoint rows)

Why the harness is adapted

What changes

Results

RunExpectResult
v3r2, R=2passPASS fp8gemv_b128f cases=27 controls=8 hardware=NOT_RUN performance=NOT_RUN; ACCEPT PASS rc=0
v3r4, R=4passsame line; ACCEPT PASS rc=0
v1, R=1 (adapter control: must still pass v1)passsame line; ACCEPT PASS rc=0
v1, R=2failCAUGHT rc=1 (all-ocp-bytes byte mismatch)
v3r2, R=4failCAUGHT rc=1
v3r2 rowswap, sharedacc, R=2failboth CAUGHT rc=1
v3r4 rowswap, sharedacc, R=4failboth CAUGHT rc=1

3. Plan rewriter and launcher check

halve-grid.py IN.plan OUT.plan [ROWS]:

launch-check.sh VAR ROWS:

HALVED rows=2 dispatches=1126 rewritten=400 bytes_differing=400  out sha256 3f9492cad219b8c86871f82c8fce40d1a849f72c25dc24fa405d985a7d3c189c
CLASS fp8gemv_b128f:10240x5120 count 48 gx 10240 -> 5120     CLASS fp8gemv_b128f:1024x5120 count 32 gx 1024 -> 512
CLASS fp8gemv_b128f:12288x5120 count 16 gx 12288 -> 6144     CLASS fp8gemv_b128f:17408x5120 count 128 gx 17408 -> 8704
CLASS fp8gemv_b128f:5120x17408 count 64 gx 5120 -> 2560      CLASS fp8gemv_b128f:5120x6144 count 64 gx 5120 -> 2560
CLASS fp8gemv_b128f:6144x5120 count 48 gx 6144 -> 3072       CLASSES dispatches=1126 unchanged-non-fp8 OK
PASS original exit=77            (OMEGA device=absent errno=2)
PASS halved-v1code exit=77
PASS halved-v3r2code exit=77     (launch-v3r2/code/fp8gemv_b128f.hsaco = the v3r2 object)
PASS refuse-rewrite-twice exit=2 REFUSED dispatch 2: fp8gemv_b128f grid (5120, 1) is not (M=10240, 1); already rewritten?
PASS refuse-not-a-plan exit=2 REFUSED not an OMPLAN01 plan
PASS halved-neg-count exit=64    (OMEGA refuse plan field=span-size)
LAUNCHCHECK pass=6 fail=0

ROWS=4 gives the same result: grid 10240→2560 … 6144→1536; output sha256 e4c91a462ac2075467a90310f47de4635e36cc86afa26b8f3b4f8901f1ccdf31; LAUNCHCHECK pass=6 fail=0.

Exit 77 means the launcher accepted the plan, code objects and weights up to the device boundary. It is not an execution.

Exact commands

From spark:~/work/hive/uxl-brief-20261113/AmdKernelSpeed/fp8r2:

sh run-all.sh > run-all.log 2>&1        # everything below, each step under the pool-15 lock
# which runs, with F=../takeover-gpubenchsync/fp8v2 and L="flock -o ~/handoffs/hive/queen/pool-15.lock taskset -c 15 nice -n 10":
$L python3 -I gen_r2.py --rows=2 $F/gen.py $F/v1.isa $F/v1.s kernels/fp8gemv_b128f/v3r2        # --rows=4 ... v3r4
$L sh gates/kernel-gate-r2.sh $PWD/omc-2c82 $PWD fp8gemv_b128f v3r2 2 python3 -I gen_r2.py --rows=2 $F/gen.py $F/v1.isa $F/v1.s
$L sh acc-r2.sh v3r2 kernels/fp8gemv_b128f/v3r2/fp8gemv_b128f.isa kernels/fp8gemv_b128f/v3r2/fp8gemv_b128f-gfx942.s 2 pass
$L sh launch-check.sh v3r2 2
python3 -I halve-grid.py ../measure/stub-plan/real2.plan OUT.plan 2      # the rewriter alone

What failed, and limits

Superseded first run

Earlier aborted attempts during development

Adapted gates

Pairing plan and object

Not run