From 0cb6c908da5875bb363cfb8ea028f35bd91fe00b Mon Sep 17 00:00:00 2001 From: Stefan Walcz Date: Tue, 27 Oct 2026 07:19:35 +0100 Subject: [PATCH] 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 --- backend/go/parakeet-cpp/Makefile | 9 ++++++++- backend/go/whisper/Makefile | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/backend/go/parakeet-cpp/Makefile b/backend/go/parakeet-cpp/Makefile index 48cf3232b..e8306859c 100644 --- a/backend/go/parakeet-cpp/Makefile +++ b/backend/go/parakeet-cpp/Makefile @@ -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) diff --git a/backend/go/whisper/Makefile b/backend/go/whisper/Makefile index 5a768eb69..ed3d94b1c 100644 --- a/backend/go/whisper/Makefile +++ b/backend/go/whisper/Makefile @@ -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)