mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5322] [Engine] HIP config on a host that also has NVIDIA cards: the start-time VRAM fit sizes the iGPU by the NVIDIA card and adds --kv-resident 4096 #3173
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#3173
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 @KTKR-DSK on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5322
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 Strix Halo host that also has two NVIDIA cards, a server config with
"backend": "hip"and"gpu": 0(the Radeon 8060S) is sized by the start-time VRAM fit as if it ran on a 16 GB NVIDIA card. The server adds--kv-resident 4096and prints:The iGPU has a 112 GiB GTT pool here; the same start holds a 49.80 GiB expert cache with all 24,576 experts resident plus two 3.65 GiB slot sessions, so the 16 GB figure is not this card's.
In
serve/server.pyengine_args(), the backend comes fromdrafting.detect_hardware(), not from the config. On this host it returns('cuda', ['sm_120', 'sm_120', 'gfx1151'])becausenvidia-smianswers first.drafting_vram_mib()then returns 16311 (an RTX 5060 Ti), andvram_fit.fit_start(cfg, args, 16311, 'cuda')adds the 4096-cell window.Expected: a config that names
"backend": "hip"(and its card) is sized by that card, or the fit is skipped when the detected backend differs from the config's backend.Effect on answers (measured on 0.2.10 / engine 0.1.56, same code path, 262,144 context, 2 slots, temperature 0):
--kv-resident 4096, the engine log reportedKV streaming: 4096 of 262144 cells per QSA layer in VRAMand, on prompts of 32K tokens and more, lines such asKV streaming: 88.01% of 400536 block reads hit VRAM, 193.4 MiB read from RAM - OVERFLOW (too few resident cells)(22 OVERFLOW lines in one run)."user_args": ["--kv-resident", "262144"](which wins over the fit), the same prompts gave 0 of 3 misreads and identical outputs across restarts.Workaround in use: the
user_argsentry above.Smallest steps or command that reproduce it
No engine start is needed. From the source tree, with a HIP config like the one below on a computer where
nvidia-smialso answers:Output on 0.2.11 (commit
c3b3f50):Relevant config arguments:
--expert-cache 24576 --resident-experts --prefill 16384 --spec 4 --mtp <dir> --max-context 262144 --kv int8 --mtp-window 8192,"parallel": 2,"backend": "hip","gpu": 0.Reproduction status
Reproduced locally
Strata version
Strata 0.2.11 · engine 0.1.57 (source build, commit
c3b3f50, gfx1151 HIP build with TheRock 7.14.1). First seen on 0.2.10 · engine 0.1.56.Graphics card, memory and system
AMD Ryzen AI MAX+ 395 with Radeon 8060S (gfx1151), 128 GB RAM with a 112 GiB GTT pool (
ttm.pages_limit), plus 2 x NVIDIA GeForce RTX 5060 Ti 16 GB not used by this config · Ubuntu 26.04.1 LTS, kernel 7.0Model, size and settings
Qwen3.8-Flash-Next IQ3_XXS (orcarouter/Qwen3.8-Flash-Next-Uncensored-GGUF) · 262,144 context · 2 slots · MTP · pictures off
Logs
The two lines quoted above are from the server and engine logs of the affected starts. The engine's own start line for the same config with the workaround shows
--kv-resident 262144and noKV streaming:line.@exploitmenot commented on GitHub (Nov 5, 2026):
Same code path here on a PC with two discrete cards (Radeon RX 9070 + GeForce GTX 1660 SUPER), and on this one the AMD card cannot be sized at all, so the fit falls to the smallest NVIDIA card present.
Hardware: Radeon RX 9070 (gfx1201, 16 GB) + GeForce GTX 1660 SUPER (6 GB), Ryzen 9 5900X, 64 GB RAM, Windows 11 (10.0.26300).
Install: app 0.2.11, engine 0.1.57 from the
hip-rx9070package (BUILD.json:backend: hip,archs: [gfx1200, gfx1201], commit0bdcef4682c5), source tree frommain.Config:
"backend": "hip",--max-context 262144 --kv int8 --kv-resident 32768 --resident-experts, nouser_args.The start prints:
and the live
strata.execommand line carries--kv-resident 4096although the config says 32768. The engine itself reads the right card, so the 6 GB figure is the fit's, not the engine's:The difference from your report: here the AMD probe answers nothing, and only the config's backend would have told the fit to stop:
So the HIP start is sized by the smallest card in the machine (6 GB here, the 16 GB NVIDIA card in yours). If
drafting_vram_mib()were called with the config's backend, the fit would have nothing to work with and should skip.FWIW Windows does report the AMD adapter's memory (this box, model loaded, without extra tooling):
so a HIP figure for the fit is not impossible to get, unlike the load/temperature readings the server's own
/metricsgives up on ("no GPU load or VRAM readings for AMD cards on Windows yet").Confirmed workaround, same as yours:
"user_args": ["--kv-resident", "32768"]wins over the fit - the live command line then keeps 32768. The plan's line still names the wrong card ("6 GB card") when it is printed.Same class as #4861 (the updater's child fetching the CUDA package on this PC; #4894 fixes that one) - the run's own
backendis not what the probes consult.Repro is yours (no engine start needed), with the numbers above for an AMD-only start on a computer that also has an NVIDIA card.