mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#1297
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 @jiayeZhu on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3204
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
On a layer split across a Radeon 8060S (gfx1151, Strix Halo iGPU) and a Radeon AI PRO R9700 (gfx1201), 0.2.0-beta reads
long prompts about 25% slower than 0.1.45: 1,250 against 1,710 tok/s at 64K. That is about the speed of the 8060S
alone, so the second GPU stops helping. I expected 0.1.45's speed.
A
git bisectbetween v0.1.45 and v0.2.0-beta lands onf3be9743, "prefill: warm the first BF16 and FP16 hipBLASproducts on a thread at start (STRATA_PREFILL_WARM=0 skips)". Setting
STRATA_PREFILL_WARM=0on 0.2.0-beta bringsprompt reading back to 0.1.45's speed. Decode is not affected.
The 8060S alone (R9700 hidden with
ROCR_VISIBLE_DEVICES) is not affected either: 0.1.45 and 0.2.0-beta both read 64Kat about 1,220-1,230 tok/s there. So this looks specific to the multi-GPU split.
Prompt reading in tok/s, two runs each, one request at a time:
STRATA_PREFILL_WARM=0With the warm-up off, 0.2.0-beta is a little faster than 0.1.43.1 at 128K and 211K (+4-5%). A second 64K pair on the
same engine, with prompts it had not seen, read at 1,709 / 1,677.
Ruled out on 0.2.0-beta:
STRATA_COLD_OVERLAP=0 STRATA_IO_PREFETCH=0 STRATA_IO_PF_GATE=0, 64Kaveraged 1,261 tok/s against 1,244 with them on (two fresh engines each).
read 64K at 1,193-1,275 tok/s, so the drop is not random from engine to engine.
Workaround: set
STRATA_PREFILL_WARM=0. The only cost is the one-time hipBLAS load (1-2.5 s) on the first request.Not tested:
Smallest steps or command that reproduce it
Build one engine for both GPUs, out of tree:
-DSTRATA_ENABLE_HIP=ON -DSTRATA_PREFILL_MMQ=ON -DCMAKE_HIP_ARCHITECTURES="gfx1151;gfx1201", HIP flags-DSTRATA_W_LB=8, ggml at the pinned 3cf03257.Start
serve/server.pywith a two-GPU layer split: 8060S first,layer_split30 (layers 0-29 on the 8060S, 30-47 onthe R9700), 4 slots. The engine arguments:
The environment:
The experts are 100% resident: the engine reports "layer split: 100% of the experts resident".
Send a 16K warm-up request, then a 64K prompt: Python standard-library source cut to 64K tokens, plus a short question.
Temperature 0, 600 tokens out, one request at a time.
Compare the prompt reading speed with and without
STRATA_PREFILL_WARM=0, each on a fresh engine. Prompt tok/s isprompt tokens divided by the time to first token, measured on the client. These figures match the engine's own
"strata serve: prompt N tokens ... read in X ms" lines.
Every build in this report carries one small local patch, needed for this split on every version tested. Without it the
gfx1201 stage exits on the first prompt with "prefill gemm: a padded X (ldx 6208, K 6144) needs STRATA_PF_PAD's path".
The cause:
STRATA_PF_PADis a gfx1151 default, applied process-wide from GPU 0, but the padded GEMM exists only forgfx11. The patch asks the current device instead (8 lines, 4 files:
Gemm::native, the twold_y/ld_asites inPrefill::run_impl, andstrata_pf_pad_device()inwmma_gemm). Without the patch,STRATA_PF_PAD=0is theworkaround, at 2-3% slower prompts. Happy to send the diff.
Bisect. Each step: build the commit (with the PF_PAD patch above), start a fresh engine with the launch above, then
read 64K twice. A step is good if its best run is at least 1,450 tok/s. There were no ambiguous steps and none were
skipped.
417cbab483cde2cac765c5f87) into f-split-int280e6d91aa6759787c' into f-split-int83aa59fdaf3770c62053388dc, without the IQ2 fused default) into f-split-int20e58a6523980a5ceaef32e22f3be974379ac3164Reproduction status
Reproduced locally
Strata version
Strata 0.2.0-beta (tag v0.2.0-beta, engine 0.1.45.3), built from source. First bad commit:
f3be9743. Last good:79ac3164.Graphics card, memory and system
Radeon 8060S (gfx1151, AMD Ryzen AI MAX+ 395, 1 GB carve-out + 120 GB GTT) + Radeon AI PRO R9700 32 GB (gfx1201, as an eGPU; the engine's PCIe probe: 7.2 GB/s host to device) · 128 GB RAM · Ubuntu 26.04.1, kernel 7.0.0-38, ROCm 7.14.1 built for both architectures, hipBLASLt 1.4.1 (version 100401)
Model, size and settings
Qwen3.8-Flash-Next UD-IQ4_XS (unsloth, native pack) · 262K context · int8 KV · MTP drafter · 4 slots · pictures on (CPU reader)
Logs
With the warm-up on, every start prints this sequence:
STRATA_PREFILL_TIMING=1at 64K shows where the time goes. The two stages report differently: one reads in 4,096-tokenchunks, the other in blocks of about 32K tokens (two per 64K prompt). These figures compare 0.1.43.1 with 0.2.0-beta, so
other changes between those versions are in them too:
aef32e22)With 0.2.0-beta, the 4,096-token chunk lines dropped from about 1.55 s to 0.49 s each. The ~32K-block stage became the
bottleneck instead, and most of its growth is in
hc read.On the 0.2.0-beta engine run with timing, the first 64K request after the start also spent 72.8 s in "ple" (525 tok/s);
its second request read at 1,207 tok/s. The other fresh 0.2.0-beta engines read their first 64K at their usual ~1,250.
Not checked whether this is related.
I did not find the mechanism. As far as I can see, the hipBLASLt tuning state is per
Gemm(create_hipblaslt_state),so the obvious shared-state suspect does not seem to apply. Where the warm-up is called:
warm_gemm_libraries()insrc/prefill/prefill.cpp.std::threadinsrc/program/generate.cpp, started before the expert arena loads.Prefill::init(once per device).@github-actions[bot] commented on GitHub (Oct 19, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 19, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Oct 20, 2026):
Thanks, STRATA_PREFILL_WARM=0 was the right pointer. The start-up warm-up product that runs on every card now runs only when all visible cards have the same architecture, so your gfx1151 + gfx1201 split skips it. We have no mixed pair: on two R9700 (same architecture) the warm-up changes nothing (3,855 against 3,853 tok/s, 5 pairs), so the effect is tied to the mix and we rely on your A/B. The cost on a mixed pair is the 1 to 2.5 s library load on the first request. Please test 0.2.1 without the variable; STRATA_PREFILL_WARM=1 / 0 still overrides.
This is in Strata 0.2.1: https://github.com/Niko1221/Strata/releases/tag/v0.2.1
@jiayeZhu commented on GitHub (Oct 20, 2026):
Confirmed fixed on 0.2.1, tested without the variable. Thanks for the quick turnaround.
The setup is the same as in the report: 8060S (gfx1151) as GPU 0 for layers 0-29 and R9700 (gfx1201) for layers
30-47, the same engine arguments and environment, and a fresh engine per row. The build is v0.2.1 (
90767252) withgfx1151;gfx1201in one binary. It carries the same local PF_PAD patch as the report; the patch still applies cleanly,and I did not re-test 0.2.1 without it.
At start the engine prints:
Prompt reading in tok/s, two runs each, one request at a time:
STRATA_PREFILL_WARMSTRATA_PREFILL_WARM(second engine)STRATA_PREFILL_WARM=1STRATA_PREFILL_WARM=0(same hour)matches what 0.2.0-beta with
STRATA_PREFILL_WARM=0read yesterday (1,658 / 1,618 and 1,559 / 1,548).STRATA_PREFILL_WARM=1brings the slowdown back exactly (1,256 / 1,237, as on 0.2.0-beta). The override works, andthe warm-up alone explains the loss.
warm-up forced on.
Fine to close from my side.