mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1386] 2x RX 7900 XTX (gfx1100, layer split): STRATA_PF_GEMM is worth ~7% prefill and is off by default #561
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#561
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 @yalu-arch on GitHub (Oct 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1386
2× RX 7900 XTX (gfx1100, layer split):
STRATA_PF_GEMMis worth ~7% prefill and is off by defaultTL;DR
directions a lot: cold start 166 s → 95 s (−43%, #699 read-ahead) and decode 46.7 → 56.6 tok/s
(+21%, shared-expert fork default-off, #826/#816). Both claims verified on AMD hardware here.
STRATA_PF_GEMMisopt-in and off by default. That switch is worth +7.4% over the 0.1.40 default, which brings prefill back to
within 3% of 0.1.39. Worth a release-note line, or a default-on for gfx11 if the numbers hold elsewhere.
gfx1100-hipblaslt-100201.txtwithtools/hip/tune_hipblasltfor this ROCm (hipBLASLt 1.2.1 →version number
100201); the shipped tables are 100100/100200/100202/100401/100500, so 1.2.1 is refused by theversion check. The table loads,
hip_prefill_hipblaslt_gemmreportsfallbacks=0, and it is end-to-end neutralon my model (my dense GEMMs are WMMA-dominated) although single shapes gain up to 5.46× over hipBLASEx in
the tuner. Happy to send it as a PR (like #745) if you want that library version covered.
hip_prefill_hcd_exact_paritystays skipped withthe table sends no tested T to solution 1176 / 1177, i.e. the HCD-exact kernel never engages. Expected?Environment
7.2.26015-fc0010cf6a), hipBLASLt 1.2.1 → version number 100201, ROCM-SMI-LIB 7.8.0BUILD.json: version 0.1.40, backend hip, archs gfx1100,vision: none), pinned llama.cpp3cf0325serve/from v0.1.40.1 (the engine is the 0.1.40 one, as your release note says)tools/iq_pack.py(native experts); the PLE shard is passed as--ple-gguf--max-context 262144 --kv int8 --kv-resident 32768 --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --layer-split autoSTRATA_WMMA_GEMM=1(+ the switches discussed below)All measurements below are the engine's own
strata serve: prompt …lines, same pack, same config, same script perpair; prompts are greedy,
reasoning_effort=none, generation capped at 8 tokens for the ladder cells (so the numbersare prefill throughput, not end-to-end).
1. Cold start: read-ahead (#699) works on RDNA3
166 s → 95 s (−43%) to HTTP-ready, both arms after evicting the page cache by reading an unrelated 80 GB file
(the box has no passwordless sudo, so no
drop_caches; reading the other model's weights is my substitute, samemethod for both arms). Warm restart of the same config: 60–79 s. Nothing here claims your RTX 5090 number
(920 s → 70 s); this is just the AMD-side confirmation.
2. Decode: shared-expert fork default-off matches your claim
STRATA_SH_STREAM=1The fork is decode-only on this box: across three arms (default,
STRATA_SH_STREAM=1,STRATA_PF_BK64=0) thesame 152,068-token cold read measured 1,688.4 / 1,688.4 / 1,688.4 tok/s. So defaulting it off on HIP is right here.
3.
STRATA_PF_GEMM(new, opt-in) is worth ~7% prefill on gfx1100 — the main findingSame pack, same config; the only difference is the env var. Five cold-read cells plus the small-prompt warmup:
STRATA_PF_GEMM=1Against 0.1.39 (same pack/config/script) the picture becomes: prefill 1,603.0 / 1,660.8 / 1,891.7 for 33k / 122k / the
152 k cold read, i.e. with
PF_GEMM=10.1.40 is only −2.6% … −3.6% behind instead of −9% … −11%.Ask: is off-by-default deliberate on gfx11 (does it regress on some card/quant you tested?), or is gfx1100 simply
untested for it? From
src/prefill/gemm.cuthe S23 path runs before the WMMA path inGemm::f16whenpf_on && T >= pf_min_t(default 0), and it returns false for shapes it does not take — on our IQ3_S expert shapes itlooks like a straight win. If you want, I can re-run the pair a few more times and post the raw engine lines.
4. Negative / neutral results (so nobody re-tests them)
STRATA_SH_STREAM=1STRATA_PF_BK64=0STRATA_IQ3S_MT1=1STRATA_PF_SWITCH_MIN_T=4096STRATA_PF_PAD=1STRATA_PA_WMMA(env)5. A calibrated hipBLASLt table for 100201 (offer to contribute)
STRATA_HIPBLASLT_TUNING_V1 gfx1100 100201.STRATA_HIPBLASLT_TUNING=<file> ./build-hip/hip_prefill_hipblaslt_gemm→ rc 0, 4 cases PASS,fallbacks=0;the engine logs
prefill gemm: hipBLASLt tuning enabled (26 rows, gfx1100, version 100201).f16 T=8192 N=12288 K=2560: hipBLASEx 35.43 ms → hipBLASLt solution 1147 6.48 ms (5.46×).my dense prefill work goes through the WMMA path, so hipBLASLt only catches leftovers.
hip_prefill_hcd_exact_paritystays SKIP:the table sends no tested T to solution 1176 / 1177. So aself-calibrated table silently leaves the HCD-exact kernel off. Is that intended (those two ids only being valid for
the library build the shipped table was measured on), or should the tuner be steered to prefer 1176/1177 for the
N 320 / K 10240 shape so the exact kernel can engage?
I can open a PR that adds
tools/hip/gfx1100-hipblaslt-100201.txt(setup picks<arch>-hipblaslt-<version>.txtbyname, so the file is the whole change) and a line in the README's shipped-table list — say the word if that ROCm
version matters to you.
6. Variance, in case it is useful for the docs
A/B/A).
cell.
7. What I did not test
Single card, 4-GPU, other quantisations (Q2_0 / IQ2_XS / Q4_0), other architectures,
--vision(not built here),--parallel/--batch-mtp, Windows, and the #848 resident-RAM-mode soak beyond what the default split mode does.No GPU faults, stalls, errors or 500s in ~3 h of 0.1.40 with repeated 200 k-token prompts, 134 k cancellations and one
long-context recall probe (4/4 markers, pp 1,841.6 tok/s, TTFT 116.1 s).
@yalu-arch commented on GitHub (Oct 8, 2026):
Raw harness output behind the ~7% claim (2x 7900 XTX, gfx1100, layer split)
Same pack / config / script, each arm = fresh process start (68–69 s) + warm-up, then the same ladder. Both arms below are 0.1.40, measured on the same day, one env var apart.
Env (baseline):
STRATA_HIPBLASLT_TUNING=<hipblaslt-100201 table>,STRATA_WMMA_GEMM=1,STRATA_PA_WMMA=1. The test arm addsSTRATA_PF_GEMM=1and nothing else.Args:
--pack(IQ3_S native experts),--expert-cache auto,--prefill auto(8192 chunk),--spec 4 --spec-min-p 0.5 --mtp,--kv int8 --kv-resident 32768,--max-context 262144, layer split across GPUs [2,3]. Both arms self-report0.1.40 | slots 19084 | vram_free 592.Baseline (PF_GEMM off) — from
sc117.sc117tuned.txt:Test arm,
STRATA_PF_GEMM=1— fromsc117.pfgemm1.txt:Spread inside one run (same config, different cells): ±1% on the big-T cells, ±7% on the 8.5k warm-up cell (849.4 vs 909.1 here) — so only the big-T columns above carry weight; the warm-up row and the decode delta are not.
The other switches we ran in the same harness (so the effect is specific to PF_GEMM, not a general "more knobs = faster"):
STRATA_IQ3S_MT1=1(PF_GEMM off): p33k 1,438.2, p67k 1,363.4, p122k 1,476.4, p200k 1,438.8, unique 152k 1,674.1, decode 53.9 / 54.1 / 57.7, cancel 13.5 s ⇒ slightly negative.STRATA_SH_STREAM=1: decode 47.8 / 50.2 / 51.4 tok/s (vs 53.8 / 56.5 / 56.6 on the default env) ⇒ we keep it off.STRATA_PF_BK64=0,STRATA_PF_SWITCH_MIN_T=4096,STRATA_PF_PAD=1: all within noise. The one apparently-good cell fromPF_PAD(+6% on the 8.5k warm-up) was refuted by its paired arm, which read the same 909.4 without it.Happy to run more arms if you want them — the ladder is scripted (33k / 67k / 122k / 200k + a 152k unique cold prompt + 3×400-token decode + a cancel probe), each arm costs about 10 minutes including the restart. I can also capture
STRATA_PREFILL_TIMING=1lines for the S23-dense vs WMMA path on this pair if the kernel-level split is useful.@Niko1221 commented on GitHub (Oct 8, 2026):
Thanks for the clean A/B. We checked
STRATA_PF_GEMMon an R9700 (gfx1201), 1 GPU, Q2_0, 5 interleaved on/off pairs: identical within noise, which is expected, because the kernel is gfx11-only (strata_wmma_gfx11_device()is false on gfx12 and the call falls through). So we have no gfx1201 effect to weigh against your +7%, and no gfx1100 card. We will not turn it on by default for gfx1100 on one reporter's two-card measurement; if a second 7900 XTX / XT owner confirms the +7% we will add gfx1100 to the per-arch defaults the way gfx1151 is. Until then it stays opt-in and the docs carry your number.Yes please to the
gfx1100-hipblaslt-100201.txtPR (like #745). The loader refuses a table whose version does not match the library, so it cannot affect other versions.On your open question: the HCD-exact kernel reproduces hipBLASLt solutions 1176/1177, the ids in the shipped gfx1151 table. A self-calibrated table picks other ids, so 'the table sends no tested T to solution 1176/1177' and the kernel staying off is expected, not a bug.
@afterthought325 commented on GitHub (Oct 8, 2026):
Second gfx1100 data point (single RX 7900 XT, IQ3_XXS native pack, v0.1.40.2, single GPU): STRATA_PF_GEMM=1 + STRATA_PF_PAD=1 + STRATA_PF_SWITCH_MIN_T=4096, 32K-token fresh prompts: 1586 (n=2) -> 1628 (n=5) tok/s, +2.6%. Ranges adjacent (1580-1592 vs 1588-1635), so weak-positive rather than clean separation; direction matches your +7.4%. Qualifiers: my hipBLASLt table already matched the library (no Lt fallbacks at baseline) and STRATA_SELECT_WMMA=1 was already on, so less headroom than your setup. Kept on here (stacks, zero risk). Happy to post the full arm table if useful.
@afterthought325 commented on GitHub (Oct 8, 2026):
Follow-up gfx1100 data (single RX 7900 XT, IQ3_XXS native, v0.1.40.2): the phase timer showed qsa attn at 30% of prefill, and code-reading found the cause — without STRATA_HIP_WMMA=1, qsa_prompt_attn_batch returns false on HIP and the host silently keeps the old kernel (no log line; only the opt-in prints). STRATA_HIP_WMMA=1 alone: 1852 -> 2520 tok/s @32K (+36%, n=3 tight). Stacked STRATA_PA_FAST=1: -> 2611 (+3.6%, 5/5 quality probes bit-identical to no-FAST control). Stacked STRATA_HC_UPMIX=1: -> 2673 (+2.4%, CHECK gate rel RMS ~3e-07). STRATA_HCD_EXACT=1 cleanly declines here (table gives solution 542, not 1176/1177). Running total on this box across the campaign: 1586 -> 2676 @32K (+69%). Suggest a docs line that HIP_WMMA is what selects the WMMA prompt-attention on gfx11 — easy to miss since SELECT_WMMA sounds like the same thing.
@Vop3p commented on GitHub (Oct 9, 2026):
From a 2x RX 6900 XT (gfx1030, Linux, ROCm 10.0) layer split, a few things that moved the numbers there and are not gfx1030-specific in mechanism, so they may be worth an A/B on gfx1100 (the numbers are in #1657 and the two earlier reports from this box):
STRATA_SH_STREAM=1: on gfx1030 the shared-expert stream fork on is +5-9% decode, the opposite of the #816 result that made it default-off. Your +21% went the other way, so it is card-dependent either way - worth measuring rather than taking the default.--spec 3 --spec-min-p 0.7 --pipeline-windows 2together is +19 / +20 / +11% decode at 4K / 32K / 128K on the split (64.7 → 77.2, 68.8 → 82.3, 68.3 → 75.7 tok/s); each alone had measured neutral or worse (a 16-point spec × min-p grid at pipeline-windows 1, and pipeline-windows 2 with the default draft). The shorter draft is accepted 83% instead of 68%, so the speculative second window hits. Greedy output differs between server starts with it on.layer_splitby hand: the auto split point moved 32K decode by 8% here (layers 0-24/25-47 against 0-26/27-47, same binary; the larger second-card cache was the slower one). A sweep of a few split points is cheap.rocprofv3 --kernel-traceon a short prompt and look at GPU time per GEMM shape, not per kernel name.Developed with an AI coding assistant; every number above was measured on 2x RX 6900 XT (gfx1030, PCIe 4.0 x8 each) / Ryzen 5 5600X, ROCm 10.0.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.