mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3271] [Other] gfx906 (2× Radeon Pro VII): install report, 200K k8v4 + CPU vision, and a 50% CPU question #1324
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#1324
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 @Marczellito on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3271
Area
[Other] (anything else, including setup and installation)
Your question
Two minor questions; everything else works:
toppeaks at ~50% (18 of 36 logical CPUs) on this 18C/36T Xeon. The engine log says 17 pool workers + the host thread;docs/AMD_HIP.mdanddocs/DETAILS.md:557suggest one worker per physical core is deliberate and all-logical was slower on gfx1030. Is that the expected behavior on Haswell-EP too?setup.py. Is a download-only route (or clearer by-hand download instructions) planned? That was the only real install dead end I hit.The report below is a successful end-to-end run on v0.1.45 (
477ac13c), 2× Radeon Pro VII 16 GB (gfx906), 64 GB RAM, CachyOS kernel 7.2.3: Qwen3.8-Flash-Next IQ3_S, 200K context,--kv k8v4, pictures on (CPU encoder). It is also posted as a comment on #2883 (the gfx906 validation thread); #3172 tracks the gfx906 build blockers I hit. I am not asking for a new feature; I am sharing what worked and where the friction is.What you tried
Environment
1002:66a1), 190 W power limit, PCIe 3.0 (engine probe 13.8 GB/s host→device)/opt/rocm, HIP 7.2.53211, AMD clang 22.0.0; no container, noHSA_OVERRIDE_GFX_VERSION. The distro package ships gfx906 rocBLAS kernels (Kernels.so-000-gfx906-xnack-.hsaco); the community image was not needed.477ac13c, engine0.1.45; llama.cpp3cf03257fmmproj-Qwen3.8-Flash-Next-BF16.ggufon CPU--max-context 204800 --kv k8v4 --vision --gpus 0,1 --layer-split auto --spec 4 --spec-min-p 0.5 --prefill auto --expert-cache auto --vram-reserve-mib 700 --vram-reserve-later-mib 1006Strata-data/mtp/rt;tools/mtp_fetch.py verifyrc=0Setup command:
./setup.sh --yes --backend hip --gpus 0,1 --family qwen --model IQ3_S --vision cpu --no-start, then the 200K /k8v4choices.Note: setup's step-2 summary prints
KV cache: 4-bit (Hadamard-rotated)for any non-int8 choice (setup.py:6581); the written config is--kv k8v4(K 8-bit, V 4-bit). Wording only.What worked
-DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906path, with the compat layer, built the engine and the CPU vision encoder. Build time ~15 min at-j18. The 4-file diff is in the gist below; the CMake + cublas hunks are the same set posted in #2459, and #3172 tracks the same blockers.kv_hybrid_parityALL PASS (k8v4 appends/gathers, 0 bad of 786,432/24,576; mode-3 batched attention 7.82e-08 vs the dequant reference),kv_stream_parityk8v4 ring 0 failures,kv_window_parity0 bad/0 stale,kv_steps_parity120/120,kv_q8_parityOK./healthready; text17*23?→391; vision (64×64 red PNG) →Red; images on. The docs' gfx906 section lists images (--vision) as not done — this run verifies the CPU encoder path on Radeon Pro VII.k8v4at 204,800 costs ~2.2 GB and stays in VRAM. KV streaming is off: it needs ~2.2 GB beside the ~62 GB of experts on a 63 GB machine. No KV-related errors.download interruptedretry lines across 13 setup attempts (mostly DNS, 12 read timeouts) on a flaky link; every resume continued from.part, zero corruption. MTP verify passed.What did not work / known issues
Known / already tracked
setup.pyrefuses gfx906 at step 1 — documented as "Setup does not build it yet", but the failure also makes the ~84 GB download and pack preparation unreachable through setup. Exact first-run output (before the local patch):My local
setup.pychange adds gfx906 toAMD_ARCHS/AMD_NAMESand passes the gfx906 flags (including-DSTRATA_ENABLE_HIP=OFF). I am not proposing it as the default (the docs say manual build); a download-only path, or clearer by-hand download instructions, would remove the dead end. This is the main friction I hit.Build blockers on 0.1.45 (reproduced locally; exact messages in
build-errors.txtin the gist):cublasSgemm,cublasSgemmStridedBatched,cublasGemmStridedBatchedExaliases inplatform/hip_compat/cublas_v2.h(qwen35q36_engine.cu);strata_mmq_w4a4compiled withoutGGML_USE_HIP→cuda.hnot found;f16kq::*undefined at link — missingsrc/prefill/moe_f16_kq.cuinstrata_mmqunderSTRATA_HIP_GFX906;<format>vs HIP's__noinline__macro (fix:#undef __noinline__in the gfx906 compat header);build-hipcache withSTRATA_ENABLE_HIP=ON+STRATA_HIP_GFX906=ON→ "enable only one"; pass-DSTRATA_ENABLE_HIP=OFFor use a fresh build directory.These are in #3172 (open; confirmed on 0.2.0-beta) and were reported in #2459 (closed by the tracker reset). I am adding the end-to-end result, not a new build bug.
Rough edges found here
VRAM is tight at request start. The first start (only
--vram-reserve-mib 700) loggedCUDA1: 462 MiB ... LOW; adding--vram-reserve-later-mib 1006removed it (768 MiB free after load). One later request still logged:The following long requests still ran at 44–52 tok/s, but if the driver starts paging,
--vram-reserve-mib 768(or 1024) is the engine's own suggestion. The desktop here is on CUDA1;--vram-reserve-later-mib 1006is what fixed the CUDA1 window-capture warning.qsa_prompt_attn mode 3refuses on HIP and the older kernel runs; output is correct, but if mode 3 is expected to work on gfx906 this is masking it. (Observed in the parity tests; not a correctness failure.)No hipBLASLt tuning table for gfx906 (hipBLASLt 100202): setup says the prompt's dense GEMMs use plain hipBLAS. Expected for this arch, but it is a prompt-speed opportunity.
Network: the only reason setup needed 13 attempts; not a Strata issue, but the log is full of it.
CPU usage: ~50% (18 of 36 threads)
toppeaks around 50% on this 18C/36T Xeon. The engine log says:So it uses one logical CPU per physical core (17 workers + host = 18 threads) and leaves the 18 SMT siblings alone.
docs/AMD_HIP.md(gfx1030 report) says the default is one worker per physical core and that using all logical CPUs was slower there (27 vs 38–42 tok/s);docs/DETAILS.md:557documents--pool-workers. I think this is expected, not a bug. If a sweep on Haswell-EP would be useful, I can run--pool-workers 8/17/24/35with a fixed prompt, but I have not done it.Not tested
3d1fb480): not run; #3172 says the gfx906 build still fails there. This report is v0.1.45 only.tools/strata_bench.py; vision accuracy/speed beyond one image; CUDA/SYCL builds; Windows; a fresh MTP download.STRATA_HIP_GFX906, and the cublas/__noinline__changes are in the gfx906 compat headers, but I cannot claim the other backends from this machine.Logs
Sanitized files in one secret gist (link-only, not indexed):
setup-evidence.log(curated; the full setup log is 1,193 lines),engine-session-evidence.log,build-errors.txt,strata-gfx906-fixes.patch,config-iq3_s-sanitized.json— https://gist.github.com/Marczellito/9e9324702246fe9f1acfb0306e868c9e. Local paths are shortened to~; no API keys, passwords, emails, or hostnames. Full logs on request.Results (optional)
From
strata-iq3_s.logafter the 1006 restart. These are engine-reported averages from one continuous session, not the 3-run benchmark protocol. "Prompt read" is the newly read part; the reused prefix is excluded, so the prompt speed is the speed of that read, not of the whole context.@Niko1221 commented on GitHub (Oct 20, 2026):
Thank you for the long report. The three build blockers are fixed in 0.2.1 (see #3172): the cublas names (the Qwen3.6 engine is not built for gfx906), the W4A4 target's missing GGML_USE_HIP, and the f16kq and trellis-overlay link errors. Your other questions: the 17 workers are expected, one per physical core is the default and a count above it usually costs decode (docs/DETAILS.md, --pool-workers; a sweep on your Haswell-EP is welcome, and there is a note there about the two-socket cases). Download-only for gfx906 is a fair ask: setup refuses the card at its first check, so for now the model has to be fetched and prepared by hand; I did not change that here. Also the KV wording (setup prints "4-bit (Hadamard-rotated)" for k8v4) is noted.
This is in Strata 0.2.1: https://github.com/Niko1221/Strata/releases/tag/v0.2.1
@Marczellito commented on GitHub (Oct 20, 2026):
Sweep done — here are the numbers, and the answer to the 50 % CPU question in the report.
Box (nothing updated): Xeon E5-2696 v3, 18 physical cores / 36 logical, one socket, one NUMA node, AVX2 (no AVX-512), 64 GB DDR4-2133 ECC; 2x Radeon Pro VII 16 GB (gfx906), layer split over both, PCIe 3.0 x16 at 13.8 GB/s; CachyOS, kernel 7.2.3-1-cachyos, ROCm 7.2.4. Strata v0.1.45 source (commit
477ac13c), engine 0.1.45, the installed local gfx906 build; I did not update or modify the checkout — the config was copied to a scratch file and the installed engine and server were used. Model Qwen3.8-Flash-Next GSQ-RCO IQ3_S, 200K,--kv k8v4,--spec 4 --spec-min-p 0.5,--prefill auto --expert-cache auto, MTP draft layer, everything else as in the config file.Method: one fresh server per value (the pool is built at start), 3 servers per value, 3 measured requests each = 9 samples per value; the same fresh ~3,983-token prompt every time (the bench's word-list prompt with a unique tag, so the conversation cache never helps) and 512 new tokens, temperature 0, thinking off; one discarded warm-up request per server. Decode tok/s is the engine's own
predicted_per_second. The default (17) was measured again at the end of the run as a drift control.What it says
35 pool workers on logical processors 1,2,…,17— so the extra 18 run unpinned on the same cores. That is the "a worker without a core of its own takes time from the others" case of your note, and the window grows with it: 56.45 ms per decode window against 47.43 ms at 17 workers (+19 %). Two parts of it: the CPU's own expert part goes from 1.97 to 3.20 ms per window (+62 %), and the host's wait for the GPU goes from 18.2 to 22.5 ms — the unpinned workers take CPU from the host thread too.topshowed — while the real expert work is only 1.97 ms of every 47 ms window: most of those busy cores are the pool waiting, not working. Fewer workers cost nothing measurable in decode speed here and leave the box idle for other work.Cross-reference: #3417's "Work" profile writes
--pool-workers 12on an 8-core box. On this box 8 and 12 workers measured the same as the default (48.2 / 47.8 vs 47.4 tok/s), so the count that hurts is the one above the physical core count, not the one below it — the report's point, measured on a different CPU and a different card pair.Not tested: the 0.2.1 engine (this ran the installed 0.1.45 gfx906 build, since #3172's blockers were fixed after this install); a two-socket box; other models, quantizations, context sizes, cards, backends or Windows; a long-context session (the workload is a ~4K prompt and a 512-token decode, so the CPU share of a decode is smaller here than in the long chat of the report). The X server had a display on the same cards during the run. The arms ran in a fixed order (8 → 35) and the control arm covers the drift: 45.8 against 47.4 tok/s (means), −3.3 %, inside the ±1.3–1.5 tok/s standard errors.
Raw data, the harness and the tables: https://gist.github.com/Marczellito/3825f6233d3cd739f762dd374dfee664
@Niko1221 commented on GitHub (Oct 24, 2026):
This is fixed in Strata 0.2.1. Please update to the latest release (in the Terminal:
strata update; in the app: download the newest installer from the releases page). If it still happens on the latest version, reply here and we will reopen it. Thank you for the report.STRATA_RAM_ADAPT, opt-in) #3712