[GH-ISSUE #2459] gfx906/HIP build broken on v0.1.44.1: two compile blockers (platform/hip_compat/cublas_v2.h missing three cublas maps, and the new strata_mmq_w4a4 target missing GGML_USE_HIP) #1001

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

Originally created by @kietq8684-design on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2459

Summary

-DSTRATA_HIP_GFX906=ON no longer builds on the latest tag. v0.1.42 (61b3fb5) builds clean; v0.1.44.1 (296b59d)
fails with two independent blockers, both introduced after 0.1.42. docs/AMD_HIP.md:472 says the gfx906 engine
"is checked to compile for gfx906", so this is a regression rather than a missing feature. A 9-line patch makes
ninja -C build-906 strata finish with 149/149 linked, exit 0.

Environment

  • GPU: Radeon VII 16 GB (0x66af) + Radeon Pro VII / Instinct MI50 16 GB (0x66a1), both gfx906
  • ROCm: HIP 7.14 (hipcc 7.14.60850) from mixa3607/rocm-gfx906:7.14-complete
  • Kernel: 6.8.0-146-p2p, Ubuntu 24.04, HSA_OVERRIDE_GFX_VERSION=9.0.6
  • Build: -DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 -DSTRATA_GGML_DIR=/llama -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++, Ninja
  • llama.cpp at the pinned commit (3cf03257f)
  • git describe on the tree: v0.1.42 (61b3fb5) builds; worktree at v0.1.44.1 (296b59d) fails

Blocker 1 — include/strata/platform/hip_compat/cublas_v2.h is missing three mappings

include/strata/hip_compat/cublas_v2.h gained cublasSgemm, cublasSgemmStridedBatched and
cublasGemmStridedBatchedEx between 0.1.42 and 0.1.44.1, and src/qwen35/q36_engine.cu (new in 0.1.44.1) uses
them. But that file is not on the gfx906 include path: CMakeLists.txt:60 says the cuBLAS names are mapped by
include/strata/platform/hip_compat/, lines 138/141/142 attach it BEFORE INTERFACE, and the only strata-side
-I in compile_commands.json is -I/src/include/strata/platform/hip_compat. That second file still maps
cublasGemmEx only, so the three names are undeclared.

Fix — add to include/strata/platform/hip_compat/cublas_v2.h:

 #define cublasGemmEx hipblasGemmEx
+#define cublasSgemm hipblasSgemm
+#define cublasSgemmStridedBatched hipblasSgemmStridedBatched
+#define cublasGemmStridedBatchedEx hipblasGemmStridedBatchedEx

Blocker 2 — the new strata_mmq_w4a4 target has no GGML_USE_HIP

FAILED: CMakeFiles/strata_mmq_w4a4.dir/src/prefill/mmq_nvfp4_w4a4.cu.o
/llama/ggml/src/ggml-cuda/vendors/cuda.h:4:10: error: 'cuda.h' file not found with <angled> include
/llama/ggml/src/ggml-cuda/vendors/cuda.h:6:10: fatal error: 'cuda_bf16.h' file not found

mmq_nvfp4_w4a4.cu includes llama.cpp's common.cuh, which selects vendors/hip.h only under
#if defined(GGML_USE_HIP) and otherwise pulls vendors/cuda.h (<cuda.h>, <cuda_bf16.h> — absent in a HIP
environment; platform/hip_compat/ provides only cuda_fp16.h, cuda_runtime.h, math_constants.h).
CMakeLists.txt:1791 sets GGML_USE_HIP on strata_mmq for the gfx906 branch and :1576 has the =1 form for
gfx11, but the strata_mmq_w4a4 target added at :1449-1457 was missed. Its sibling mmq_nvfp4_w4a8.cu has the
define and compiles (877 KB .o), which is what identifies this as an omission rather than a design choice.
CUDA builds are unaffected — they want vendors/cuda.h.

Fix — in CMakeLists.txt, after target_link_libraries(strata_mmq PRIVATE strata_mmq_w4a4):

     target_link_libraries(strata_mmq PRIVATE strata_mmq_w4a4)
