mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2460] [CLOSED] 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) #4053
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#4053
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2460
Author: @kietq8684-design
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:gfx906-v01441-build-fix📝 Commits (2)
a564d1fgfx906/HIP: map cublasSgemm, cublasSgemmStridedBatched, cublasGemmStridedBatchedEx in platform hip_compat5cbef32gfx906/HIP: define GGML_USE_HIP on strata_mmq_w4a4 so it does not pull CUDA vendor headers📊 Changes
2 files changed (+9 additions, -0 deletions)
View changed files
📝
CMakeLists.txt(+6 -0)📝
include/strata/platform/hip_compat/cublas_v2.h(+3 -0)📄 Description
Fixes the build regression reported in #2459.
Summary
-DSTRATA_HIP_GFX906=ONno 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:472says 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 stratafinish with 149/149 linked, exit 0.Environment
0x66af) + Radeon Pro VII / Instinct MI50 16 GB (0x66a1), both gfx906mixa3607/rocm-gfx906:7.14-completeHSA_OVERRIDE_GFX_VERSION=9.0.6-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++, Ninja3cf03257f)git describeon the tree: v0.1.42 (61b3fb5) builds; worktree at v0.1.44.1 (296b59d) failsBlocker 1 —
include/strata/platform/hip_compat/cublas_v2.his missing three mappingsinclude/strata/hip_compat/cublas_v2.hgainedcublasSgemm,cublasSgemmStridedBatchedandcublasGemmStridedBatchedExbetween 0.1.42 and 0.1.44.1, andsrc/qwen35/q36_engine.cu(new in 0.1.44.1) usesthem. But that file is not on the gfx906 include path:
CMakeLists.txt:60says the cuBLAS names are mapped byinclude/strata/platform/hip_compat/, lines 138/141/142 attach itBEFORE INTERFACE, and the only strata-side-Iincompile_commands.jsonis-I/src/include/strata/platform/hip_compat. That second file still mapscublasGemmExonly, so the three names are undeclared.Fix — add to
include/strata/platform/hip_compat/cublas_v2.h:Blocker 2 — the new
strata_mmq_w4a4target has noGGML_USE_HIPmmq_nvfp4_w4a4.cuincludes llama.cpp'scommon.cuh, which selectsvendors/hip.honly under#if defined(GGML_USE_HIP)and otherwise pullsvendors/cuda.h(<cuda.h>,<cuda_bf16.h>— absent in a HIPenvironment;
platform/hip_compat/provides onlycuda_fp16.h,cuda_runtime.h,math_constants.h).CMakeLists.txt:1791setsGGML_USE_HIPonstrata_mmqfor the gfx906 branch and:1576has the=1form forgfx11, but the
strata_mmq_w4a4target added at:1449-1457was missed. Its siblingmmq_nvfp4_w4a8.cuhas thedefine 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, aftertarget_link_libraries(strata_mmq PRIVATE strata_mmq_w4a4):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_w4a4is a unit that the gfx906/HIP path does not use at all, so an alternative to the define aboveis to skip the target on this branch entirely — either way the HIP build should not be pulling CUDA vendor headers
for it.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.