okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

albedocmake: strata_kernels links strata_kernels_cpu (iq_kernels.cu reads the latent colscale table from expert_layout.cpp; strata-q36ref failed to link)a4af4df61

main
1 file

files

README.md4.1 KiB

RX 6900 XT (gfx1030): the FP32 tiled QSA block scorer on HIP (2026-10-07)

STRATA_SELECT_SIMT=1 runs the FP32 tiled scorer of 65ce329 (konijiwa110's #742) on HIP cards too, tiled 32/128/16/8 on gfx103x. Without it the prompt path scores the QSA blocks on the warp kernel, as before.

Rig

qsa_select_bench, one card, 256 queries (two runs each, min / max)

Every tiling below gave scores byte-identical to the original kernel (the valid cells of every query, 33.5 MB at 128K and 8.4 MB at 32K, compared with cmp), passed the FP64 gate and selected the same blocks as the warp kernel for 256/256 queries. Warp kernel: 2.69-2.74 ms at 128K, 0.67 ms at 32K.

tiling QT/NB/KC/TN128K ms32K ms
32/64/32/4 (the original)0.695 / 0.6950.186 / 0.186
32/128/16/8 (this PR, gfx103x)0.587 / 0.5910.169 / 0.171
16/128/16/40.592 / 0.5930.165 / 0.166
16/256/16/80.609 / 0.6100.173 / 0.174
32/128/8/80.612 / 0.6140.190 / 0.195
64/64/16/80.621 / 0.6230.180 / 0.183
16/128/32/40.666 / 0.6690.180 / 0.180
8/256/16/40.706 / 0.7120.193 / 0.194
16/128/8/40.765 / 0.7830.306 / 0.308
32/256/16/160.955 / 0.9620.286 / 0.288
64/128/16/160.969 / 0.9800.287 / 0.294

The width does not move the ranking: 128K, the card restricted to 72 and 60 of its 80 CUs with HSA_CU_MASK (the original tiling slows 1.40x at 60 CUs, so the mask takes effect). Scores byte-identical at every width too.

tiling80 CUs72 CUs60 CUs
32/64/32/40.6940.7640.970
32/128/16/80.5870.6450.795
16/128/32/40.6660.7340.929
32/128/32/80.7170.7840.993
64/64/32/80.7510.8171.030
32/64/64/40.8370.9261.178

End to end

benchmark.py (synthetic prompts with a fresh nonce each, temperature 0, 256 generated tokens), one cold server per arm, ABBA. Prompt medians, SIMT against the warp kernel: 128K +7.3% and +7.5%, 32K +0.8% and +0.8%. The scores' summation order changes the generated text, so decode speed is not comparable between the arms (each arm's own two starts gave the same text, except one 128K request between the two warp-kernel starts). No stalls.

armrequestprompt tokensprompt tok/sdecode tok/s
warp-132768-run-132,7681,56160.1
warp-132768-run-232,7681,57166.7
warp-132768-run-332,7681,57367.8
warp-1128000-run-1128,0001,74560.3
warp-1128000-run-2128,0001,73565.5
warp-1128000-run-3128,0001,70168.5
simt-132768-run-132,7681,56264.0
simt-132768-run-232,7681,58665.3
simt-132768-run-332,7681,58472.2
simt-1128000-run-1128,0001,86262.8
simt-1128000-run-2128,0001,86166.8
simt-1128000-run-3128,0001,85468.3
simt-232768-run-132,7681,54763.7
simt-232768-run-232,7681,58265.2
simt-232768-run-332,7681,57471.9
simt-2128000-run-1128,0001,86762.8
simt-2128000-run-2128,0001,85866.7
simt-2128000-run-3128,0001,84968.4
warp-232768-run-132,7681,54060.0
warp-232768-run-232,7681,56466.7
warp-232768-run-332,7681,56167.7
warp-2128000-run-1128,0001,72960.3
warp-2128000-run-2128,0001,72763.2
warp-2128000-run-3128,0001,72469.0