[GH-ISSUE #4159] [Benchmark] MI50 (gfx906): prompt speed with STRATA_HIP_PROMPT_F16 and the CPU prefill share #1821

Closed
opened 2026-11-04 01:54:21 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @KevinX8 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4159

Environment: v0.2.6 (4b9e05a2) + the gfx906 stream-priority shim (#4156); Linux; 1x Instinct MI50 16 GB (gfx906), AVX2 CPU (12 cores / 24 threads), 62 GB RAM; ROCm 10.1; Swift 1.5 (Qwen3.8-Flash-Next) GSQ-RCO IQ3_S native pack. Engine settings: --kv int8 --kv-resident 32768 --max-context 262144 --resident-budget-gib 41 --vram-reserve-mib 1024 --spec 4 --spec-min-p 0.70 --pcie-frac 0.35 --prefill auto --expert-cache auto, MTP on.

Changed settings (measured one at a time and together; none is a default on gfx906):

  • STRATA_HIP_PROMPT_F16=1 (FP16 in/out prompt GEMMs; today only suggested on gfx103x)
  • STRATA_PREFILL_CPU_SHARE=auto, STRATA_PREFILL_CPU_SHARE_MAX=4096 (not armed by default on HIP)
  • --short-read 128

Fresh 16k-token code prompt (CLI, STRATA_PREFILL_TIMING=1):

prompt tok/s
default 393
STRATA_HIP_PROMPT_F16=1 479
F16 + CPU share 498 (+27%)
STRATA_RDNA2_SGEMM=all 352
F16 + STRATA_EXP_MODE=2 469
F16 + STRATA_GFX906_ATTN_QUERY_SWIZZLE=1 + STRATA_GFX906_ATTN_REDUCE12=1 482

With F16 the dense phases shrink: hc read 7.75 -> 3.40 s, gdn 6.32 -> 4.00 s, qsa proj 2.70 -> 1.75 s, router+shared 1.65 -> 0.91 s (16,383 tokens).

Fresh 118k-token prompt (serve, same prompt both runs): 363 -> 468 tok/s (+29%). Decode unchanged: 44.1 -> 45.5 tok/s short, 31.1 -> 30.7 at 118k depth.

Agent turns (20k cached context, wall time of the read, two passes):

fresh tokens default F16 + share + --short-read 128
91 2.09 s 1.44 s
164-166 2.54 / 2.63 s 1.88 / 1.78 s
469-484 3.93 / 4.06 s 2.79 / 2.78 s
1,293-1,504 6.31 / 6.68 s 4.49 / 4.85 s
3,428-3,664 12.47 / 13.27 s 9.46 / 9.08 s

Quality (a 2,048-token prefix read by the batched path, then the code and agent segments of data/quant_quality/v1 scored through the decode windows; top-64 KL against the unchanged build; the reference against itself: KL 0):

run top-1 mean KL PPL (ref 2.860)
unchanged build, --prefill 1024 instead of 512 (reordered sums only) 94.5% 0.052 2.744
unchanged build, --prefill 768 93.7% 0.052 2.797
F16 94.2% 0.049 2.805
CPU share 94.0% 0.051 2.846
F16 + CPU share 93.6% 0.059 2.822

On this harness both switches sit at the level of a pure reordering of the prefix's arithmetic.

KV storage, same harness (against FP16 KV): int8 KL 0.055 / top-1 94.9% / PPL 2.762; k8v4 0.104 / 91.9% / 2.900; q4_0 0.130 / 91.7% / 2.793 (agent segment: 0.090 / 0.157 / 0.200). q4_0 frees 1.4 GiB of pinned RAM at 256k (3.09 -> 1.69 GiB) with no meaningful speed change, so int8 was kept for these numbers.

Not run: other gfx906 cards (MI60, Radeon VII), other models, a layer split.

Suggestion, if the maintainers agree: mention STRATA_HIP_PROMPT_F16=1 and the CPU share in the gfx906 section of docs/AMD_HIP.md (it currently lists 353 tok/s prompt on 2x MI50); happy to send that as a [Docs] PR.

Originally created by @KevinX8 on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4159 **Environment:** v0.2.6 (4b9e05a2) + the gfx906 stream-priority shim (#4156); Linux; 1x Instinct MI50 16 GB (gfx906), AVX2 CPU (12 cores / 24 threads), 62 GB RAM; ROCm 10.1; Swift 1.5 (Qwen3.8-Flash-Next) GSQ-RCO IQ3_S native pack. Engine settings: `--kv int8 --kv-resident 32768 --max-context 262144 --resident-budget-gib 41 --vram-reserve-mib 1024 --spec 4 --spec-min-p 0.70 --pcie-frac 0.35 --prefill auto --expert-cache auto`, MTP on. **Changed settings** (measured one at a time and together; none is a default on gfx906): - `STRATA_HIP_PROMPT_F16=1` (FP16 in/out prompt GEMMs; today only suggested on gfx103x) - `STRATA_PREFILL_CPU_SHARE=auto`, `STRATA_PREFILL_CPU_SHARE_MAX=4096` (not armed by default on HIP) - `--short-read 128` **Fresh 16k-token code prompt** (CLI, `STRATA_PREFILL_TIMING=1`): | | prompt tok/s | |---|---| | default | 393 | | `STRATA_HIP_PROMPT_F16=1` | 479 | | F16 + CPU share | **498 (+27%)** | | `STRATA_RDNA2_SGEMM=all` | 352 | | F16 + `STRATA_EXP_MODE=2` | 469 | | F16 + `STRATA_GFX906_ATTN_QUERY_SWIZZLE=1` + `STRATA_GFX906_ATTN_REDUCE12=1` | 482 | With F16 the dense phases shrink: hc read 7.75 -> 3.40 s, gdn 6.32 -> 4.00 s, qsa proj 2.70 -> 1.75 s, router+shared 1.65 -> 0.91 s (16,383 tokens). **Fresh 118k-token prompt** (serve, same prompt both runs): 363 -> 468 tok/s (+29%). Decode unchanged: 44.1 -> 45.5 tok/s short, 31.1 -> 30.7 at 118k depth. **Agent turns** (20k cached context, wall time of the read, two passes): | fresh tokens | default | F16 + share + `--short-read 128` | |---|---|---| | 91 | 2.09 s | 1.44 s | | 164-166 | 2.54 / 2.63 s | 1.88 / 1.78 s | | 469-484 | 3.93 / 4.06 s | 2.79 / 2.78 s | | 1,293-1,504 | 6.31 / 6.68 s | 4.49 / 4.85 s | | 3,428-3,664 | 12.47 / 13.27 s | 9.46 / 9.08 s | **Quality** (a 2,048-token prefix read by the batched path, then the `code` and `agent` segments of `data/quant_quality/v1` scored through the decode windows; top-64 KL against the unchanged build; the reference against itself: KL 0): | run | top-1 | mean KL | PPL (ref 2.860) | |---|---|---|---| | unchanged build, `--prefill 1024` instead of 512 (reordered sums only) | 94.5% | 0.052 | 2.744 | | unchanged build, `--prefill 768` | 93.7% | 0.052 | 2.797 | | F16 | 94.2% | 0.049 | 2.805 | | CPU share | 94.0% | 0.051 | 2.846 | | F16 + CPU share | 93.6% | 0.059 | 2.822 | On this harness both switches sit at the level of a pure reordering of the prefix's arithmetic. **KV storage, same harness** (against FP16 KV): `int8` KL 0.055 / top-1 94.9% / PPL 2.762; `k8v4` 0.104 / 91.9% / 2.900; `q4_0` 0.130 / 91.7% / 2.793 (agent segment: 0.090 / 0.157 / 0.200). `q4_0` frees 1.4 GiB of pinned RAM at 256k (3.09 -> 1.69 GiB) with no meaningful speed change, so `int8` was kept for these numbers. **Not run:** other gfx906 cards (MI60, Radeon VII), other models, a layer split. Suggestion, if the maintainers agree: mention `STRATA_HIP_PROMPT_F16=1` and the CPU share in the gfx906 section of `docs/AMD_HIP.md` (it currently lists 353 tok/s prompt on 2x MI50); happy to send that as a `[Docs]` PR.
Author
Owner

@Niko1221 commented on GitHub (Oct 29, 2026):

Thank you for measuring this and writing it up. We are building a Strata website with a page for community benchmarks, and results like these will be added there when it launches, so we are closing this here. If your numbers change with a new version, you are welcome to post them again.

<!-- gh-comment-id:6495656342 --> @Niko1221 commented on GitHub (Oct 29, 2026): Thank you for measuring this and writing it up. We are building a Strata website with a page for community benchmarks, and results like these will be added there when it launches, so we are closing this here. If your numbers change with a new version, you are welcome to post them again.
Author
Owner

@KevinX8 commented on GitHub (Oct 29, 2026):

Hello, no worries, this wasn't just a standard benchmark however, it shows that tweaking to use those settings increases prefill by 27% so it should be used as a new default on gfx906

<!-- gh-comment-id:6495968105 --> @KevinX8 commented on GitHub (Oct 29, 2026): Hello, no worries, this wasn't just a standard benchmark however, it shows that tweaking to use those settings increases prefill by 27% so it should be used as a new default on gfx906
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1821
No description provided.