[GH-ISSUE #4958] [Engine] gfx1100: turn on the matrix-core prompt set by default for long prompts? #2283

Open
opened 2026-11-04 01:58:09 +07:00 by bsakaguchi · 1 comment
Owner

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 Windows
gfx1151, and STRATA_HIP_WMMA is the default on gfx12 Linux. On a discrete gfx1100 card they are all still opt-in. On a
Radeon 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_WMMA alone gives most of the gain at 8K. Which quality gate do you want it to pass? I can run that gate on
this card and send the numbers here before any pull request.

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

Measured on Qwen3.8-Flash-Next IQ3_S (ISTA-DASLab GSQ-RCO), --kv int8, the config setup.sh writes for this card
(--expert-cache auto, --prefill auto, MTP draft), one request at a time, 256 output tokens, wikitext-103 prompts with no
shared prefix. The two settings alternated in two rounds (separate engine starts), and the table gives the medians:

Prompt TTFT default TTFT with the set TPOT default TPOT with the set
1K 1.49 s 1.36 s 15.4 ms 15.5-16.2 ms
8K 6.15 s 4.30 s 15.3-15.9 ms 15.0-16.1 ms

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.

    Setting Mean KL Max KL Same top-1 8K TTFT
    The whole set 0.026 0.124 11 / 12 4.32 s
    STRATA_HIP_WMMA alone 0.021 0.083 11 / 12 4.86 s
    STRATA_PF_GEMM alone 0.020 0.107 11 / 12 6.08 s
    STRATA_GDN_CHUNKED alone 0.019 0.051 11 / 12 6.02 s
    STRATA_HC_UPMIX alone 0.016 0.046 11 / 12 6.62 s
    STRATA_PA_FAST alone 0 0 12 / 12 6.15 s
    For scale: the default without the gfx1100 hipBLASLt table 0.013 0.033 12 / 12 11.6 s
    Default 6.14 s

    The 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_FAST changes nothing without STRATA_HIP_WMMA. So the set moves
    the 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_CHUNKED I measure 0.019, against your
    0.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 as
    the 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_CHUNKED and STRATA_HC_Q8, not the three switches that STRATA_PF_SWITCH_MIN_T gates.

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 shipped gfx1100-hipblaslt-100202.txt table was used, since the
system 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_WMMA and STRATA_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=1 is combined with STRATA_KVA=1,
so STRATA_GDN_CHUNKED should not become a default before that is in. #2706 (open) shows STRATA_HC_UPMIX corrupting the
gfx12 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.

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 Windows gfx1151, and `STRATA_HIP_WMMA` is the default on gfx12 Linux. On a discrete gfx1100 card they are all still opt-in. On a Radeon 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_WMMA` alone gives most of the gain at 8K. Which quality gate do you want it to pass? I can run that gate on this card and send the numbers here before any pull request. ```sh 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 ``` Measured on Qwen3.8-Flash-Next IQ3_S (ISTA-DASLab GSQ-RCO), `--kv int8`, the config `setup.sh` writes for this card (`--expert-cache auto`, `--prefill auto`, MTP draft), one request at a time, 256 output tokens, wikitext-103 prompts with no shared prefix. The two settings alternated in two rounds (separate engine starts), and the table gives the medians: | Prompt | TTFT default | TTFT with the set | TPOT default | TPOT with the set | | ---: | ---: | ---: | ---: | ---: | | 1K | 1.49 s | 1.36 s | 15.4 ms | 15.5-16.2 ms | | 8K | 6.15 s | 4.30 s | 15.3-15.9 ms | 15.0-16.1 ms | 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. | Setting | Mean KL | Max KL | Same top-1 | 8K TTFT | | --- | ---: | ---: | ---: | ---: | | The whole set | 0.026 | 0.124 | 11 / 12 | 4.32 s | | `STRATA_HIP_WMMA` alone | 0.021 | 0.083 | 11 / 12 | 4.86 s | | `STRATA_PF_GEMM` alone | 0.020 | 0.107 | 11 / 12 | 6.08 s | | `STRATA_GDN_CHUNKED` alone | 0.019 | 0.051 | 11 / 12 | 6.02 s | | `STRATA_HC_UPMIX` alone | 0.016 | 0.046 | 11 / 12 | 6.62 s | | `STRATA_PA_FAST` alone | 0 | 0 | 12 / 12 | 6.15 s | | For scale: the default without the gfx1100 hipBLASLt table | 0.013 | 0.033 | 12 / 12 | 11.6 s | | Default | | | | 6.14 s | The 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_FAST` changes nothing without `STRATA_HIP_WMMA`. So the set moves the 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_CHUNKED` I measure 0.019, against your 0.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 as the 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_CHUNKED` and `STRATA_HC_Q8`, not the three switches that `STRATA_PF_SWITCH_MIN_T` gates. 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 shipped `gfx1100-hipblaslt-100202.txt` table was used, since the system 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_WMMA` and `STRATA_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=1` is combined with `STRATA_KVA=1`, so `STRATA_GDN_CHUNKED` should not become a default before that is in. #2706 (open) shows `STRATA_HC_UPMIX` corrupting the gfx12 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.
Author
Owner

@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

  • RX 7900 XTX 24 GB (gfx1100), Ryzen 7 7800X3D, 62 GB RAM, Arch Linux, kernel 7.2.
  • Strata 0.2.10 with the packaged engine 0.1.56 linux-x86_64-hip-rx7900 (bundled hipBLASLt, table gfx1100-hipblaslt-100200).
  • Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS, --max-context 262144 --kv int8 --kv-resident 32768 --prefill auto:32768, DFlash2 --spec 6 --draft-conf 0.5, --expert-cache auto (10,712 slots).
  • One request at a time, fresh prompts with no shared prefix, thinking off, greedy.

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 confirms STRATA_HIP_WMMA: the prompt attention on matrix cores on (gfx1100).

Prompt (fresh) Prefill without the set Prefill with the set
~12K 1,427 tok/s 1,987 tok/s (+39%)
~25-50K 1,503 tok/s 2,120 tok/s (+41%)
~50K 1,509 tok/s 2,141 tok/s (+42%)
~4K n/a 1,387 tok/s (under MIN_T, as expected)

Medians of 2 runs per cell; the "without" column is the same start minus the set.

  • Decode is unchanged: 92.0 tok/s with the set against 91.6 without (short prompt, 400 tokens, medians of 4-5).
  • Standard benchmark strata-qwen38-thinking-v1-draft.1 with 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.
  • Where the time went (STRATA_PREFILL_TIMING=1, ~52K-54K-token prompt): qsa attn fell 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.

<!-- gh-comment-id:6657048892 --> @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** - RX 7900 XTX 24 GB (gfx1100), Ryzen 7 7800X3D, 62 GB RAM, Arch Linux, kernel 7.2. - Strata 0.2.10 with the packaged engine 0.1.56 `linux-x86_64-hip-rx7900` (bundled hipBLASLt, table `gfx1100-hipblaslt-100200`). - Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS, `--max-context 262144 --kv int8 --kv-resident 32768 --prefill auto:32768`, DFlash2 `--spec 6 --draft-conf 0.5`, `--expert-cache auto` (10,712 slots). - One request at a time, fresh prompts with no shared prefix, thinking off, greedy. **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 confirms `STRATA_HIP_WMMA: the prompt attention on matrix cores on (gfx1100)`. | Prompt (fresh) | Prefill without the set | Prefill with the set | | ---: | ---: | ---: | | ~12K | 1,427 tok/s | 1,987 tok/s (+39%) | | ~25-50K | 1,503 tok/s | 2,120 tok/s (+41%) | | ~50K | 1,509 tok/s | 2,141 tok/s (+42%) | | ~4K | n/a | 1,387 tok/s (under `MIN_T`, as expected) | Medians of 2 runs per cell; the "without" column is the same start minus the set. - **Decode is unchanged**: 92.0 tok/s with the set against 91.6 without (short prompt, 400 tokens, medians of 4-5). - **Standard benchmark** `strata-qwen38-thinking-v1-draft.1` with 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. - **Where the time went** (`STRATA_PREFILL_TIMING=1`, ~52K-54K-token prompt): `qsa attn` fell 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.
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#2283
No description provided.