[GH-ISSUE #3172] [Engine] gfx906 (2x MI50): build fails on 0.1.44+ and 0.2.0-beta — cublas* in qwen35, cuda.h in the nvfp4 MMQ target #1277

Closed
opened 2026-11-04 01:49:57 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @romeo5353535353-ui on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3172

Environment

  • Ubuntu 24.04.5, kernel 6.8.0-147-generic, amdgpu from the kernel
  • ROCm from the community image mixa3607/rocm-gfx906:7.14-complete (the one docs/AMD_HIP.md names for gfx906)
  • 2× Instinct MI50 16 GB, reported by the driver as 1002:66af (Vega 20), wave64
  • Build inside that image, checkout at 477ac13 (main, 0.1.45):
cmake -S . -B build-906 -G Ninja \
  -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 \
  -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang \
  -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++
ninja -C build-906 strata

What happens

Two independent failures, both from modules added after 0.1.43:

  1. src/qwen35/q36_engine.cu — CUDA names the gfx906 compat layer does not map:
src/qwen35/q36_engine.cu:1555:13: error: use of undeclared identifier 'cublasSgemm'; did you mean 'hipblasSgemm'?
src/qwen35/q36_engine.cu:1958:29: error: use of undeclared identifier 'cublasGemmStridedBatchedEx'; did you mean 'hipblasGemmStridedBatchedEx'?
src/qwen35/q36_engine.cu:1972:29: error: use of undeclared identifier 'cublasGemmStridedBatchedEx'; did you mean 'hipblasGemmStridedBatchedEx'?

CMakeLists.txt adds strata_qwen35 (and links it into strata) unconditionally in the CUDA branch, and STRATA_HIP_GFX906 turns that branch into a HIP build, so the file is compiled with hipcc.

  1. src/prefill/mmq_nvfp4_w4a4.cu — the target is built without GGML_USE_HIP, so llama.cpp's common.cuh falls through to the CUDA vendor header:
In file included from src/prefill/mmq_nvfp4_w4a4.cu:8:
In file included from .../ggml-cuda/common.cuh:40:
.../ggml-cuda/vendors/cuda.h:4:10: error: 'cuda.h' file not found with <angled> include
.../ggml-cuda/vendors/cuda.h:6:10: fatal error: 'cuda_bf16.h' file not found

Note that strata_mmq compiles its llama.cpp objects fine — only strata_mmq_w4a4 misses the flag.

Workaround that works

v0.1.43.1 (a0116b2) builds cleanly with the exact command above (that is what the machine now runs). So the regression is confined to 0.1.44+.

Suggestions

  • Put the qwen35 block behind if(NOT STRATA_HIP_GFX906): generate.cpp already guards every reference with #if defined(STRATA_HAVE_QWEN35), so a gfx906 build that does not define it links and runs. I verified this locally: with the block wrapped, the qwen35 error disappears and the build proceeds.
  • Add GGML_USE_HIP (or the gfx906 compat include order) to the strata_mmq_w4a4 target, or skip that target for STRATA_HIP_GFX906.
  • If qwen35 is meant to work on gfx906 eventually, cublasSgemm/cublasGemmStridedBatchedEx need entries in include/strata/platform/hip_compat/.

Happy to test a patch on this machine — it is a dedicated 2×MI50 box with the community ROCm image installed.

Originally created by @romeo5353535353-ui on GitHub (Oct 19, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3172 **Environment** - Ubuntu 24.04.5, kernel `6.8.0-147-generic`, amdgpu from the kernel - ROCm from the community image `mixa3607/rocm-gfx906:7.14-complete` (the one `docs/AMD_HIP.md` names for gfx906) - 2× Instinct MI50 16 GB, reported by the driver as `1002:66af` (Vega 20), wave64 - Build inside that image, checkout at `477ac13` (main, 0.1.45): ```sh cmake -S . -B build-906 -G Ninja \ -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 \ -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang \ -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ ninja -C build-906 strata ``` **What happens** Two independent failures, both from modules added after 0.1.43: 1. `src/qwen35/q36_engine.cu` — CUDA names the gfx906 compat layer does not map: ``` src/qwen35/q36_engine.cu:1555:13: error: use of undeclared identifier 'cublasSgemm'; did you mean 'hipblasSgemm'? src/qwen35/q36_engine.cu:1958:29: error: use of undeclared identifier 'cublasGemmStridedBatchedEx'; did you mean 'hipblasGemmStridedBatchedEx'? src/qwen35/q36_engine.cu:1972:29: error: use of undeclared identifier 'cublasGemmStridedBatchedEx'; did you mean 'hipblasGemmStridedBatchedEx'? ``` `CMakeLists.txt` adds `strata_qwen35` (and links it into `strata`) unconditionally in the CUDA branch, and `STRATA_HIP_GFX906` turns that branch into a HIP build, so the file is compiled with hipcc. 2. `src/prefill/mmq_nvfp4_w4a4.cu` — the target is built without `GGML_USE_HIP`, so llama.cpp's `common.cuh` falls through to the CUDA vendor header: ``` In file included from src/prefill/mmq_nvfp4_w4a4.cu:8: In file included from .../ggml-cuda/common.cuh:40: .../ggml-cuda/vendors/cuda.h:4:10: error: 'cuda.h' file not found with <angled> include .../ggml-cuda/vendors/cuda.h:6:10: fatal error: 'cuda_bf16.h' file not found ``` Note that `strata_mmq` compiles its llama.cpp objects fine — only `strata_mmq_w4a4` misses the flag. **Workaround that works** `v0.1.43.1` (`a0116b2`) builds cleanly with the exact command above (that is what the machine now runs). So the regression is confined to 0.1.44+. **Suggestions** - Put the `qwen35` block behind `if(NOT STRATA_HIP_GFX906)`: `generate.cpp` already guards every reference with `#if defined(STRATA_HAVE_QWEN35)`, so a gfx906 build that does not define it links and runs. I verified this locally: with the block wrapped, the qwen35 error disappears and the build proceeds. - Add `GGML_USE_HIP` (or the gfx906 compat include order) to the `strata_mmq_w4a4` target, or skip that target for `STRATA_HIP_GFX906`. - If qwen35 is meant to work on gfx906 eventually, `cublasSgemm`/`cublasGemmStridedBatchedEx` need entries in `include/strata/platform/hip_compat/`. Happy to test a patch on this machine — it is a dedicated 2×MI50 box with the community ROCm image installed.
Author
Owner

@romeo5353535353-ui commented on GitHub (Oct 19, 2026):

Confirmed on v0.2.0-beta (3d1fb480): the gfx906 build fails with the same qwen35 cublas* errors. Details and the proposed guard are in #2883.

<!-- gh-comment-id:6277156309 --> @romeo5353535353-ui commented on GitHub (Oct 19, 2026): Confirmed on **v0.2.0-beta** (`3d1fb480`): the gfx906 build fails with the same `qwen35` cublas* errors. Details and the proposed guard are in #2883.
Author
Owner

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

Thank you, your diagnosis was right and your suggested guard is what went in. In 0.2.1 the gfx906 build no longer builds the Qwen3.6 engine (src/qwen35 calls cuBLAS entry points the wave64 layer does not map, and generate.cpp already guards it with STRATA_HAVE_QWEN35), strata_mmq_w4a4 gets GGML_USE_HIP, and the other link errors of #3271 are fixed too: the trellis overlay's quantize.cu and instances, and moe_f16_kq.cu, which were never in the HIP source list. I compiled all 161 targets for gfx906 on ROCm 7.10 (clang 22) and the strata binary links and reports its families (qwen4exp only); I have no gfx906 card, so it was not run on one. If you can try your command on 0.2.1 on the MI50 box, that would close the loop.

This is in Strata 0.2.1: https://github.com/Niko1221/Strata/releases/tag/v0.2.1

<!-- gh-comment-id:6286736262 --> @Niko1221 commented on GitHub (Oct 20, 2026): Thank you, your diagnosis was right and your suggested guard is what went in. In 0.2.1 the gfx906 build no longer builds the Qwen3.6 engine (src/qwen35 calls cuBLAS entry points the wave64 layer does not map, and generate.cpp already guards it with STRATA_HAVE_QWEN35), strata_mmq_w4a4 gets GGML_USE_HIP, and the other link errors of #3271 are fixed too: the trellis overlay's quantize.cu and instances, and moe_f16_kq.cu, which were never in the HIP source list. I compiled all 161 targets for gfx906 on ROCm 7.10 (clang 22) and the strata binary links and reports its families (qwen4exp only); I have no gfx906 card, so it was not run on one. If you can try your command on 0.2.1 on the MI50 box, that would close the loop. This is in Strata 0.2.1: https://github.com/Niko1221/Strata/releases/tag/v0.2.1
Author
Owner

@petski3 commented on GitHub (Oct 20, 2026):

0.2.1 built and ran on gfx906 here (2x Radeon Pro VII 16 GB, not MI50), so this is the on-card run you asked for.

Environment: Strata v0.2.1, tag commit 90767252f420e25223c739d604145ad15911d48b, engine strata --version = 0.1.46, --families = qwen4exp. Ubuntu 24.04.4, kernel 6.8.0-147, in-tree amdgpu, no system ROCm; the build and the engine run in a docker image made from mixa3607/rocm-gfx906:7.14-complete (HIP 7.14.60850, AMD clang 23.0.0git). Ryzen 9 3950X, 64 GB RAM, 2x Radeon Pro VII 16 GB (gfx906), layer split 27. Model Qwen3.8-Flash-Next GSQ-RCO IQ3_S (--native pack), 262,144 context, --kv fp16 --kv-resident 32768, MTP --spec 4 --spec-min-p 0.5, --prefill 4096, --pcie-frac 0, STRATA_ARENA_MMAP=1, STRATA_STAGE_TRIM=1, STRATA_HIP_PROMPT_F16=1, STRATA_PREFILL_CPU_SHARE=auto, STRATA_ROUTE_TAIL_SKIP=0, STRATA_MMVF_ROWS=1, STRATA_GDN_HEAD=1 STRATA_GDN_PP=2 STRATA_GDN_CONVL2=1 STRATA_GDN_NOY=1, CPU vision encoder on. One local patch on top of the tag: the drop_superseded prefix rule from #2930 (#342), 84 lines, not build-related.

Build (passed):

cmake -S . -B build-906 -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 \
  -DSTRATA_BUILD_TESTS=OFF -DSTRATA_GGML_DIR=/llama -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++
ninja -C build-906 strata strata-device
cmake -S tools/vision -B build-vision -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLAMA_DIR=/llama -DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=OFF \
  -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ && ninja -C build-vision strata-vision

(/llama = llama.cpp at the pinned 3cf0325.) No source changes were needed: the three 0.1.44-0.2.0 blockers are gone, and the trellis MMQ overlay now configures ("overlay on the pinned ggml-cuda in build-906/ggml-tq-overlay") and links; on 0.2.0-beta we had to build with -DSTRATA_MMQ_TQ_OVERLAY=OFF. Only the strata, strata-device and strata-vision targets were built, not all 161.

Served and measured (passed): serve/server.py --engine strata --host 127.0.0.1 (0.2.1 refuses a non-loopback bind without an API key, so our usual 0.0.0.0 needed that change). Start-up identical to our live 0.1.43.1 engine: same 15 pool workers, 6656 + 5505 expert slots, mapped read-only expert arena. A/B against 0.1.43.1 on the same box and settings, fresh engine per arm, interleaved order old / new / new / old, fixed-nonce greedy requests (presence_penalty 0 set in the config, since the model-card 1.5 would otherwise apply to thinking-off requests), 4K / 32K / 64K prompts x2 each plus a 6-prompt decode bench, 0 stall reports:

prompt tok/s 4K / 32K / 64K decode tok/s 4K / 32K / 64K decode bench
0.1.43.1 run 1 374.8 / 568.0 / 564.4 39.1 / 47.0 / 42.0 42.7
0.2.1 run 1 376.1 / 554.7 / 559.3 37.9 / 47.9 / 43.1 42.7
0.2.1 run 2 377.0 / 566.6 / 565.3 39.6 / 47.9 / 43.1 42.6
0.1.43.1 run 2 370.7 / 553.2 / 567.0 38.9 / 47.1 / 41.7 43.0

Prompt speed equal; decode +1.8 % at 32K and +2.9 % at 64K (both 0.2.1 arms above both 0.1.43.1 arms), decode bench equal. All 24 output texts and the drafts accepted / offered counts are identical across the four arms, so 0.2.1 = 0.1.43.1 in answers here. This is a nonstandard A/B (our own harness, medians of 2), not a BENCHMARK_PROTOCOL run.

Not run on 0.2.1: Qwen3.6 (not in the gfx906 build, as documented), needles at 256K and the VRAM peak, images through --vision, conversation parking, --parallel, the ctest suite. Not tried: a system ROCm instead of the 7.14 image.

Developed with an AI coding assistant; every number above was measured on the machine described here.

<!-- gh-comment-id:6298087415 --> @petski3 commented on GitHub (Oct 20, 2026): 0.2.1 built and ran on gfx906 here (2x Radeon Pro VII 16 GB, not MI50), so this is the on-card run you asked for. **Environment:** Strata v0.2.1, tag commit `90767252f420e25223c739d604145ad15911d48b`, engine `strata --version` = 0.1.46, `--families` = qwen4exp. Ubuntu 24.04.4, kernel 6.8.0-147, in-tree amdgpu, no system ROCm; the build and the engine run in a docker image made from `mixa3607/rocm-gfx906:7.14-complete` (HIP 7.14.60850, AMD clang 23.0.0git). Ryzen 9 3950X, 64 GB RAM, 2x Radeon Pro VII 16 GB (gfx906), layer split 27. Model Qwen3.8-Flash-Next GSQ-RCO IQ3_S (`--native` pack), 262,144 context, `--kv fp16 --kv-resident 32768`, MTP `--spec 4 --spec-min-p 0.5`, `--prefill 4096`, `--pcie-frac 0`, `STRATA_ARENA_MMAP=1`, `STRATA_STAGE_TRIM=1`, `STRATA_HIP_PROMPT_F16=1`, `STRATA_PREFILL_CPU_SHARE=auto`, `STRATA_ROUTE_TAIL_SKIP=0`, `STRATA_MMVF_ROWS=1`, `STRATA_GDN_HEAD=1 STRATA_GDN_PP=2 STRATA_GDN_CONVL2=1 STRATA_GDN_NOY=1`, CPU vision encoder on. One local patch on top of the tag: the `drop_superseded` prefix rule from #2930 (#342), 84 lines, not build-related. **Build (passed):** ``` cmake -S . -B build-906 -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 \ -DSTRATA_BUILD_TESTS=OFF -DSTRATA_GGML_DIR=/llama -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ ninja -C build-906 strata strata-device cmake -S tools/vision -B build-vision -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLAMA_DIR=/llama -DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=OFF \ -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ && ninja -C build-vision strata-vision ``` (`/llama` = llama.cpp at the pinned 3cf0325.) No source changes were needed: the three 0.1.44-0.2.0 blockers are gone, and the trellis MMQ overlay now configures ("overlay on the pinned ggml-cuda in build-906/ggml-tq-overlay") and links; on 0.2.0-beta we had to build with `-DSTRATA_MMQ_TQ_OVERLAY=OFF`. Only the `strata`, `strata-device` and `strata-vision` targets were built, not all 161. **Served and measured (passed):** `serve/server.py --engine strata --host 127.0.0.1` (0.2.1 refuses a non-loopback bind without an API key, so our usual `0.0.0.0` needed that change). Start-up identical to our live 0.1.43.1 engine: same 15 pool workers, 6656 + 5505 expert slots, mapped read-only expert arena. A/B against 0.1.43.1 on the same box and settings, fresh engine per arm, interleaved order old / new / new / old, fixed-nonce greedy requests (`presence_penalty 0` set in the config, since the model-card 1.5 would otherwise apply to thinking-off requests), 4K / 32K / 64K prompts x2 each plus a 6-prompt decode bench, 0 stall reports: | | prompt tok/s 4K / 32K / 64K | decode tok/s 4K / 32K / 64K | decode bench | |---|---|---|---| | 0.1.43.1 run 1 | 374.8 / 568.0 / 564.4 | 39.1 / 47.0 / 42.0 | 42.7 | | 0.2.1 run 1 | 376.1 / 554.7 / 559.3 | 37.9 / 47.9 / 43.1 | 42.7 | | 0.2.1 run 2 | 377.0 / 566.6 / 565.3 | 39.6 / 47.9 / 43.1 | 42.6 | | 0.1.43.1 run 2 | 370.7 / 553.2 / 567.0 | 38.9 / 47.1 / 41.7 | 43.0 | Prompt speed equal; decode +1.8 % at 32K and +2.9 % at 64K (both 0.2.1 arms above both 0.1.43.1 arms), decode bench equal. All 24 output texts and the drafts accepted / offered counts are identical across the four arms, so 0.2.1 = 0.1.43.1 in answers here. This is a nonstandard A/B (our own harness, medians of 2), not a BENCHMARK_PROTOCOL run. **Not run on 0.2.1:** Qwen3.6 (not in the gfx906 build, as documented), needles at 256K and the VRAM peak, images through `--vision`, conversation parking, `--parallel`, the ctest suite. Not tried: a system ROCm instead of the 7.14 image. Developed with an AI coding assistant; every number above was measured on the machine described here.
Author
Owner

@romeo5353535353-ui commented on GitHub (Oct 20, 2026):

Confirmed on the MI50 box: 0.2.1 builds for gfx906 with no local patches and runs on the cards.

Build — the documented command, unchanged:

cmake -S . -B build-906 -G Ninja -DCMAKE_BUILD_TYPE=Release \
      -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 \
      -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++
ninja -C build-906 strata strata-device

No cublas* errors, no cuda.h, no f16kq::* link errors — strata (32 MB) and strata-device link.
strata --version reports 0.1.46; strata-device --selftest → selftest OK, with the plan at
--max-context 20480: KV + indexer 0.27 GB, expert cache 5.68 GB (4105 slots), 15.97 GiB card free, FITS.

One toolchain note that may be worth knowing: with ROCm 7.14 / clang 23, a 16-way parallel build crashed
clang-23 itself (SIGSEGV in the globalopt and cgscc passes) on
llama/ggml/src/ggml-cuda/template-instances/mmq-instance-q2_0.cu and mmq-instance-q4_k.cu. Both TUs compile
fine on their own and with -j8, so this looks like a compiler-side limit at high parallelism on these large
template units, not a source problem — no patch was needed, just -j8 and a retry pass.

Runtime, Ubuntu 24.04, mixa3607/rocm-gfx906:7.14-complete, 2x Instinct MI50 16 GB (1002:66af),
Ryzen 7 5700X, 64 GB DDR4-3600, engine 0.1.46, IQ3_S pack, 131,072 context:

strata serve: layer split: layers 0-26 (CUDA0), 27-47 (CUDA1)
strata serve: --pipeline-windows 2: two verifiers per stage, 2 stages overlap across windows
expert cache 12,245 slots (23.9 GiB), 1,004 MiB VRAM free

Numbers (greedy, unique prompts so the prompt cache never helps, medians):

Test 2 cards 1 card
short chat, decode 61.6 tok/s 47.5 tok/s
1.6K prompt, decode 74.5 tok/s 47.6 tok/s
1.6K prompt, prefill 183 tok/s 126 tok/s
31K prompt, decode 74.5 tok/s 49.1 tok/s
31K prompt, prefill 694 tok/s 300 tok/s

(One card was run on the same build with the other card physically absent: 4,805 slots, 9.4 GiB cache,
expert cache hit rate 57-94% instead of 98-99.7%, 116 W at 99% GPU.)

Against our own 0.1.43.1 numbers on the same box (#3173), with the same flags: 1.6K decode 64.4 -> 74.5 tok/s
and 31K prefill 685 -> 694 tok/s, 31K decode 73.6 -> 74.5. The expert cache holds fewer slots than 0.1.43.1
(12,245 vs 14,587) and decode is still faster, so something in the 0.1.46 decode path is doing more with less.

Config used: --max-context 131072 --kv int8 --kv-resident 32768 --layer-split 27 --spec 3 --spec-min-p 0.9 --prefill 2048 --vram-reserve-mib 1024 --pipeline-windows 2 --trim-stage-weights --vision, vision encoder on CPU.

So the gfx906 path is current again — no pinning to 0.1.43.1. Thank you for fixing this.

<!-- gh-comment-id:6303133814 --> @romeo5353535353-ui commented on GitHub (Oct 20, 2026): Confirmed on the MI50 box: **0.2.1 builds for gfx906 with no local patches and runs on the cards.** **Build** — the documented command, unchanged: ```sh cmake -S . -B build-906 -G Ninja -DCMAKE_BUILD_TYPE=Release \ -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 \ -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ ninja -C build-906 strata strata-device ``` No `cublas*` errors, no `cuda.h`, no `f16kq::*` link errors — `strata` (32 MB) and `strata-device` link. `strata --version` reports **0.1.46**; `strata-device --selftest` → **selftest OK**, with the plan at `--max-context 20480`: KV + indexer 0.27 GB, expert cache 5.68 GB (4105 slots), 15.97 GiB card free, FITS. One toolchain note that may be worth knowing: with **ROCm 7.14 / clang 23**, a 16-way parallel build crashed `clang-23` itself (SIGSEGV in the `globalopt` and `cgscc` passes) on `llama/ggml/src/ggml-cuda/template-instances/mmq-instance-q2_0.cu` and `mmq-instance-q4_k.cu`. Both TUs compile fine on their own and with `-j8`, so this looks like a compiler-side limit at high parallelism on these large template units, not a source problem — no patch was needed, just `-j8` and a retry pass. **Runtime**, Ubuntu 24.04, `mixa3607/rocm-gfx906:7.14-complete`, 2x Instinct MI50 16 GB (`1002:66af`), Ryzen 7 5700X, 64 GB DDR4-3600, engine 0.1.46, IQ3_S pack, 131,072 context: ``` strata serve: layer split: layers 0-26 (CUDA0), 27-47 (CUDA1) strata serve: --pipeline-windows 2: two verifiers per stage, 2 stages overlap across windows expert cache 12,245 slots (23.9 GiB), 1,004 MiB VRAM free ``` Numbers (greedy, unique prompts so the prompt cache never helps, medians): | Test | 2 cards | 1 card | | --- | ---: | ---: | | short chat, decode | 61.6 tok/s | 47.5 tok/s | | 1.6K prompt, decode | **74.5** tok/s | 47.6 tok/s | | 1.6K prompt, prefill | 183 tok/s | 126 tok/s | | 31K prompt, decode | **74.5** tok/s | 49.1 tok/s | | 31K prompt, prefill | **694** tok/s | 300 tok/s | (One card was run on the same build with the other card physically absent: 4,805 slots, 9.4 GiB cache, expert cache hit rate 57-94% instead of 98-99.7%, 116 W at 99% GPU.) Against our own 0.1.43.1 numbers on the same box (`#3173`), with the same flags: 1.6K decode 64.4 -> 74.5 tok/s and 31K prefill 685 -> 694 tok/s, 31K decode 73.6 -> 74.5. The expert cache holds fewer slots than 0.1.43.1 (12,245 vs 14,587) and decode is still faster, so something in the 0.1.46 decode path is doing more with less. Config used: `--max-context 131072 --kv int8 --kv-resident 32768 --layer-split 27 --spec 3 --spec-min-p 0.9 --prefill 2048 --vram-reserve-mib 1024 --pipeline-windows 2 --trim-stage-weights --vision`, vision encoder on CPU. So the gfx906 path is current again — no pinning to 0.1.43.1. Thank you for fixing this.
Author
Owner

@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.

<!-- gh-comment-id:6383455134 --> @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.
Author
Owner

@romeo5353535353-ui commented on GitHub (Oct 25, 2026):

0.2.6 (engine 0.1.51) on gfx906: one more two-line compat gap, and it is worth fixing for the speed

Tried the current release on the same MI50 box. The gfx906 build of 0.2.6 stops on a new file, src/core/dflash2.cpp,
with three errors that are the same class as the old cublas* ones — CUDA names used in shared code, no mapping in
the HIP compat layer:

/src/src/core/dflash2.cpp:205:5: error: use of undeclared identifier 'cudaDeviceGetStreamPriorityRange';
                                        did you mean 'hipDeviceGetStreamPriorityRange'?
/src/src/core/dflash2.cpp:206:9: error: use of undeclared identifier 'cudaStreamCreateWithPriority';
                                        did you mean 'hipStreamCreateWithPriority'?
/src/src/core/dflash2.cpp:207:9: error: use of undeclared identifier 'cudaStreamCreateWithPriority'

include/strata/platform/hip_compat/strata_hip.h maps cudaStreamCreate and cudaStreamCreateWithFlags (around line
131) but not these two. Two lines next to them fix it:

#define cudaStreamCreateWithPriority hipStreamCreateWithPriority
#define cudaDeviceGetStreamPriorityRange hipDeviceGetStreamPriorityRange

With that, ninja -C build-906 strata strata-device finishes (80/80, strata --version = 0.1.51),
strata-device --selftest passes, and the engine runs.

Why it matters: 0.1.51 is 13% faster at long context on this box

Same hardware, same flags (--layer-split 24 --kv int8 --kv-resident 32768 --spec 3 --spec-min-p 0.9 --prefill 2048 --pipeline-windows 2 --trim-stage-weights --ple-io ram --max-context 262144), 2x MI50 16 GB, Ryzen 7 5700X,
128 GB RAM (4x32 GB), IQ4_XS, five runs of a 31K prompt and two of 118K, unique text per run:

Test 0.1.46 (0.2.1) 0.1.51 (0.2.6)
31K prompt, decode median 67.8 tok/s 66.9 tok/s
31K prompt, prompt rate 557 tok/s 552 tok/s
118K prompt, decode median 53.3 tok/s 60.2 tok/s (+12.9%)
118K prompt, prompt rate 596 tok/s 593 tok/s
peak power, both cards 505 W 527 W

The two 118K runs are tight (60.0 and 60.5 against 52.6 and 54.0 before), so this is not MTP luck: something in the
0.1.47-0.1.51 decode path pays off exactly where KV streaming dominates. If "fewer GPU launches per layer" is what
did it, it also works on gfx906.

Happy to open a PR with the two-line patch if you would rather take it that way than write it yourself.

<!-- gh-comment-id:6399113688 --> @romeo5353535353-ui commented on GitHub (Oct 25, 2026): ## 0.2.6 (engine 0.1.51) on gfx906: one more two-line compat gap, and it is worth fixing for the speed Tried the current release on the same MI50 box. **The gfx906 build of 0.2.6 stops on a new file, `src/core/dflash2.cpp`**, with three errors that are the same class as the old `cublas*` ones — CUDA names used in shared code, no mapping in the HIP compat layer: ``` /src/src/core/dflash2.cpp:205:5: error: use of undeclared identifier 'cudaDeviceGetStreamPriorityRange'; did you mean 'hipDeviceGetStreamPriorityRange'? /src/src/core/dflash2.cpp:206:9: error: use of undeclared identifier 'cudaStreamCreateWithPriority'; did you mean 'hipStreamCreateWithPriority'? /src/src/core/dflash2.cpp:207:9: error: use of undeclared identifier 'cudaStreamCreateWithPriority' ``` `include/strata/platform/hip_compat/strata_hip.h` maps `cudaStreamCreate` and `cudaStreamCreateWithFlags` (around line 131) but not these two. Two lines next to them fix it: ```c #define cudaStreamCreateWithPriority hipStreamCreateWithPriority #define cudaDeviceGetStreamPriorityRange hipDeviceGetStreamPriorityRange ``` With that, `ninja -C build-906 strata strata-device` finishes (80/80, `strata --version` = **0.1.51**), `strata-device --selftest` passes, and the engine runs. ### Why it matters: 0.1.51 is 13% faster at long context on this box Same hardware, same flags (`--layer-split 24 --kv int8 --kv-resident 32768 --spec 3 --spec-min-p 0.9 --prefill 2048 --pipeline-windows 2 --trim-stage-weights --ple-io ram --max-context 262144`), 2x MI50 16 GB, Ryzen 7 5700X, 128 GB RAM (4x32 GB), IQ4_XS, five runs of a 31K prompt and two of 118K, unique text per run: | Test | 0.1.46 (0.2.1) | **0.1.51 (0.2.6)** | | --- | ---: | ---: | | 31K prompt, decode median | 67.8 tok/s | 66.9 tok/s | | 31K prompt, prompt rate | 557 tok/s | 552 tok/s | | 118K prompt, decode median | 53.3 tok/s | **60.2 tok/s** (+12.9%) | | 118K prompt, prompt rate | 596 tok/s | 593 tok/s | | peak power, both cards | 505 W | 527 W | The two 118K runs are tight (60.0 and 60.5 against 52.6 and 54.0 before), so this is not MTP luck: something in the 0.1.47-0.1.51 decode path pays off exactly where KV streaming dominates. If "fewer GPU launches per layer" is what did it, it also works on gfx906. Happy to open a PR with the two-line patch if you would rather take it that way than write it yourself.
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#1277
No description provided.