+    # gfx906 / HIP: this unit includes ggml-cuda's common.cuh, which only takes vendors/hip.h when
+    # GGML_USE_HIP is defined (strata_mmq gets it in the HIP branches below).  Without it the CUDA
+    # vendor headers (<cuda.h>, <cuda_bf16.h>) are pulled in and the HIP build fails.
+    if(STRATA_HIP_GFX906 OR STRATA_ENABLE_HIP)
+      target_compile_definitions(strata_mmq_w4a4 PRIVATE GGML_USE_HIP)
+    endif()

Result with the patch

ninja -C build-906 strata → 149/149 linked, exit 0, build-906/strata = 26,224,152 B (v0.1.42 is 21 MB).
Patch total: 9 lines (cublas_v2.h +3, CMakeLists.txt +6). The 0.1.42 tree is untouched.

Note (not a blocker, just a build-time observation)

strata_mmq_w4a4 is a unit that the gfx906/HIP path does not use at all, so an alternative to the define above
is to skip the target on this branch entirely — either way the HIP build should not be pulling CUDA vendor headers
for it.

Originally created by @kietq8684-design on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2459 ### Summary `-DSTRATA_HIP_GFX906=ON` no longer builds on the latest tag. v0.1.42 (`61b3fb5`) builds clean; v0.1.44.1 (`296b59d`) fails with two independent blockers, both introduced after 0.1.42. `docs/AMD_HIP.md:472` says the gfx906 engine "is checked to compile for gfx906", so this is a regression rather than a missing feature. A 9-line patch makes `ninja -C build-906 strata` finish with 149/149 linked, exit 0. ### Environment - GPU: Radeon VII 16 GB (`0x66af`) + Radeon Pro VII / Instinct MI50 16 GB (`0x66a1`), both gfx906 - ROCm: HIP 7.14 (hipcc 7.14.60850) from `mixa3607/rocm-gfx906:7.14-complete` - Kernel: 6.8.0-146-p2p, Ubuntu 24.04, `HSA_OVERRIDE_GFX_VERSION=9.0.6` - Build: `-DSTRATA_HIP_GFX906=ON -DCMAKE_HIP_ARCHITECTURES=gfx906 -DSTRATA_GGML_DIR=/llama -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++`, Ninja - llama.cpp at the pinned commit (`3cf03257f`) - `git describe` on the tree: v0.1.42 (`61b3fb5`) builds; worktree at v0.1.44.1 (`296b59d`) fails ### Blocker 1 — `include/strata/platform/hip_compat/cublas_v2.h` is missing three mappings `include/strata/hip_compat/cublas_v2.h` gained `cublasSgemm`, `cublasSgemmStridedBatched` and `cublasGemmStridedBatchedEx` between 0.1.42 and 0.1.44.1, and `src/qwen35/q36_engine.cu` (new in 0.1.44.1) uses them. But that file is **not on the gfx906 include path**: `CMakeLists.txt:60` says the cuBLAS names are mapped by `include/strata/platform/hip_compat/`, lines 138/141/142 attach it `BEFORE INTERFACE`, and the only strata-side `-I` in `compile_commands.json` is `-I/src/include/strata/platform/hip_compat`. That second file still maps `cublasGemmEx` only, so the three names are undeclared. Fix — add to `include/strata/platform/hip_compat/cublas_v2.h`: ```diff #define cublasGemmEx hipblasGemmEx +#define cublasSgemm hipblasSgemm +#define cublasSgemmStridedBatched hipblasSgemmStridedBatched +#define cublasGemmStridedBatchedEx hipblasGemmStridedBatchedEx ``` ### Blocker 2 — the new `strata_mmq_w4a4` target has no `GGML_USE_HIP` ``` FAILED: CMakeFiles/strata_mmq_w4a4.dir/src/prefill/mmq_nvfp4_w4a4.cu.o /llama/ggml/src/ggml-cuda/vendors/cuda.h:4:10: error: 'cuda.h' file not found with <angled> include /llama/ggml/src/ggml-cuda/vendors/cuda.h:6:10: fatal error: 'cuda_bf16.h' file not found ``` `mmq_nvfp4_w4a4.cu` includes llama.cpp's `common.cuh`, which selects `vendors/hip.h` only under `#if defined(GGML_USE_HIP)` and otherwise pulls `vendors/cuda.h` (`<cuda.h>`, `<cuda_bf16.h>` — absent in a HIP environment; `platform/hip_compat/` provides only `cuda_fp16.h`, `cuda_runtime.h`, `math_constants.h`). `CMakeLists.txt:1791` sets `GGML_USE_HIP` on `strata_mmq` for the gfx906 branch and `:1576` has the `=1` form for gfx11, but the `strata_mmq_w4a4` target added at `:1449-1457` was missed. Its sibling `mmq_nvfp4_w4a8.cu` has the define and compiles (877 KB `.o`), which is what identifies this as an omission rather than a design choice. CUDA builds are unaffected — they want `vendors/cuda.h`. Fix — in `CMakeLists.txt`, after `target_link_libraries(strata_mmq PRIVATE strata_mmq_w4a4)`: ```diff target_link_libraries(strata_mmq PRIVATE strata_mmq_w4a4) + # gfx906 / HIP: this unit includes ggml-cuda's common.cuh, which only takes vendors/hip.h when + # GGML_USE_HIP is defined (strata_mmq gets it in the HIP branches below). Without it the CUDA + # vendor headers (<cuda.h>, <cuda_bf16.h>) are pulled in and the HIP build fails. + if(STRATA_HIP_GFX906 OR STRATA_ENABLE_HIP) + target_compile_definitions(strata_mmq_w4a4 PRIVATE GGML_USE_HIP) + endif() ``` ### Result with the patch `ninja -C build-906 strata` → **149/149 linked, exit 0**, `build-906/strata` = 26,224,152 B (v0.1.42 is 21 MB). Patch total: 9 lines (`cublas_v2.h` +3, `CMakeLists.txt` +6). The 0.1.42 tree is untouched. ### Note (not a blocker, just a build-time observation) `strata_mmq_w4a4` is a unit that the gfx906/HIP path does not use at all, so an alternative to the define above is to skip the target on this branch entirely — either way the HIP build should not be pulling CUDA vendor headers for it.
Author
Owner

