fix(backends): build whisper and parakeet-cpp for ROCm GPUs

whisper passed -DGGML_HIPBLAS=ON, which ggml no longer knows, so the
hipblas image was a CPU-only build (same issue as #10666 in
qwen3-tts-cpp). Use GGML_HIP with the ROCm clang and forward the gfx
targets. parakeet-cpp enabled PARAKEET_GGML_HIP but did not forward
the gfx targets; forward them the same way.

Docs-Not-Needed: build flags only, no user-facing behaviour or option changes.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de>
(cherry picked from commit 0cb6c908da)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Stefan Walcz authored and Ettore Di Giacinto committed 2026-11-03 14:40:50 +00:00
1 parent 9480996021
commit c41469e7fb
2 files changed
+16 -2

No files matched your search

+8 -1
View File
@@ -46,7 +46,14 @@ ifeq ($(BUILD_TYPE),cublas)
else ifeq ($(BUILD_TYPE),openblas)
CMAKE_ARGS+=-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS
else ifeq ($(BUILD_TYPE),hipblas)
CMAKE_ARGS+=-DPARAKEET_GGML_HIP=ON
# PARAKEET_GGML_HIP enables ggml's HIP backend. Use the ROCm clang and forward the
# gfx targets explicitly, as the llama-cpp and qwen3-tts-cpp backends do.
ROCM_HOME ?= /opt/rocm
ROCM_PATH ?= /opt/rocm
export CXX=$(ROCM_HOME)/llvm/bin/clang++
export CC=$(ROCM_HOME)/llvm/bin/clang
AMDGPU_TARGETS ?= gfx908,gfx90a,gfx942,gfx950,gfx1030,gfx1100,gfx1101,gfx1102,gfx1151,gfx1200,gfx1201
CMAKE_ARGS+=-DPARAKEET_GGML_HIP=ON -DAMDGPU_TARGETS=$(AMDGPU_TARGETS) -DGPU_TARGETS=$(AMDGPU_TARGETS)
else ifeq ($(BUILD_TYPE),vulkan)
CMAKE_ARGS+=-DPARAKEET_GGML_VULKAN=ON
else ifeq ($(BUILD_TYPE),metal)
+8 -1
View File
@@ -24,7 +24,14 @@ else ifeq ($(BUILD_TYPE),openblas)
else ifeq ($(BUILD_TYPE),clblas)
CMAKE_ARGS+=-DGGML_CLBLAST=ON -DCLBlast_DIR=/some/path
else ifeq ($(BUILD_TYPE),hipblas)
CMAKE_ARGS+=-DGGML_HIPBLAS=ON
# ggml only understands GGML_HIP (GGML_HIPBLAS was removed upstream) and needs the
# gfx targets forwarded; otherwise the build silently falls back to CPU (see #10666).
ROCM_HOME ?= /opt/rocm
ROCM_PATH ?= /opt/rocm
export CXX=$(ROCM_HOME)/llvm/bin/clang++
export CC=$(ROCM_HOME)/llvm/bin/clang
AMDGPU_TARGETS ?= gfx908,gfx90a,gfx942,gfx950,gfx1030,gfx1100,gfx1101,gfx1102,gfx1151,gfx1200,gfx1201
CMAKE_ARGS+=-DGGML_HIP=ON -DAMDGPU_TARGETS=$(AMDGPU_TARGETS) -DGPU_TARGETS=$(AMDGPU_TARGETS)
else ifeq ($(BUILD_TYPE),vulkan)
CMAKE_ARGS+=-DGGML_VULKAN=ON
else ifeq ($(OS),Darwin)