[Engine] gfx1201: fused prompt experts (default since 0.2.15) hang prompt reading on IQ3_XXS; still on 0.2.22
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp
- 領域
- backend, performance
調査の方向性
Start by tracing the gfx12 fused prompt experts enabled by default for IQ3_XXS and the prompt reading path reported at layer 18; compare behavior with STRATA_PF_FUSED=0. Reproduce on gfx1201 with the supplied long-prompt setup and logs, then isolate the fused gate/up and staged fused entry if the build allows it. Done when the fused path completes repeated runs without stalls while retaining its speed benefit.
索引モデルが issue の本文から書いたものです。
説明
Area: [Engine]
Desktop app, Terminal or source? Source (setup.sh or a build)
Reproduction status: Reproduced locally
What happened
Since 0.2.15, long prompts on my RX 9070 XT sometimes freeze in the middle of a prompt chunk. The GPU's work stays "still running", the host is idle, and after 60 s the watchdog restarts the engine (issue #29 path). Shorter freezes of ~30 s also happen. They recover by themselves and leave nothing in the log; you only see them as a drop in the prompt speed, for example one 33K prompt at 782 tok/s while the other two ran at ~3,170.
It comes from the gfx12 fused prompt experts that 0.2.15 turned on by default for IQ3_XXS on Linux (96fef73d2 / 5410b3bc0):
-
0.2.12 (engine 0.1.58), with no fused kernels: never stalled, across all my runs since 2026-11-07.
-
0.2.15 (0.1.61), 0.2.19 (0.1.65) and 0.2.22 (0.1.69), fused at the default: every one stalls within the first benchmark run.
-
0.2.19 with
**STRATA_PF_FUSED=0**: a full run with 0 stalls. The log then says "every chunk runs 48 of 48 layers on the int8 kernels".
0.2.22 still stalls, even with the gfx12 LDS wait + barrier in nw_barrier() (#6515) and DEBUG_HIP_DYNAMIC_QUEUES=0 (both in 0.2.20). Its log says "chunks of 3072 tokens or more run 48 of 48 layers on the fused kernels; shorter chunks run 48 on the staged fused entry."
When it runs, the fused path is clearly faster here: about +10% at 4K, +15% at 32K and +20% at 130K over 0.2.12. So I'd much rather see it fixed than turned off.
Same-day numbers (prefill tok/s, 3 reps from a fresh service restart, community RX 9070 benchmark.py):
prompt
0.2.12
0.2.22 (default)
| prompt | 0.2.12 | 0.2.22 (default) | 0.2.19 STRATA_PF_FUSED=0 |
|---|---|---|---|
| 2K | 1,459 | ~1,470 | 1,522 |
| 4K | 1,971 | ~2,165 | 1,868 |
| 32K | 2,751 | 3,170 / 782 / 3,165 | 2,537 |
| 130K | 2,773 | 3,335, then a 60 s stall + engine restart | 2,479 |
| stalls | 0 | 1 freeze + 1 restart | 0 |
Things I ruled out:
-
Same ROCm on every version. The ROCm wheels in the venv (7.10.0a20251120) date from 2026-10-06 and never changed, so the stable and the stalling engines ran on the same ROCm.
-
Not disk or memory. Every report shows 0 threads in D state, 0 swap, several GB of RAM available, and the expert pool parked with all jobs done.
-
NUMA balancing is off (
kernel.numa_balancing=0, one node), so #4866 does not apply. -
The hang moves around. It has stopped at layers 41, 28, 19 and 18, in chunks starting at tokens 0, 64984 and 113764.
Smallest steps that reproduce it
-
RX 9070 XT on Linux, Qwen3.8-Flash-Next IQ3_XXS,
--max-context 131072 --prefill auto, everything else at the defaults (the engine command is below). -
Send ~130K-token prompts a few times (I use the community RX 9070
benchmark.py: lengths 2048, 4096, 32768 and 128000, 3 reps each, plus needles at 128K). -
Within one run I get at least one stall; the 60 s ones are in the log as
no progress for 60 s. -
Set
STRATA_PF_FUSED=0and the same run is clean.
Strata version
0.2.22 (engine 0.1.69), built from source. Also seen on 0.2.15 (0.1.61) and 0.2.19 (0.1.65). Fine on 0.2.12 (0.1.58).
Graphics card, memory and system
-
Card: AMD Radeon RX 9070 XT, 16 GB (gfx1201)
-
CPU and RAM: Ryzen 9 9950X3D, 62 GB of RAM
-
OS: Arch Linux, kernel 7.3.6 (also seen on 7.3.4 and 7.3.5)
-
Drivers: linux-firmware-amdgpu 20261019, mesa 26.3.1, ROCm wheels 7.10.0a20251120
-
Memory settings: THP
always, no hugetlb pages (vm.nr_hugepages=0)
Model, size and settings
Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS, with MTP (spec 4). Context 131072, KV int8. Pictures are on, read by the CPU reader. Started by the Terminal's server:
strata --serve --pack <data>/packs/iq3_xxs --native <data>/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf <data>/models/IQ3_XXS/Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00002-of-00002.gguf --expert-profile <terminal>/data/expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp <data>/mtp/rt --max-context 131072 --kv int8 --vision --vram-reserve-mib 3072
The engine picked: prompt chunk auto 16384 tokens with a 96-slot ring, expert cache 3593 slots (5.86 GiB), and the prompt path borrowing 3148 cache slots.
Logs
The stall report from 0.2.22 (engine 0.1.69):
strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 18 of the prompt chunk from token 64984) - stopping the engine so the server starts it again (issue #29) strata serve: stall report (engine 0.1.69): stage "reading the prompt (batched): layer 18 of the prompt chunk from token 64984" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow) VRAM free when this request began: 3132 MiB the prompt's GPU work (GPU 0) was still running expert pool: epoch 82149, batch epoch 82149: 98 of 98 jobs claimed, 98 done; 15 of 15 workers parked, 15 sleeping; mode 0 expert pool threads: w0..w14=sleeping; host idle for 80165 ms verify window (last window, not the current stage): 4 tokens at position 130227, host at layer step 48; the GPU rang 48; flags: served 48, plan (A) 48, copies (B) 48 threads waiting on the disk (state D): 0 of 44 memory: 48667 MiB resident, 0 MiB in swap, 5741 MiB RAM available; 9 major page faults so far GPU work paused by the graphics driver: 4016 ms since the engine started, 161 ms in this request (the AMD driver pauses all of the engine's GPU work while Linux moves memory the GPU uses) 2 s later: the prompt's GPU work (GPU 0) was still running (unchanged: pool parked, host idle for 82165 ms, 0 in D, 0 ms paused by the driver in the last 2 s) strata: released the verify window's GPU waits (#267): the GPU finished in 0 ms
The earlier ones (same signature each time):
stall report (engine 0.1.61): stage "reading the prompt (batched): layer 41 of the prompt chunk from token 0" for 60 s stall report (engine 0.1.65): stage "reading the prompt (batched): layer 28 of the prompt chunk from token 64984" for 60 s stall report (engine 0.1.65): stage "reading the prompt (batched): layer 19 of the prompt chunk from token 113764" for 60 s
I'm happy to run a debug build, an env switch or a branch on this card. If there's a way to turn the fused gate/up and the staged fused entry on separately, I can test each one alone to narrow it down.
- 主要言語
- C++
- スター
- 11.6k
- フォーク
- 1k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Niko1221/Strata のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Niko1221/Strata#7365 · コメント 2 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 4 日以内に返信
-
[GUI] Engine chip: move the breathing status dot to the right end of the quant line, inside the chipオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 4 日以内に返信
-
[GUI] The top horizontal stroke of 更 in the sidebar footer is never drawn (Windows, 125% scaling)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Niko1221/Strata#7276 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Niko1221/Strata#7230 · コメント 1 件 ·
メンテナーはふだん 4 日以内に返信
Niko1221/Strata の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
`test_controlled_TermSequenceBox_logging` and `test_symbolic_ops` fail when another test runs firstオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Quantinuum/tket#2282 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
KhronosGroup/Vulkan-Tutorial#555 ·
メンテナーはふだん 10 日以内に返信
-
Server crashes when a mob dies to poison対応中かも @joelstiller が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
DarkCastleMUD/DarkCastle#305 ·
メンテナーはふだん 1 日以内に返信
-
[Issue]: RAS status report lists the wrong pids for an outlier node対応中かも @bhargavchintam が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 2 日以内に返信