mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #106] HIP/ROCm (gfx1100) port: the full IQ3_S model builds, runs and serves on an RX 7900 XTX — findings and what we would like to send #56
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#56
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 @xyzzing on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/106
What this is
A working HIP/ROCm port of the engine, built from your sources at a pinned tag (
Strata/untouched — the port is a hash-recorded patch step over a generated tree) and used daily on:gfx1100, Navi 31), 24 GBIt is not a fork of your CUDA code with the device kernels rewritten: no device kernel needed a math change. What the port needed was a handful of targeted patches (target gate, portable QSA scorer, MMQ arch id, an LDS-limit fix, a file-backed expert source for IQ packs, an opt-in rocWMMA fast path) plus a serving layer.
What works, measured
--spec 2): "The capital of France is" → " Paris. The capital of Germany is Berlin", 8 tokens at 32.35 tok/s, TTFT 524 ms.finish=stop. Prompt cache, MTP/speculation, expert-cache tier, tool-calling all in use.--kv int8 --kv-resident 32768,--prefill 8192):--spec-split+5.7%, holdout-confirmed); warm short chat 39–48 tok/sNot verified: no same-weights logit reference exists on this machine (your 27B/dense variants would not coexist in 96 GB RAM alongside the 84 GB-resident model), so correctness rests on the kernel-level parity suite plus same-weights output comparison with llama.cpp.
Upstream defects found while porting
fused_gr_read_multistages 80 KB of dynamic shared memory (8 * 2560 * 4), past RDNA3's 64 KB workgroup limit. Here the attribute call failed silently and the launch returnedhipErrorInvalidValue, which killed the first prompt pass. Fix:TILE 2560 → 1024(tile-loop arithmetic unchanged, no math change) — or at least printing the guard values when the launch fails.native_moe_combinecontradicts its own header under the project's-ffp-contract=off: the file documents FMA accumulation for experts1..k-1, but they rounded separately — bit-for-bit visible to a test that computes two exact fp32 simulations (35–280 of 256–512 elements differed). Fix: explicit__fmaf_rn.100*major + 10*minorencoding instead of ggml's own parser (src/prefill/ggml_cuda_host.cu). It happens to be right on CUDA and was invalid here, so every MMQ launch aborted.generated / (now - first_token)): five-digit numbers at the first sample of every answer, then undershooting. Fixed in #104.psutilthe disk rate is empty too. Fixed in #105.--mmap-expertsis Q2_0-only:FileExpertSourcewants uniform BLOB-sized experts whileiq_pack --experts-binwrites the per-layer layout, so IQ packs have no file-backed source and the engine pins a 47.9 GiBhipHostRegisterarena (that arena is also what OOM-killed us once under coexistence). We wrote the file-backed source for the IQ layout.16x16x16fp16→fp32), the latter validated against a float64 model within ~1 f32 ulp.What we would like to send
Anything in here you would like reproduced on your side, or a smaller first step? We are happy to cut the series down to whatever you are comfortable reviewing.
@qwased commented on GitHub (Sep 29, 2026):
https://github.com/Headmaster218/MoE4All
There is vulkan engine
@2jztricks commented on GitHub (Sep 29, 2026):
https://github.com/Niko1221/Strata/pull/121
@Niko1221 commented on GitHub (Sep 29, 2026):
Thanks @xyzzing. Most of your list landed with the HIP backend in 0.1.25 (the fused_gr LDS tile, the MMQ arch id) and 0.1.26 (
--mmap-expertsfor IQ packs); #104 is merged and #105 is under review. A rocWMMA scorer PR with parity and speed numbers, and an AMD row for the rates table, would both be welcome. Closing this as done.@xyzzing commented on GitHub (Oct 1, 2026):
Refresh on this thread — much of what it proposed is now upstream, and the port has moved:
9259cad) on the RX 7900 XTX / gfx1100, single card, IQ3_S. Measured on the card (median of 3 clean one-shot cells per tier, greedy, 256 tokens): decode 64.2 / 59.1 / 60.5 / 56.8 / 59.0 tok/s at 1K/4K/32K/64K/128K, prompt 850–1,565 tok/s. Details and per-cell records are in the #319 thread — short version: your +20% decode from the #262 intrinsics reads confirmed on gfx1100 (+13–27% depending on tier), and the 32K prompt dip we saw on the 0.1.30-era build is gone on 0.1.31.qsa_block_scores_tc(gfx12 first, gfx1100 FP16 arm underSTRATA_SELECT_WMMA=1, warp fallback; the arm that ran is printed once). Parity 5/5 incl. the adversarial fixtures and failing negative control; kernel 11.64x at 128K on this branch's own 0.1.31 build.-NNNNN-of-MMMMMshard set by name, and--native/--ple-ggufmust name the same shard set or the loader reports a duplicate shard; and 0.1.31'sple_parityhard-fails without the model's PLE table rather than skipping, which surprised our harness (we classify it as the declared weight-gated skip it is).