]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
cuda : fix HIPBLAS build (#2234)
authorGeorgi Gerganov <redacted>
Tue, 11 Jun 2024 16:14:38 +0000 (19:14 +0300)
committerGitHub <redacted>
Tue, 11 Jun 2024 16:14:38 +0000 (19:14 +0300)
Makefile
whisper.cpp

index 53f880e88f784fdab11ca040e64be54f8bf9a349..424933c5ad1dd03a671e3594f49f4588a609936c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -297,10 +297,10 @@ ggml-cuda/%.o: ggml-cuda/%.cu ggml-cuda/%.cuh ggml.h ggml-common.h ggml-cuda/com
 
 ggml-cuda.o: ggml-cuda.cu ggml-cuda.h ggml.h ggml-backend.h ggml-backend-impl.h ggml-common.h $(wildcard ggml-cuda/*.cuh)
        $(NVCC) $(NVCCFLAGS) $(CXXFLAGS) -Wno-pedantic -c $< -o $@
-endif
 
 whisper-mel-cuda.o: whisper-mel-cuda.cu whisper.h ggml.h ggml-backend.h whisper-mel.hpp whisper-mel-cuda.hpp
        $(NVCC) $(NVCCFLAGS) $(CXXFLAGS) -Wno-pedantic -c $< -o $@
+endif
 
 ifdef WHISPER_HIPBLAS
        ROCM_PATH   ?= /opt/rocm
index 457fef9fa96f8e5bf584350cc08f83f11bb3ee9f..a08f15ff1026476193144bfd4303c8e56635bc79 100644 (file)
@@ -3167,7 +3167,7 @@ struct mel_calc_cpu : public whisper_mel_calc {
 }
 
 whisper_mel_calc * whisper_mel_calc_create(ggml_backend_t backend, const whisper_filters & filters) {
-#if GGML_USE_CUDA
+#if defined(GGML_USE_CUDA) && !defined(GGML_USE_HIPBLAS)
     if (ggml_backend_is_cuda(backend)) {
         auto ret = whisper_mel_calc_create_cuda(backend, filters);
         // run a warmup to avoid the first kernel launch overhead (thus we get the best perf even on the first run)