mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-17 06:18:08 +00:00
whisper : disable CUDA mel + fix FFMPEG
This commit is contained in:
@ -77,27 +77,27 @@ if (WHISPER_OPENVINO)
|
||||
set_target_properties(${TARGET} PROPERTIES FOLDER "libs")
|
||||
endif()
|
||||
|
||||
if (GGML_CUDA)
|
||||
cmake_minimum_required(VERSION 3.18) # for CMAKE_CUDA_ARCHITECTURES
|
||||
|
||||
find_package(CUDAToolkit)
|
||||
if (CUDAToolkit_FOUND)
|
||||
message(STATUS "CUDA found")
|
||||
|
||||
if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
|
||||
# 52 == lowest CUDA 12 standard
|
||||
# 60 == f16 CUDA intrinsics
|
||||
# 61 == integer CUDA intrinsics
|
||||
# 70 == compute capability at which unrolling a loop in mul_mat_q kernels is faster
|
||||
set(CMAKE_CUDA_ARCHITECTURES "52;61;70") # lowest CUDA 12 standard + lowest for integer intrinsics
|
||||
endif()
|
||||
message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
|
||||
|
||||
enable_language(CUDA)
|
||||
else()
|
||||
message(WARNING "CUDA not found")
|
||||
endif()
|
||||
endif()
|
||||
#if (GGML_CUDA)
|
||||
# cmake_minimum_required(VERSION 3.18) # for CMAKE_CUDA_ARCHITECTURES
|
||||
#
|
||||
# find_package(CUDAToolkit)
|
||||
# if (CUDAToolkit_FOUND)
|
||||
# message(STATUS "CUDA found")
|
||||
#
|
||||
# if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
|
||||
# # 52 == lowest CUDA 12 standard
|
||||
# # 60 == f16 CUDA intrinsics
|
||||
# # 61 == integer CUDA intrinsics
|
||||
# # 70 == compute capability at which unrolling a loop in mul_mat_q kernels is faster
|
||||
# set(CMAKE_CUDA_ARCHITECTURES "52;61;70") # lowest CUDA 12 standard + lowest for integer intrinsics
|
||||
# endif()
|
||||
# message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
|
||||
#
|
||||
# enable_language(CUDA)
|
||||
# else()
|
||||
# message(WARNING "CUDA not found")
|
||||
# endif()
|
||||
#endif()
|
||||
|
||||
# whisper
|
||||
|
||||
@ -107,11 +107,12 @@ add_library(whisper
|
||||
whisper-mel.hpp
|
||||
)
|
||||
|
||||
if (GGML_CUDA)
|
||||
target_sources(whisper PRIVATE whisper-mel-cuda.cu)
|
||||
|
||||
target_link_libraries(whisper PRIVATE CUDA::cufft)
|
||||
endif()
|
||||
# TODO: disabled because it relies on ggml internals that are no longer accessible (ggml-backend-impl.h, ggml-cuda/common.cuh, ..)
|
||||
#if (GGML_CUDA)
|
||||
# target_sources(whisper PRIVATE whisper-mel-cuda.cu)
|
||||
#
|
||||
# target_link_libraries(whisper PRIVATE CUDA::cufft)
|
||||
#endif()
|
||||
|
||||
# Set the version numbers
|
||||
set_target_properties(whisper PROPERTIES
|
||||
|
@ -2,8 +2,7 @@
|
||||
#include "whisper-mel-cuda.hpp"
|
||||
#include "whisper.h"
|
||||
|
||||
#include <ggml-cuda/common.cuh>
|
||||
#include <ggml-backend-impl.h>
|
||||
#include <ggml-backend.h>
|
||||
|
||||
#include <cuda.h>
|
||||
#include <cuda_runtime.h>
|
||||
|
@ -3215,7 +3215,9 @@ struct mel_calc_cpu : public whisper_mel_calc {
|
||||
}
|
||||
|
||||
static whisper_mel_calc * whisper_mel_calc_create(ggml_backend_t backend, const whisper_filters & filters) {
|
||||
#if defined(GGML_USE_CUDA) && !defined(GGML_USE_HIPBLAS)
|
||||
// TODO: disabled because it relies on ggml internals that are no longer accessible (ggml-backend-impl.h, ggml-cuda/common.cuh, ..)
|
||||
//#if defined(GGML_USE_CUDA) && !defined(GGML_USE_HIPBLAS)
|
||||
#if 0
|
||||
if (ggml_backend_is_cuda(backend)) {
|
||||
auto ret = whisper_mel_calc_create_cuda(backend, filters);
|
||||
if (ret) {
|
||||
|
Reference in New Issue
Block a user