@matusnovak commented on GitHub (Oct 17, 2026):

I can confirm that when using the main branch SHA 477ac13cbe8e582c20484871ce459d20d82df09d (more-less the latest SHA at the time of writing this comment) has the problem as the issue says.

Working patch

I can confirm that this patch solves the compilation problem. This is not the same patch as the OP posted. This one below is slightly different and specific to the setup (see below the building & running instructions).

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d900326e..a30458de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1996,6 +1996,13 @@ if(STRATA_HIP_GFX906)
     file(GLOB _strata_mmq_cu ${_strata_mmq}/*.cu ${_strata_mmq}/template-instances/*.cu)
     list(APPEND _strata_cu ${_strata_mmq_cu})
     target_compile_definitions(strata_mmq PRIVATE GGML_USE_HIP)
+    # moe_fused_iq.cu's HIP branch calls f16kq's symbols; the wave32 HIP branch adds this unit to strata_mmq, the
+    # gfx906 branch took the CUDA target's source list (which does not)
+    target_sources(strata_mmq PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/prefill/moe_f16_kq.cu)
+    # the Blackwell-only W4A4 unit also includes ggml-cuda/common.cuh: on this build it must take HIP's vendors/hip.h
+    if(TARGET strata_mmq_w4a4)
+      target_compile_definitions(strata_mmq_w4a4 PRIVATE GGML_USE_HIP)
+    endif()
   endif()
   set_source_files_properties(${_strata_cu} PROPERTIES LANGUAGE HIP)
 endif()
diff --git a/include/strata/platform/hip_compat/cublas_v2.h b/include/strata/platform/hip_compat/cublas_v2.h
index fe8ea157..f1cb3a97 100644
--- a/include/strata/platform/hip_compat/cublas_v2.h
+++ b/include/strata/platform/hip_compat/cublas_v2.h
@@ -13,6 +13,9 @@
 #define cublasDestroy hipblasDestroy
 #define cublasSetStream hipblasSetStream
 #define cublasGemmEx hipblasGemmEx
+#define cublasSgemm hipblasSgemm                              // the Qwen3.6 engine's FP32 prompt products
+#define cublasSgemmStridedBatched hipblasSgemmStridedBatched
+#define cublasGemmStridedBatchedEx hipblasGemmStridedBatchedEx    // (the Qwen3.6 prompt attention, FP16)
 #define CUBLAS_OP_N HIPBLAS_OP_N
 #define CUBLAS_OP_T HIPBLAS_OP_T
 #define CUBLAS_GEMM_DEFAULT HIPBLAS_GEMM_DEFAULT

How to compile it and how to run it

Prepare a building environment. Building needs newer ROCm, so use the one from docker image mixa3607/rocm-gfx906:7.14-complete. Like this:

docker run -dit --name strata-gfx906-build \
  --device=/dev/kfd --device=/dev/dri --group-add video \
  --ipc=host --ulimit memlock=-1 \
  -v /home/ubuntu/Strata:/src \
  -w /src \
  mixa3607/rocm-gfx906:7.14-complete bash

Then execute inside the running container to build Strata:

docker exec -it strata-gfx906-build bash -lc '
  apt-get update &&
  apt-get install -y cmake ninja-build git python3 build-essential &&
  cmake -S /src -B /src/build-906 -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DSTRATA_HIP_GFX906=ON \
    -DCMAKE_HIP_ARCHITECTURES=gfx906 \
    -DSTRATA_GGML_DIR=/src/third_party/llama.cpp \
    -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang \
    -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ &&
  ninja -C /src/build-906 strata strata-device
'

Verification after building:

ls -lh /home/ubuntu/Strata/build-906/strata \
       /home/ubuntu/Strata/build-906/strata-device

docker exec -it strata-gfx906-build bash -lc '
  HSA_OVERRIDE_GFX_VERSION=9.0.6 /src/build-906/strata --help >/dev/null &&
  echo "strata --help ok"
  HSA_OVERRIDE_GFX_VERSION=9.0.6 /src/build-906/strata-device --selftest
'

Create a wrapper /home/ubuntu/Strata/engine/strata to run Strata with these contents:

#!/bin/sh
# Run the gfx906 Strata build with the ROCm 7.14 userspace that ships gfx906 kernels.
exec docker run --rm -i \
  --device=/dev/kfd --device=/dev/dri --group-add video \
  --ipc=host --ulimit memlock=-1 \
  -e HSA_OVERRIDE_GFX_VERSION=9.0.6 \
  -e HIP_VISIBLE_DEVICES \
  -e STRATA_ARENA_MMAP=1 \
  -v /home/ubuntu/Strata:/home/ubuntu/Strata \
  -v /home/ubuntu/Strata-data:/home/ubuntu/Strata-data \
  -v /opt/models:/opt/models:ro \
  -w /home/ubuntu/Strata \
  mixa3607/rocm-gfx906:7.14-complete \
  /home/ubuntu/Strata/build-906/strata "$@"

Make it executable:

chmod +x /home/ubuntu/Strata/engine/strata

Then prepare a point the JSON config and set the exe property to the wrapper /home/ubuntu/Strata/engine/strata. Example:

{
 "exe": "/home/ubuntu/Strata/engine/strata",
 "args": [
  "--pack",
  "/home/ubuntu/Strata-data/packs/unsloth-ud-iq4_xs",
  "--native",
  "/opt/models/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf",
  "--expert-profile",
  "/home/ubuntu/Strata/data/expert-profile.bin",
  "--expert-cache",
  "auto",
  "--prefill",
  "auto",
  "--spec",
  "4",
  "--spec-min-p",
  "0.5",
  "--pcie-frac",
  "0",
  "--max-context",
  "262144",
  "--kv",
  "int8"
 ],
 "cwd": "/home/ubuntu/Strata",
 "tokenizer": "/home/ubuntu/Strata-data/packs/unsloth-ud-iq4_xs/tokenizer",
 "model_name": "qwen3.8-flash-next-unsloth-ud-iq4_xs",
 "log": "/home/ubuntu/Strata/strata-unsloth-ud-iq4_xs.log",
 "port": 8080,
 "gpu": [0, 1, 2, 3],
 "layer_split": "auto",
 "backend": "hip"
}

Running it as:

cd /home/ubuntu/Strata
setsid -f .venv/bin/python serve/server.py \
  --engine strata \
  --config strata-unsloth-ud-iq4_xs.json \
  --port 8080 \
  > /tmp/server.log 2>&1 < /dev/null
<!-- gh-comment-id:6233746023 --> @matusnovak commented on GitHub (Oct 17, 2026): I can confirm that when using the `main` branch SHA `477ac13cbe8e582c20484871ce459d20d82df09d` (more-less the latest SHA at the time of writing this comment) has the problem as the issue says. ### Working patch I can confirm that this patch solves the compilation problem. This is not the same patch as the OP posted. This one below is slightly different and specific to the setup (see below the building & running instructions). ```patch diff --git a/CMakeLists.txt b/CMakeLists.txt index d900326e..a30458de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1996,6 +1996,13 @@ if(STRATA_HIP_GFX906) file(GLOB _strata_mmq_cu ${_strata_mmq}/*.cu ${_strata_mmq}/template-instances/*.cu) list(APPEND _strata_cu ${_strata_mmq_cu}) target_compile_definitions(strata_mmq PRIVATE GGML_USE_HIP) + # moe_fused_iq.cu's HIP branch calls f16kq's symbols; the wave32 HIP branch adds this unit to strata_mmq, the + # gfx906 branch took the CUDA target's source list (which does not) + target_sources(strata_mmq PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/prefill/moe_f16_kq.cu) + # the Blackwell-only W4A4 unit also includes ggml-cuda/common.cuh: on this build it must take HIP's vendors/hip.h + if(TARGET strata_mmq_w4a4) + target_compile_definitions(strata_mmq_w4a4 PRIVATE GGML_USE_HIP) + endif() endif() set_source_files_properties(${_strata_cu} PROPERTIES LANGUAGE HIP) endif() diff --git a/include/strata/platform/hip_compat/cublas_v2.h b/include/strata/platform/hip_compat/cublas_v2.h index fe8ea157..f1cb3a97 100644 --- a/include/strata/platform/hip_compat/cublas_v2.h +++ b/include/strata/platform/hip_compat/cublas_v2.h @@ -13,6 +13,9 @@ #define cublasDestroy hipblasDestroy #define cublasSetStream hipblasSetStream #define cublasGemmEx hipblasGemmEx +#define cublasSgemm hipblasSgemm // the Qwen3.6 engine's FP32 prompt products +#define cublasSgemmStridedBatched hipblasSgemmStridedBatched +#define cublasGemmStridedBatchedEx hipblasGemmStridedBatchedEx // (the Qwen3.6 prompt attention, FP16) #define CUBLAS_OP_N HIPBLAS_OP_N #define CUBLAS_OP_T HIPBLAS_OP_T #define CUBLAS_GEMM_DEFAULT HIPBLAS_GEMM_DEFAULT ``` ### How to compile it and how to run it Prepare a building environment. Building needs newer ROCm, so use the one from docker image `mixa3607/rocm-gfx906:7.14-complete`. Like this: ```bash docker run -dit --name strata-gfx906-build \ --device=/dev/kfd --device=/dev/dri --group-add video \ --ipc=host --ulimit memlock=-1 \ -v /home/ubuntu/Strata:/src \ -w /src \ mixa3607/rocm-gfx906:7.14-complete bash ``` Then execute inside the running container to build Strata: ```bash docker exec -it strata-gfx906-build bash -lc ' apt-get update && apt-get install -y cmake ninja-build git python3 build-essential && cmake -S /src -B /src/build-906 -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DSTRATA_HIP_GFX906=ON \ -DCMAKE_HIP_ARCHITECTURES=gfx906 \ -DSTRATA_GGML_DIR=/src/third_party/llama.cpp \ -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang \ -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ && ninja -C /src/build-906 strata strata-device ' ``` Verification after building: ```bash ls -lh /home/ubuntu/Strata/build-906/strata \ /home/ubuntu/Strata/build-906/strata-device docker exec -it strata-gfx906-build bash -lc ' HSA_OVERRIDE_GFX_VERSION=9.0.6 /src/build-906/strata --help >/dev/null && echo "strata --help ok" HSA_OVERRIDE_GFX_VERSION=9.0.6 /src/build-906/strata-device --selftest ' ``` Create a wrapper `/home/ubuntu/Strata/engine/strata` to run Strata with these contents: ```sh #!/bin/sh # Run the gfx906 Strata build with the ROCm 7.14 userspace that ships gfx906 kernels. exec docker run --rm -i \ --device=/dev/kfd --device=/dev/dri --group-add video \ --ipc=host --ulimit memlock=-1 \ -e HSA_OVERRIDE_GFX_VERSION=9.0.6 \ -e HIP_VISIBLE_DEVICES \ -e STRATA_ARENA_MMAP=1 \ -v /home/ubuntu/Strata:/home/ubuntu/Strata \ -v /home/ubuntu/Strata-data:/home/ubuntu/Strata-data \ -v /opt/models:/opt/models:ro \ -w /home/ubuntu/Strata \ mixa3607/rocm-gfx906:7.14-complete \ /home/ubuntu/Strata/build-906/strata "$@" ``` Make it executable: ```bash chmod +x /home/ubuntu/Strata/engine/strata ``` Then prepare a point the JSON config and set the `exe` property to the wrapper `/home/ubuntu/Strata/engine/strata`. Example: ```json { "exe": "/home/ubuntu/Strata/engine/strata", "args": [ "--pack", "/home/ubuntu/Strata-data/packs/unsloth-ud-iq4_xs", "--native", "/opt/models/Qwen3.8-Flash-Next-UD-IQ4_XS-00001-of-00003.gguf", "--expert-profile", "/home/ubuntu/Strata/data/expert-profile.bin", "--expert-cache", "auto", "--prefill", "auto", "--spec", "4", "--spec-min-p", "0.5", "--pcie-frac", "0", "--max-context", "262144", "--kv", "int8" ], "cwd": "/home/ubuntu/Strata", "tokenizer": "/home/ubuntu/Strata-data/packs/unsloth-ud-iq4_xs/tokenizer", "model_name": "qwen3.8-flash-next-unsloth-ud-iq4_xs", "log": "/home/ubuntu/Strata/strata-unsloth-ud-iq4_xs.log", "port": 8080, "gpu": [0, 1, 2, 3], "layer_split": "auto", "backend": "hip" } ``` Running it as: ```bash cd /home/ubuntu/Strata setsid -f .venv/bin/python serve/server.py \ --engine strata \ --config strata-unsloth-ud-iq4_xs.json \ --port 8080 \ > /tmp/server.log 2>&1 < /dev/null ```
Author
Owner

@kietq8684-design commented on GitHub (Oct 18, 2026):

Thanks for confirming on main 477ac13 and for the patch. Two notes:

  • The cublas maps + w4a4 GGML_USE_HIP overlap with #2460 (same fix, different placement — #2460's guard also covers STRATA_ENABLE_HIP builds).
  • The moe_f16_kq.cu line is new and needed: main added the F16 path to moe_fused_iq.cu after 0.1.44.1, and the base strata_mmq source list never included it (only the Aurora/gfx11 branch does).

I've rebased the patch onto current main (477ac13) locally with that line folded in and verified the build: ninja -C build-906 strata strata-device finishes 152/152, exit 0, in a rocm-gfx906-build:7.14 (ROCm 7.14) container with -DSTRATA_GGML_DIR pointed at the pinned llama.cpp checkout (3cf03257f); strata --help and strata-device --selftest both pass.

<!-- gh-comment-id:6251388952 --> @kietq8684-design commented on GitHub (Oct 18, 2026): Thanks for confirming on main 477ac13 and for the patch. Two notes: - The cublas maps + w4a4 `GGML_USE_HIP` overlap with #2460 (same fix, different placement — #2460's guard also covers `STRATA_ENABLE_HIP` builds). - The `moe_f16_kq.cu` line is new and needed: main added the F16 path to `moe_fused_iq.cu` after 0.1.44.1, and the base `strata_mmq` source list never included it (only the Aurora/gfx11 branch does). I've rebased the patch onto current main (477ac13) locally with that line folded in and verified the build: `ninja -C build-906 strata strata-device` finishes 152/152, exit 0, in a `rocm-gfx906-build:7.14` (ROCm 7.14) container with `-DSTRATA_GGML_DIR` pointed at the pinned llama.cpp checkout (`3cf03257f`); `strata --help` and `strata-device --selftest` both pass.
Author
Owner

@ken2425pm commented on GitHub (Oct 18, 2026):

Two data points from a system-ROCm build (no container; 2x Instinct MI50, ROCm 6.3.3 at /opt/rocm-6.3.3, clang 18):

  1. Past the cublas maps + the w4a4 GGML_USE_HIP define (covered here and in #2460), five more spots block -DSTRATA_HIP_GFX906=ON on this toolchain: the [[nodiscard]]-typed hipError_t call sites in strata_hip.h, __shared__ alignas(16) int4 in iq_kernels.cu, __ldg/host-side __half_as_ushort in q36_engine.cu, cudaInitDevice in remote_experts.cpp, and the sm_80+ device-attribute gate in qsa_prompt_attn_parity.cpp. PR #3078 carries those on top of the maps — every hunk inside a HIP guard or HIP-only macro branch, so CUDA/SYCL compile as main does by construction. On 2x MI50 the strata target links clean with -Wall -Wextra and generation runs.

  2. The gfx900 side: current-base build confirmed (details in #2009) — build-gfx900 links clean on the same toolchain with the gfx900-only fixes in place. Runtime remains untested: the MI-25 cards are on another machine.

<!-- gh-comment-id:6252826730 --> @ken2425pm commented on GitHub (Oct 18, 2026): Two data points from a system-ROCm build (no container; 2x Instinct MI50, ROCm 6.3.3 at /opt/rocm-6.3.3, clang 18): 1. Past the cublas maps + the w4a4 `GGML_USE_HIP` define (covered here and in #2460), five more spots block `-DSTRATA_HIP_GFX906=ON` on this toolchain: the `[[nodiscard]]`-typed `hipError_t` call sites in `strata_hip.h`, `__shared__ alignas(16) int4` in `iq_kernels.cu`, `__ldg`/host-side `__half_as_ushort` in `q36_engine.cu`, `cudaInitDevice` in `remote_experts.cpp`, and the sm_80+ device-attribute gate in `qsa_prompt_attn_parity.cpp`. PR #3078 carries those on top of the maps — every hunk inside a HIP guard or HIP-only macro branch, so CUDA/SYCL compile as main does by construction. On 2x MI50 the strata target links clean with `-Wall -Wextra` and generation runs. 2. The gfx900 side: current-base build confirmed (details in #2009) — `build-gfx900` links clean on the same toolchain with the gfx900-only fixes in place. Runtime remains untested: the MI-25 cards are on another machine.
Author
Owner

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

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6271067079 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Author
Owner

@kietq8684-design commented on GitHub (Oct 19, 2026):

Updating my note: #2459, #2460 and #3078 were all closed in the 0.2.0-beta tracker reset (all unmerged) — posting here since this is still the original discussion thread.

Thanks for scoping #3078 to not touch #2460's files. One data point from my side: the rebased #2460 on the same base (477ac13) builds clean in the ROCm 7.14 container (152/152 targets, selftest + --help pass) without the five fixes, so on that toolchain they aren't blockers. Do you read the five as ROCm 6.3.3-specific, or a macro-set difference — e.g. the gfx906 build not defining STRATA_USE_HIP, which would explain the two guard-widening hunks? If you reopen #3078 under the new rules, happy to continue the toolchain question there.

<!-- gh-comment-id:6279248304 --> @kietq8684-design commented on GitHub (Oct 19, 2026): Updating my note: #2459, #2460 and #3078 were all closed in the 0.2.0-beta tracker reset (all unmerged) — posting here since this is still the original discussion thread. Thanks for scoping #3078 to not touch #2460's files. One data point from my side: the rebased #2460 on the same base (477ac13) builds clean in the ROCm 7.14 container (152/152 targets, selftest + --help pass) without the five fixes, so on that toolchain they aren't blockers. Do you read the five as ROCm 6.3.3-specific, or a macro-set difference — e.g. the gfx906 build not defining STRATA_USE_HIP, which would explain the two guard-widening hunks? If you reopen #3078 under the new rules, happy to continue the toolchain question there.
Author
Owner

@ken2425pm commented on GitHub (Oct 25, 2026):

Measured answer from this box — 2x Instinct MI50, system ROCm 6.3.3 (/opt/rocm-6.3.3, clang 18), v0.2.6, the pinned ggml as cmake fetches it (3cf03257f):

Your macro-set reading holds, and v0.2.6 settles most of it:

  • qwen35 is no longer part of the gfx906 build at all, so the q36_engine fixes (__ldg, host-side __half_as_ushort) and the whole cublas territory do not apply there. Upstream also added its own cudaInitDevice shim in strata_hip.h, which retires the remote_experts guard widening.
  • dflash2.cpp settles the __HIPCC__/STRATA_USE_HIP question in your favour: it branches on STRATA_USE_HIP explicitly, the gfx906 build defines neither that nor __HIPCC__ in the C++ TUs, so it takes the CUDA branch — exactly the two-lines-in-strata_hip.h gap posted in #3172.
  • What is left as a real blocker on 6.3.3/clang 18 is one class: __shared__ alignas(16) int4 in iq_kernels.cu ("'alignas' attribute cannot be applied to types", two expdec tiles). A macro next to the existing STRATA_SHARED_ALIGN16_U32 (same file, same pattern) fixes it. With that plus the #3172 two-liner, ninja -C build-906 strata links on this box: [5/5] Linking HIP executable strata, 35.7 MB.

So your 7.14 datapoint (152/152 without the five) and this box agree: the five were ROCm 6.3.3/clang-18-specific or macro-set artifacts, and after 0.2.x only the alignas class survives on this toolchain. Reopened #3078 carries just the alignas mapping; the nodiscard-wrapper commit from the old PR is dropped — the v0.2.6 gfx906 build carries ~1,250 pre-existing -Wunused-result warnings across the HIP files, so that sweep is its own change set if anyone wants it.

<!-- gh-comment-id:6403642917 --> @ken2425pm commented on GitHub (Oct 25, 2026): Measured answer from this box — 2x Instinct MI50, system ROCm 6.3.3 (`/opt/rocm-6.3.3`, clang 18), v0.2.6, the pinned ggml as cmake fetches it (`3cf03257f`): Your macro-set reading holds, and v0.2.6 settles most of it: - **qwen35 is no longer part of the gfx906 build at all**, so the q36_engine fixes (`__ldg`, host-side `__half_as_ushort`) and the whole cublas territory do not apply there. Upstream also added its own `cudaInitDevice` shim in `strata_hip.h`, which retires the `remote_experts` guard widening. - **`dflash2.cpp` settles the `__HIPCC__`/`STRATA_USE_HIP` question in your favour**: it branches on `STRATA_USE_HIP` explicitly, the gfx906 build defines neither that nor `__HIPCC__` in the C++ TUs, so it takes the CUDA branch — exactly the two-lines-in-`strata_hip.h` gap posted in #3172. - **What is left as a real blocker on 6.3.3/clang 18** is one class: `__shared__ alignas(16) int4` in `iq_kernels.cu` ("'alignas' attribute cannot be applied to types", two expdec tiles). A macro next to the existing `STRATA_SHARED_ALIGN16_U32` (same file, same pattern) fixes it. With that plus the #3172 two-liner, `ninja -C build-906 strata` links on this box: `[5/5] Linking HIP executable strata`, 35.7 MB. So your 7.14 datapoint (152/152 without the five) and this box agree: the five were ROCm 6.3.3/clang-18-specific or macro-set artifacts, and after 0.2.x only the alignas class survives on this toolchain. Reopened #3078 carries just the alignas mapping; the nodiscard-wrapper commit from the old PR is dropped — the v0.2.6 gfx906 build carries ~1,250 pre-existing `-Wunused-result` warnings across the HIP files, so that sweep is its own change set if anyone wants it.
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#1001
No description provided.