mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4958] [Engine] gfx1100: turn on the matrix-core prompt set by default for long prompts? #2283
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#2283
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 @vivienfanghuagood on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4958
Area
[Engine] (speed, kernels, models, the server and API)
What do you want to do?
The gfx11 matrix-core prompt switches are the default on the Radeon 780M (
STRATA_IGPU_PROMPT_SET) and on Windowsgfx1151, and
STRATA_HIP_WMMAis the default on gfx12 Linux. On a discrete gfx1100 card they are all still opt-in. On aRadeon PRO W7900D (gfx1100, 48 GB) the set below reads an 8K prompt 1.43 times faster, and decode does not change. I would
like to ask whether you would take it as a gfx1100 default, kept to long prompts by
STRATA_PF_SWITCH_MIN_T=4096. If the whole set moves the answers too much (numbers below),STRATA_HIP_WMMAalone gives most of the gain at 8K. Which quality gate do you want it to pass? I can run that gate onthis card and send the numbers here before any pull request.
Measured on Qwen3.8-Flash-Next IQ3_S (ISTA-DASLab GSQ-RCO),
--kv int8, the configsetup.shwrites for this card(
--expert-cache auto,--prefill auto, MTP draft), one request at a time, 256 output tokens, wikitext-103 prompts with noshared prefix. The two settings alternated in two rounds (separate engine starts), and the table gives the medians:
Quality:
First-token KL against the default. I used 12 wikitext prompts of 1K to 24K tokens (two each at 1K, 4.6K, 8K, 12K,
16K and 24K), took the first generated position, and computed KL over the default run's top 20 tokens from the server's
top_logprobs. Repeating a setting gives KL 0 exactly.STRATA_HIP_WMMAaloneSTRATA_PF_GEMMaloneSTRATA_GDN_CHUNKEDaloneSTRATA_HC_UPMIXaloneSTRATA_PA_FASTaloneThe one top-1 difference is the same 24K prompt in every row. Its two best tokens are close (log-probabilities near
-1.5), and each switch on its own flips it.
STRATA_PA_FASTchanges nothing withoutSTRATA_HIP_WMMA. So the set movesthe first token about twice as much as the hipBLASLt table does on the same prompts. You report 0.016 for the table on an
R9700, which suggests this method is on a similar scale to yours. For
STRATA_GDN_CHUNKEDI measure 0.019, against your0.004 to 0.007 on the RX 7900 XTX. I do not know whether the prompts or the card explain that difference.
GSM8K (200 questions, greedy, thinking off). With this set plus
STRATA_HC_Q8=1, the score is 97.5%, the same asthe default. 198 of 200 final answers are identical. GSM8K prompts are shorter than 4,096 tokens, so this checks only
STRATA_HIP_WMMA,STRATA_GDN_CHUNKEDandSTRATA_HC_Q8, not the three switches thatSTRATA_PF_SWITCH_MIN_Tgates.System: Radeon PRO W7900D 48 GB (gfx1100), 2x EPYC 9334, 1 TB RAM, Ubuntu 24.04 (kernel 6.8), ROCm 7.2.1, built from
source at
c62d5e3(v0.2.9) with the fix from #4867. The shippedgfx1100-hipblaslt-100202.txttable was used, since thesystem hipBLASLt is 1.2.2.
What I did not check: a 24 GB RX 7900 XTX, where the expert cache is smaller and the prompt streams more experts; Windows;
prompts longer than 8K for the speed numbers;
STRATA_SELECT_WMMAandSTRATA_PF_FUSED, which I left out.Related threads: #1386 (closed in the tracker clean-up) has earlier gfx1100 numbers for the same switches on RX 7900 XT and
XTX cards, in the same direction. #4408 (open) fixes a crash when
STRATA_GDN_CHUNKED=1is combined withSTRATA_KVA=1,so
STRATA_GDN_CHUNKEDshould not become a default before that is in. #2706 (open) showsSTRATA_HC_UPMIXcorrupting thegfx12 stage of a gfx11 + gfx12 layer split, so a gfx1100 default would have to be decided per device, not per process.
What do you do today instead?
Set the variables above by hand in the engine config.
@tskorupka-emiteo commented on GitHub (Nov 5, 2026):
Data point for the case this issue lists as unchecked: a 24 GB RX 7900 XTX, where the expert cache is smaller and the prompt streams more experts.
System
linux-x86_64-hip-rx7900(bundled hipBLASLt, tablegfx1100-hipblaslt-100200).--max-context 262144 --kv int8 --kv-resident 32768 --prefill auto:32768, DFlash2--spec 6 --draft-conf 0.5,--expert-cache auto(10,712 slots).Set:
STRATA_PF_GEMM=1 STRATA_HC_UPMIX=1 STRATA_PA_FAST=1 STRATA_HIP_WMMA=1 STRATA_GDN_CHUNKED=1 STRATA_PF_SWITCH_MIN_T=4096. The engine log confirmsSTRATA_HIP_WMMA: the prompt attention on matrix cores on (gfx1100).MIN_T, as expected)Medians of 2 runs per cell; the "without" column is the same start minus the set.
strata-qwen38-thinking-v1-draft.1with the set: 12 of 12 sanity checks; prompt-16k 2,029 tok/s against 1,383 at launch defaults; TTFT at 16K 8.11 s against 11.88.STRATA_PREFILL_TIMING=1, ~52K-54K-token prompt):qsa attnfell from 9,045 ms (25.6%) to 1,355 ms (5.8%), and the whole GPU timeline from 35.3 s to 23.5 s. The expert GEMMs (gemm gate/up+gemm down) are now 53% of prefill.I did not run a KL or GSM8K gate on this card; your numbers above are the quality evidence I relied on.