[GH-ISSUE #2210] [Bug]: Windows HIP gfx1031: prompt reading ~30 % slower on the 0.1.43 engine than 0.1.40 (same model and server) #878

Closed
opened 2026-11-04 01:46:42 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @huy-sec on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2210

What happened

After updating from 0.1.40 to 0.1.43, prompt reading (prefill) is about 30 % slower on this card. Decode is unchanged. Running the 0.1.40 engine under the 0.1.43 server, same model, same prompts, brings the speed back, so the change is in the engine.

Method. One server start per setting, a short warm-up, then three fresh prompts (~16k, ~19k, ~16k tokens; non-overlapping slices of Markdown text, a unique first line so nothing is reused, max_tokens: 1). Speed is taken from the engine's prompt N tokens = 0 reused + N read in T ms line. The same slices in the same order for every setting. E–H ran back to back in alternating order, so file-cache warmth or background load can't favour one engine.

Run Model Engine Setting Read tok/s
A Swift 1.5 IQ2_XS 0.1.43 as set up 393, 303, 381
B Swift 1.5 IQ2_XS 0.1.43 --ple-io direct, STRATA_WATCHDOG_S=900 396, 386, 388
C1 IQ3_XXS 0.1.43 as set up 384, 380, 394
C2 IQ3_XXS 0.1.40 as set up 560, 541, 592
D Swift 1.5 IQ2_XS 0.1.40 as set up 530, 525, 554
E Swift 1.5 IQ2_XS 0.1.43 rematch 397, 386, 396
F Swift 1.5 IQ2_XS 0.1.40 rematch 525, 524, 553
G Swift 1.5 IQ2_XS 0.1.43 rematch 398, 383, 395
H Swift 1.5 IQ2_XS 0.1.40 rematch 524, 492, 533
I Swift 1.5 IQ2_XS 0.1.43 --prefill 8192 421, 393, 444

Request history on this PC agrees: fresh prompts of 4k+ tokens read at a median 540–578 tok/s on 0.1.40 in every size bucket (160 requests), and 303–395 on 0.1.43 (42 requests).

Ruled out

  • PLE reads: 0.1.43 usually measures the drive at ~18–34 MB/s random 4 KiB and switches to --ple-io mmap. Forcing direct (run B, watchdog raised so a slow first read can't trip it) changes nothing, and in the rematch (E, G) its probe kept direct on its own: still ~395.
  • Mostly not the Windows HIP prompt-chunk cap (#1630): 0.1.40 reads in 8192-token chunks, 0.1.43 in 6144. Giving 0.1.43 8192 chunks (run I) recovers a little (~420 against ~395), far short of 0.1.40's ~525; --prefill 7168 earlier measured about the same as 6144.
  • The Stager's sleeping waits (bc089d5d): Linux-only since 2a8cdedd.
  • ROCm: both engines built against the same ROCm, identical DLLs.

Same model on both engines: decode 39.2 vs 39.3 tok/s, and the same answers on a small set of tool-use, coding and log tasks.

Settings (from setup): --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 131072 --kv int8 --kv-resident 32768, env STRATA_HIP_PROMPT_F16=1.

I can bisect v0.1.40..v0.1.43 on this card, or run a build with diagnostics, if that helps.

Strata version, GPU, OS

Server 0.1.43 (7695859a); engines 0.1.43 and 0.1.40, both self-built with tools\hip\build_windows.bat, STRATA_HIP_ARCHS=gfx1031, ROCm 10.2.0a20260930 · RX 6700 XT 12 GB (gfx1031) · Ryzen 5 5500, 64 GB RAM · Windows 11 Pro (26200)

Engine log

0.1.43 (run E), start and prompt lines (generation part trimmed):

strata generate: the SSD is kept awake while rows are read: one page of the table after 100 ms without a read, until 60 s after the last request (STRATA_SSD_KEEPALIVE=0 turns it off)
strata generate: CPU pool tasks/phase: 18 (automatic), participating threads: 6
strata generate: session is up (engine 0.1.43)
strata serve: prompt chunk auto: 6144 tokens, a 384-slot ring
strata serve: prompt 16408 tokens = 0 reused + 16408 read in 41324 ms (397.1 tok/s)
strata serve: prompt 18690 tokens = 0 reused + 18690 read in 48407 ms (386.1 tok/s)

0.1.40 (run F), the same prompts:

strata generate: the SSD is kept awake while rows are read: one page of the table after 100 ms without a read, until 60 s after the last request (STRATA_SSD_KEEPALIVE=0 turns it off)
strata generate: session is up (engine 0.1.40)
strata serve: prompt chunk auto: 8192 tokens, a 384-slot ring
strata serve: prompt 16408 tokens = 0 reused + 16408 read in 31251 ms (525.0 tok/s)
strata serve: prompt 18690 tokens = 0 reused + 18690 read in 35677 ms (523.9 tok/s)
strata serve: prompt 16234 tokens = 0 reused + 16234 read in 29373 ms (552.7 tok/s)
Originally created by @huy-sec on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2210 ### What happened After updating from 0.1.40 to 0.1.43, prompt reading (prefill) is about 30 % slower on this card. Decode is unchanged. Running the **0.1.40 engine under the 0.1.43 server**, same model, same prompts, brings the speed back, so the change is in the engine. **Method.** One server start per setting, a short warm-up, then three fresh prompts (~16k, ~19k, ~16k tokens; non-overlapping slices of Markdown text, a unique first line so nothing is reused, `max_tokens: 1`). Speed is taken from the engine's `prompt N tokens = 0 reused + N read in T ms` line. The same slices in the same order for every setting. E–H ran back to back in alternating order, so file-cache warmth or background load can't favour one engine. | Run | Model | Engine | Setting | Read tok/s | |---|---|---|---|---| | A | Swift 1.5 IQ2_XS | 0.1.43 | as set up | 393, 303, 381 | | B | Swift 1.5 IQ2_XS | 0.1.43 | `--ple-io direct`, `STRATA_WATCHDOG_S=900` | 396, 386, 388 | | C1 | IQ3_XXS | 0.1.43 | as set up | 384, 380, 394 | | C2 | IQ3_XXS | **0.1.40** | as set up | **560, 541, 592** | | D | Swift 1.5 IQ2_XS | **0.1.40** | as set up | **530, 525, 554** | | E | Swift 1.5 IQ2_XS | 0.1.43 | rematch | 397, 386, 396 | | F | Swift 1.5 IQ2_XS | **0.1.40** | rematch | **525, 524, 553** | | G | Swift 1.5 IQ2_XS | 0.1.43 | rematch | 398, 383, 395 | | H | Swift 1.5 IQ2_XS | **0.1.40** | rematch | **524, 492, 533** | | I | Swift 1.5 IQ2_XS | 0.1.43 | `--prefill 8192` | 421, 393, 444 | Request history on this PC agrees: fresh prompts of 4k+ tokens read at a median 540–578 tok/s on 0.1.40 in every size bucket (160 requests), and 303–395 on 0.1.43 (42 requests). **Ruled out** - PLE reads: 0.1.43 usually measures the drive at ~18–34 MB/s random 4 KiB and switches to `--ple-io mmap`. Forcing `direct` (run B, watchdog raised so a slow first read can't trip it) changes nothing, and in the rematch (E, G) its probe kept `direct` on its own: still ~395. - Mostly not the Windows HIP prompt-chunk cap (#1630): 0.1.40 reads in 8192-token chunks, 0.1.43 in 6144. Giving 0.1.43 8192 chunks (run I) recovers a little (~420 against ~395), far short of 0.1.40's ~525; `--prefill 7168` earlier measured about the same as 6144. - The Stager's sleeping waits (bc089d5d): Linux-only since 2a8cdedd. - ROCm: both engines built against the same ROCm, identical DLLs. Same model on both engines: decode 39.2 vs 39.3 tok/s, and the same answers on a small set of tool-use, coding and log tasks. Settings (from setup): `--expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 131072 --kv int8 --kv-resident 32768`, env `STRATA_HIP_PROMPT_F16=1`. I can bisect v0.1.40..v0.1.43 on this card, or run a build with diagnostics, if that helps. ### Strata version, GPU, OS Server 0.1.43 (7695859a); engines 0.1.43 and 0.1.40, both self-built with `tools\hip\build_windows.bat`, `STRATA_HIP_ARCHS=gfx1031`, ROCm 10.2.0a20260930 · RX 6700 XT 12 GB (gfx1031) · Ryzen 5 5500, 64 GB RAM · Windows 11 Pro (26200) ### Engine log 0.1.43 (run E), start and prompt lines (generation part trimmed): ``` strata generate: the SSD is kept awake while rows are read: one page of the table after 100 ms without a read, until 60 s after the last request (STRATA_SSD_KEEPALIVE=0 turns it off) strata generate: CPU pool tasks/phase: 18 (automatic), participating threads: 6 strata generate: session is up (engine 0.1.43) strata serve: prompt chunk auto: 6144 tokens, a 384-slot ring strata serve: prompt 16408 tokens = 0 reused + 16408 read in 41324 ms (397.1 tok/s) strata serve: prompt 18690 tokens = 0 reused + 18690 read in 48407 ms (386.1 tok/s) ``` 0.1.40 (run F), the same prompts: ``` strata generate: the SSD is kept awake while rows are read: one page of the table after 100 ms without a read, until 60 s after the last request (STRATA_SSD_KEEPALIVE=0 turns it off) strata generate: session is up (engine 0.1.40) strata serve: prompt chunk auto: 8192 tokens, a 384-slot ring strata serve: prompt 16408 tokens = 0 reused + 16408 read in 31251 ms (525.0 tok/s) strata serve: prompt 18690 tokens = 0 reused + 18690 read in 35677 ms (523.9 tok/s) strata serve: prompt 16234 tokens = 0 reused + 16234 read in 29373 ms (552.7 tok/s) ```
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks @huy-sec for the careful A/B. This looks like #2055: prompt reads on gfx103x about 30% slower since 0.1.40.2, decode unchanged. Our own change #1240 (in 0.1.40.2) stopped creating the MTP drafter's side stream on HIP. On gfx103x the stream's mere existence makes the prompt path's copies faster (RX 6800, Windows: 7.9K tokens 584-596 -> 798-808 tok/s with it). 0.1.43.1 creates it again on gfx103x, and STRATA_MTP_SIDE_STREAM=1 / =0 forces either way. Your 0.1.40 build is from before #1240, which is why swapping the binary restores the speed.

One more gfx103x prompt change between 0.1.40 and 0.1.43, the one your run I already found: Windows HIP caps a bare --prefill auto at 6144-token chunks (#1630, 0.1.42; your 0.1.40 read in 8192). --prefill auto:8192 takes it back if your card has the room.

Could you rerun your E-H rematch with an engine built from 0.1.43.1? If it is still below 0.1.40, run it again with STRATA_MTP_SIDE_STREAM=1 set explicitly, and then a bisect would be the next step.

<!-- gh-comment-id:6153513681 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks @huy-sec for the careful A/B. This looks like #2055: prompt reads on gfx103x about 30% slower since 0.1.40.2, decode unchanged. Our own change #1240 (in 0.1.40.2) stopped creating the MTP drafter's side stream on HIP. On gfx103x the stream's mere existence makes the prompt path's copies faster (RX 6800, Windows: 7.9K tokens 584-596 -> 798-808 tok/s with it). 0.1.43.1 creates it again on gfx103x, and `STRATA_MTP_SIDE_STREAM=1` / `=0` forces either way. Your 0.1.40 build is from before #1240, which is why swapping the binary restores the speed. One more gfx103x prompt change between 0.1.40 and 0.1.43, the one your run I already found: Windows HIP caps a bare `--prefill auto` at 6144-token chunks (#1630, 0.1.42; your 0.1.40 read in 8192). `--prefill auto:8192` takes it back if your card has the room. Could you rerun your E-H rematch with an engine built from 0.1.43.1? If it is still below 0.1.40, run it again with `STRATA_MTP_SIDE_STREAM=1` set explicitly, and then a bisect would be the next step.
Author
Owner

@huy-sec commented on GitHub (Oct 23, 2026):

Thanks, that was it. I built 0.1.45 for gfx1031 (same ROCm 10.2.0a20260930, tools\hip\build_windows.bat) and reran the A/B on the same RX 6700 XT, IQ3_XXS, same three fresh prompts (~16k, ~19k, ~16k tokens), STRATA_HIP_PROMPT_F16=1 in every run. I did not set STRATA_MTP_SIDE_STREAM explicitly, so this is the gfx103x default. (Each config also loads the experimental speed projection vector, off for every one of these requests.)

Prompt reading, tok/s:

Run Engine Settings Read
P0 0.1.40 as before 530, 536, 498
P1 0.1.45 default (--prefill auto = 6144 on Windows HIP) 570, 568, 614
P2 0.1.45 + STRATA_RDNA2_SGEMM=1 606, 566, 563
P3 0.1.45 + --prefill auto:8192 644, 575, 647
P4 0.1.45 + --spec 3 --suffix-draft 3, STRATA_VERIFY_COHERENT=1 STRATA_DOORBELL_STORE=1 660, 605, 660

So 0.1.45 at its defaults is already faster than 0.1.40, and auto:8192 adds about another 7%, as you said. STRATA_RDNA2_SGEMM=1 made no measurable difference here, presumably because STRATA_HIP_PROMPT_F16=1 already sends the prompt GEMMs down the tuned FP16 path.

Decode, alternating rematch, five ~400-token generations each (median): 0.1.40 33.2 tok/s, 0.1.45 with the P4 settings 34.2, the same with --spec 4 32.9.

Fine to close from my side. One side note in case it helps someone else: my first 0.1.45 build in a fresh folder failed on every .cu file with clang++: error: unsupported CUDA gpu architecture: gfx1031. The log began with 'vswhere.exe' is not recognized: vcvars64.bat couldn't find vswhere on PATH, CMake configured the HIP language without -x hip, and the sources went to clang as CUDA. Adding %ProgramFiles(x86)%\Microsoft Visual Studio\Installer to PATH and deleting build-hip-win fixed it.

<!-- gh-comment-id:6356890644 --> @huy-sec commented on GitHub (Oct 23, 2026): Thanks, that was it. I built 0.1.45 for gfx1031 (same ROCm 10.2.0a20260930, `tools\hip\build_windows.bat`) and reran the A/B on the same RX 6700 XT, IQ3_XXS, same three fresh prompts (~16k, ~19k, ~16k tokens), `STRATA_HIP_PROMPT_F16=1` in every run. I did not set `STRATA_MTP_SIDE_STREAM` explicitly, so this is the gfx103x default. (Each config also loads the experimental speed projection vector, off for every one of these requests.) Prompt reading, tok/s: | Run | Engine | Settings | Read | |---|---|---|---| | P0 | 0.1.40 | as before | 530, 536, 498 | | P1 | 0.1.45 | default (`--prefill auto` = 6144 on Windows HIP) | 570, 568, 614 | | P2 | 0.1.45 | + `STRATA_RDNA2_SGEMM=1` | 606, 566, 563 | | P3 | 0.1.45 | + `--prefill auto:8192` | 644, 575, 647 | | P4 | 0.1.45 | + `--spec 3 --suffix-draft 3`, `STRATA_VERIFY_COHERENT=1 STRATA_DOORBELL_STORE=1` | 660, 605, 660 | So 0.1.45 at its defaults is already faster than 0.1.40, and `auto:8192` adds about another 7%, as you said. `STRATA_RDNA2_SGEMM=1` made no measurable difference here, presumably because `STRATA_HIP_PROMPT_F16=1` already sends the prompt GEMMs down the tuned FP16 path. Decode, alternating rematch, five ~400-token generations each (median): 0.1.40 33.2 tok/s, 0.1.45 with the P4 settings 34.2, the same with `--spec 4` 32.9. Fine to close from my side. One side note in case it helps someone else: my first 0.1.45 build in a fresh folder failed on every `.cu` file with `clang++: error: unsupported CUDA gpu architecture: gfx1031`. The log began with `'vswhere.exe' is not recognized`: `vcvars64.bat` couldn't find vswhere on PATH, CMake configured the HIP language without `-x hip`, and the sources went to clang as CUDA. Adding `%ProgramFiles(x86)%\Microsoft Visual Studio\Installer` to PATH and deleting `build-hip-win` fixed it.
Author
Owner

@Niko1221 commented on GitHub (Oct 29, 2026):

Thank you for the careful A/B on 0.1.45. Closing: the gfx103x prompt slowdown was the MTP drafter's side stream (fixed in 0.1.43.1, #2055), and your numbers show 0.1.45 at its defaults above 0.1.40 (570/568/614 against 530/536/498 tok/s), with --prefill auto:8192 adding about 7% on top.

Release: https://github.com/Niko1221/Strata/releases/tag/v0.1.43.1

<!-- gh-comment-id:6491946824 --> @Niko1221 commented on GitHub (Oct 29, 2026): Thank you for the careful A/B on 0.1.45. Closing: the gfx103x prompt slowdown was the MTP drafter's side stream (fixed in 0.1.43.1, #2055), and your numbers show 0.1.45 at its defaults above 0.1.40 (570/568/614 against 530/536/498 tok/s), with `--prefill auto:8192` adding about 7% on top. Release: https://github.com/Niko1221/Strata/releases/tag/v0.1.43.1
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#878
No description provided.