Skip to content

Commit 3923024

Browse files
authored
update whisper_cpp with CUBLAS, HIPBLAS, METAL, OPENBLAS, CLBLAST support (#1302)
update whisper_cpp to 1.5.1 with OPENBLAS, METAL, HIPBLAS, CUBLAS, CLBLAST support
1 parent 710b195 commit 3923024

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RWKV_REPO?=https://github.com/donomii/go-rwkv.cpp
2222
RWKV_VERSION?=c898cd0f62df8f2a7830e53d1d513bef4f6f792b
2323

2424
# whisper.cpp version
25-
WHISPER_CPP_VERSION?=85ed71aaec8e0612a84c0b67804bde75aa75a273
25+
WHISPER_CPP_VERSION?=9d6ebd877ce7d99053423d186e6f5387a4a4753c
2626

2727
# bert.cpp version
2828
BERT_VERSION?=6abe312cded14042f6b7c3cd8edf082713334a4d
@@ -85,11 +85,13 @@ endif
8585

8686
ifeq ($(BUILD_TYPE),openblas)
8787
CGO_LDFLAGS+=-lopenblas
88+
export WHISPER_OPENBLAS=1
8889
endif
8990

9091
ifeq ($(BUILD_TYPE),cublas)
9192
CGO_LDFLAGS+=-lcublas -lcudart -L$(CUDA_LIBPATH)
9293
export LLAMA_CUBLAS=1
94+
export WHISPER_CUBLAS=1
9395
endif
9496

9597
ifeq ($(BUILD_TYPE),hipblas)
@@ -98,6 +100,7 @@ ifeq ($(BUILD_TYPE),hipblas)
98100
export CC=$(ROCM_HOME)/llvm/bin/clang
99101
# llama-ggml has no hipblas support, so override it here.
100102
export STABLE_BUILD_TYPE=
103+
export WHISPER_HIPBLAS=1
101104
GPU_TARGETS ?= gfx900,gfx90a,gfx1030,gfx1031,gfx1100
102105
AMDGPU_TARGETS ?= "$(GPU_TARGETS)"
103106
CMAKE_ARGS+=-DLLAMA_HIPBLAS=ON -DAMDGPU_TARGETS="$(AMDGPU_TARGETS)" -DGPU_TARGETS="$(GPU_TARGETS)"
@@ -107,10 +110,12 @@ endif
107110
ifeq ($(BUILD_TYPE),metal)
108111
CGO_LDFLAGS+=-framework Foundation -framework Metal -framework MetalKit -framework MetalPerformanceShaders
109112
export LLAMA_METAL=1
113+
export WHISPER_METAL=1
110114
endif
111115

112116
ifeq ($(BUILD_TYPE),clblas)
113117
CGO_LDFLAGS+=-lOpenCL -lclblast
118+
export WHISPER_CLBLAST=1
114119
endif
115120

116121
# glibc-static or glibc-devel-static required
@@ -234,6 +239,7 @@ replace:
234239
$(GOCMD) mod edit -replace github.com/go-skynet/go-ggml-transformers.cpp=$(shell pwd)/sources/go-ggml-transformers
235240
$(GOCMD) mod edit -replace github.com/donomii/go-rwkv.cpp=$(shell pwd)/sources/go-rwkv
236241
$(GOCMD) mod edit -replace github.com/ggerganov/whisper.cpp=$(shell pwd)/sources/whisper.cpp
242+
$(GOCMD) mod edit -replace github.com/ggerganov/whisper.cpp/bindings/go=$(shell pwd)/sources/whisper.cpp/bindings/go
237243
$(GOCMD) mod edit -replace github.com/go-skynet/go-bert.cpp=$(shell pwd)/sources/go-bert
238244
$(GOCMD) mod edit -replace github.com/mudler/go-stable-diffusion=$(shell pwd)/sources/go-stable-diffusion
239245
$(GOCMD) mod edit -replace github.com/mudler/go-piper=$(shell pwd)/sources/go-piper

0 commit comments

Comments
 (0)