mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5001] [Benchmark] RX 9060 XT (gfx1200) 0.2.2 vs 0.2.9: the RDNA4 prompt gains turn into copy waits on a 16 GB card that streams its experts; the decode change is the expert cache sizing; plus Radeon VII (gfx906) 0.1.41 vs 0.2.9 #2310
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2310
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @codywb on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5001
What did you measure
Follow-up to #3715 (same RX 9060 XT box, same IQ3_S config), now 0.2.2 against 0.2.9, plus a second box with a Radeon VII. Short version:
kLateAllocMib(1,949 slots against 2,050), so a few more experts per window are computed on the CPU. With the cache fixed at the same size, 0.2.2 and 0.2.9 are bit-identical. Against the yardstick's own run both versions are the same distance away, so this is a change, not a loss.STRATA_PREFILL_MMQ=0) they are as close as MMQ, or closer, on most prompts, and much further on three: the two single-chunk 4K prompts (code and docs) and a 32K multilingual one.All of it was reproduced locally. Nothing here is a stability claim.
Box 1: RX 9060 XT
Hardware. RX 9060 XT 16 GB (gfx1200), PCIe 4.0 x16 (host-to-GPU probe 28.5 GB/s), the only GPU in the PC (it also drives the desktop). Ryzen 5 5600 (6 cores), 94 GiB RAM, WD Blue SN580 2 TB NVMe, Pop!_OS 24.04, kernel 7.3.0 (mainline), ROCm from TheRock wheels 7.10.0a20251120 (gfx120X), hipBLASLt 1.2.0 with the
gfx1200-hipblaslt-100200.txttable. CPU energy-performance preferenceperformanceon all cores.Model and run config. Qwen3.8-Flash-Next GSQ-RCO IQ3_S from the prepared
experts.binpack (50.3 GB, 100% in the page cache when checked between runs; under 50 MB per request came from storage),--mmap-experts --expert-cache auto --prefill auto,--max-context 524288with YaRN x2,--kv int8 --kv-resident 32768,--spec 4 --spec-min-p 0.5with MTP,--vram-reserve-mib 4096, vision on the CPU. Env as in #3715:HSA_ENABLE_SDMA=0,HSA_USERPTR_FOR_PAGED_MEM=0,GPU_PINNED_MIN_XFER_SIZE=1048576,STRATA_HIP_WMMA=1,STRATA_ROUTE_TAIL_SKIP=0,STRATA_PCIE_FRAC_DEFAULT=old,STRATA_PF_FUSED=0,STRATA_HC_Q8=0,STRATA_GFX12_CHUNK=0,STRATA_MTP_HIP_PRIO=0,STRATA_TOPK_OLD=1,STRATA_SCORES_THREAD=0,STRATA_QUANT_GATHER=1,STRATA_HIP_QUEUE_PRIME=0,STRATA_COLD_OVERLAP=0,STRATA_IO_PREFETCH=0,STRATA_IO_PF_GATE=0,STRATA_PREFILL_HOST_PLAN=0.Builds. From source, Release, HIP,
STRATA_PREFILL_MMQ=ON STRATA_Q6K_EXPERTS=ON STRATA_MMQ_KQUANTS=ON,CMAKE_HIP_ARCHITECTURES=gfx1200: v0.2.2 (011c9e6, engine 0.1.47) and v0.2.9 (c62d5e3), each run with its ownserve/server.py. No local patches.Arms (one change each).
STRATA_PF_FUSED=0, so the gfx12 fused prompt experts are on (the log says "prompt experts on the fused int8 kernels").STRATA_PCIE_FRAC_DEFAULT=old, so the 0.2.7 decode split is on (pcie_frac 0.15in the log, against 0.55).Method. Isolated port, a fresh engine per arm, arms interleaved (P A B C C B A P), one run per size per arm, fixed prompts at 4K / 32K / 64K, greedy, 256 output tokens.
STRATA_PREFILL_TIMING=1andSTRATA_DECODE_TIMING=1in a separate pass. Fidelity:tools/quant_quality.pyfrom 0.2.9, in its own modes and also driven with the served engine arguments (below). 2026-11-02, 17:56 to 21:14 JST.Speed (prompt tok/s; decode was 29 to 33 tok/s in every arm, see the decode note)
Where the prompt time goes (
STRATA_PREFILL_TIMING, ms; chunk 8192, the 96-slot ring)At 32K the three expert phases drop by 6.3 s and the copy wait rises by 6.6 s. On this config the experts stream from the page-cached mapping (expert cache hit rate about 52 to 55%), so with the faster GEMMs the copies become the limit. Release-note figures for these kernels come from R9700 setups that hold the experts in VRAM, where there is nothing to wait for. Things I tried to get the time back, B unless noted, prompt tok/s at 4K / 32K / 64K:
STRATA_PREFILL_RING=512STRATA_PREFILL_RING=1024STRATA_PREFILL_RING=512on A--prefill 16384(A and B)STRATA_MTP_SIDE_STREAM=1,STRATA_MTP_HIP_PRIO=0keptSTRATA_MTP_SIDE_STREAM=1,STRATA_MTP_HIP_PRIOunset (gfx12 default on)So the side stream from #3480 (point 1) does not help on this config. On 0.2.2 the draft priority's default makes 32K and 64K prompts about 21% slower than P (795 against 1017, 748 against 943), so
STRATA_MTP_HIP_PRIO=0stays; on B it made no clear difference. A bigger ring (#3480 point 3) only fits by shrinking the chunk, which costs what it gains. Not tried: the pinned RAM arena instead of--mmap-experts, andHSA_ENABLE_SDMA=1. Both are held for stability reasons on this box, and they are the two settings most likely to change the copy cost.One more thing about B: its prompt speed seems to have two levels across fresh engine starts. Of the four starts with the same effective config (chunk 8192, 96 slots), two read 32K at 1009 to 1020 tok/s and two at 910 to 915. The two side-stream starts were also at the slow level (904, 916). In the slow starts with timing, the 32K phases were dequant 4,166 to 4,382 ms and gemm gate/up 7,932 to 8,000 ms, against 1,822 and 5,783 in the fast one; the copy wait was lower (4,807 to 5,179 against 7,142). A and P did not do this (P 1017 to 1019, A 1015 to 1024).
Decode. Per window at 64K, about 84 ms in P, A and C alike (P: verify 73.9 = GPU-reach wait 25.3 + per-layer host 46.1, of which CPU 45.7; 11.3 CPU experts and 17.4 VRAM hits per layer-window; "PCIe 0.00"). The decode tok/s differences between arms in the first table come from different text and so different draft acceptance, not from the window time. The 0.2.7 split moves pcie_frac from 0.55 to 0.15, but nothing goes over PCIe in either setting here, so it cannot help on this config.
Fidelity
Yardstick modes (
run5 x 999 positions,prompt20 prompts): P = A = B, 100.00% top-1, KL 0 everywhere. Neither mode exercises what changed.runscores on the one-token path, andpromptuses prompts up to 1000 tokens, belowstream_all_min(), so the fused path never runs (no fused line in its stderr).The served decode path: the same 5 x 999 positions, but the engine started with the served arguments (
--expert-cache auto, adaptation, CPU share,--kv int8,--prompt-cache 0,--short-read 1064),FIXED_ENVemptied. Each arm run twice; P = P repeat, A = A repeat bit for bit.B and C equal A bit for bit here. Bisected one switch at a time against P:
STRATA_DEFAULTS=026: identical to P.ATTN_LANECELL,ATTN_MERGE_V2,TSUM,EXPDEC),STRATA_GR_UP_WIDE=0,STRATA_GR_V3=0,STRATA_PROMPT_ATTN_IMMA=0,STRATA_PLE_AUTO_RAM=0,--kv fp16on both.--expert-cache 1500 --adapt-every 100000on both: 0.2.2 = 0.2.9 bit for bit.... (+218 MiB for the draft head) -> 2050 slots, 0.2.9... (+218 MiB for the draft head, +256 MiB for what is allocated after the cache) -> 1949 slots.So it is the #4474 reserve fix (the
026path skipskLateAllocMib). Against the yardstick's ownrunoutput (fp16 KV, one-slot cache, no CPU share) as a reference, the served P is 94.55% / KL 0.0225 / PPL 4.021 and the served A 94.85% / 0.0232 / 4.018 (reference 4.009). Same distance. The roughly 5% that the served setup costs against the yardstick is the same in both versions. No single one of--kv int8, the cache size and adaptation, or--pcie-frac 0removes it; I did not isolate it further.Long prompts, the batched prompt path: 16 prompts, 4 texts (C++ source, a long Markdown doc, English prose, multilingual READMEs and locale files) at 4,096 / 8,192 / 16,384 / 32,768 tokens, full-vocabulary first-token logits through
STRATA_DUMP_FIRST_LOGITS, served arguments, every request fresh. Each arm run twice, and every repeat matched bit for bit.Against the FP16 prompt path (
STRATA_PREFILL_MMQ=0on 0.2.9's engine; 0.2.2's FP16 run gives the same picture):On the 32K multilingual prompt P gives its top token 0.72 and B gives it 0.91. Same top token everywhere.
Box 2: Radeon VII
Hardware. Radeon VII 16 GB (gfx906), Ryzen 5 5500, 40 GB DDR4-3200, Crucial P5 500 GB NVMe, Ubuntu Server 26.04.1, kernel 7.0.0-42. The card links at PCIe 3.0 x8 in this board's x16 slot (probe 6.6 GB/s; an RX 9060 XT also linked x8 there, so it is the board or CPU, not the card). ROCm 7.14, built in a Docker toolchain with the runtime copied to the box.
Model and config. Qwen3.8-Flash-Next GSQ-RCO IQ2_XS,
--max-context 131072,--prefill auto:16384(borrows 5,539 cache slots, 7.40 GiB, for the prompt; +7 to 10% on prompts over 13K on 0.1.41), CPU EPPperformance,STRATA_ROUTE_TAIL_SKIP=0(tail skip at 7, measured on the 9060 XT box on 2026-10-14 with 0.1.44.1, gave top-1 89.6% and KL 0.085 on the yardstick against off).Builds. v0.1.41 and v0.2.9 (engine 0.1.55),
STRATA_HIP_GFX906. 0.2.9 needed two lines ininclude/strata/platform/hip_compat/strata_hip.h, becausesrc/core/dflash2.cpp:205-207calls stream-priority functions the gfx906 compat layer did not map:Fidelity.
quant_quality.py run --gpu-experts, 5 x 999 positions: 0.1.41 vs 0.2.9 = 100.00% top-1, KL 0 in every segment, and the three.tsvfiles (0.1.41, 0.2.9 twice) are byte-identical.Speed. The same eleven requests on each version (prompts from 75 to 41K tokens, chat and agent turns, some with cached prefixes), one run each. Decode on 0.2.9 was 28.5 to 42.3 tok/s against 19.8 to 31.6 on 0.1.41, higher on ten requests and equal on one (31.8 against 31.6). Fresh long prompts were about equal (27.8K: 468 vs 482; 13.5K: 396 vs 424; 14.0K: 414 vs 369). The new conversation cache reused 27,819 of 41,028 tokens on one follow-up (84 s against 152 s). As on the 9060 XT, decode tok/s also depends on draft acceptance, which moves when the text moves. These runs had no decode timing, so the decode gain is not yet split into window time and acceptance.
Reproduction status
Reproduced locally on both machines; every number above is from a run. Not tested: stability (no long replay on 0.2.9 yet), the pinned arena,
HSA_ENABLE_SDMA=1. Happy to run any of these one at a time, or a build with a change to the gfx12 ring rule or the fused path's chunk condition, on the 9060 XT.@codywb commented on GitHub (Nov 3, 2026):
A comment here (since removed) asked for the benchmarking code and patches, so this is everything needed to rerun the report (the attached
strata-5001-repro.zip):tools/quant_quality.py's owncmd_runandcmd_prompt, withFIXED_ENVemptied andengine_argsreplaced by the server's own arguments: auto expert cache with adaptation, CPU share, int8 KV,--prompt-cache 0. The README has the two lines.build_longset.shbuilds it from public files (v0.2.9'sprefill.cppandDETAILS.md, vim'sversion9.txt, the READMEs and app locale files), with a hash of the token ids to check against.#defines fordflash2.cpp), as a patch. The 9060 XT builds are unmodified tags.compare/pcompareoutput, and the gfx906 records.One addition since the report: the expert reserve turned out to be the main lever on this card.
--vram-reserve-mib 4096 -> 2048gives 40% more expert slots and 10 to 15% faster decode on both 0.2.2 and 0.2.9, and with it 0.2.9's defaults read 64K prompts 13% faster. That leaves only about 0.5 to 0.7 GiB free on a card that also runs the desktop. Numbers in the README's "Window 3" section.The gfx906 speed requests replay my own agent sessions, so those prompts are not included; everything run on the 9060 XT uses public or synthetic text.
strata-5001-repro.zip
@Niko1221 commented on GitHub (Nov 5, 2026):
Thank you for the benchmark. We have collected these results for the benchmarks page on the Strata website, so we are closing this here. If you measure again, for example on 0.2.11, you are welcome to open a new report.
The Strata project