[Engine] gfx1201: fused prompt experts (default since 0.2.15) hang prompt reading on IQ3_XXS; still on 0.2.22
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- backend, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 11.6k
- Fork
- 1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Niko1221/Strata
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Niko1221/Strata#7365 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày
-
[GUI] Engine chip: move the breathing status dot to the right end of the quant line, inside the chipĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 4 ngày
-
[GUI] The top horizontal stroke of 更 in the sidebar footer is never drawn (Windows, 125% scaling)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Niko1221/Strata#7276 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Niko1221/Strata#7230 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của Niko1221/Strata
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`test_controlled_TermSequenceBox_logging` and `test_symbolic_ops` fail when another test runs firstĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Quantinuum/tket#2282 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
KhronosGroup/Vulkan-Tutorial#555 ·
Maintainer thường phản hồi trong vòng 10 ngày
-
Server crashes when a mob dies to poisonCó thể đã có người làm @joelstiller đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DarkCastleMUD/DarkCastle#305 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Issue]: RAS status report lists the wrong pids for an outlier nodeCó thể đã có người làm @bhargavchintam đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày