Compare commits
12 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b4c9cd758 | ||
|
|
06d46bf85c | ||
|
|
624d773521 | ||
|
|
d808be8b88 | ||
|
|
d0e377fea9 | ||
|
|
0f20225710 | ||
|
|
9e6a1264ff | ||
|
|
075e79884e | ||
|
|
2ef135cfe7 | ||
|
|
0087eeebaa | ||
|
|
1eb2ee0ee6 | ||
|
|
5552e26214 |
4 changed files with 95 additions and 79 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,3 +1,8 @@
|
||||||
/whisper.cpp-1.5.4.tar.gz
|
/whisper.cpp-1.5.4.tar.gz
|
||||||
/whisper.cpp-1.6.2.tar.gz
|
/whisper.cpp-1.6.2.tar.gz
|
||||||
/whisper.cpp-1.7.1.tar.gz
|
/whisper.cpp-1.7.1.tar.gz
|
||||||
|
/whisper.cpp-1.7.6.tar.gz
|
||||||
|
/whisper.cpp-1.8.1.tar.gz
|
||||||
|
/whisper.cpp-1.8.3.tar.gz
|
||||||
|
/whisper.cpp-1.9.2.tar.gz
|
||||||
|
/whisper.cpp-1.9.3.tar.gz
|
||||||
|
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
From 62ce17eb08b838fd4ac78d7fc3ece57694aad32a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Rix <trix@redhat.com>
|
|
||||||
Date: Sat, 20 Jan 2024 08:00:46 -0500
|
|
||||||
Subject: [PATCH] Generalize install locations
|
|
||||||
|
|
||||||
On Fedora the install location is dependent on the arch
|
|
||||||
ex/ for x86_64 libraries install to /usr/lib64
|
|
||||||
|
|
||||||
So copy how llama-cpp does its install, replacing 'llama' with 'whisper'
|
|
||||||
in the cmake variables.
|
|
||||||
|
|
||||||
Signed-off-by: Tom Rix <trix@redhat.com>
|
|
||||||
---
|
|
||||||
CMakeLists.txt | 17 ++++++++++++-----
|
|
||||||
cmake/DefaultTargetOptions.cmake | 4 ++--
|
|
||||||
2 files changed, 14 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 567a58d..01e64c4 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -549,12 +549,19 @@ set_target_properties(${TARGET} PROPERTIES PUBLIC_HEADER "ggml.h;whisper.h")
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
+set(WHISPER_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}
|
|
||||||
+ CACHE PATH "Location of header files")
|
|
||||||
+set(WHISPER_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
+ CACHE PATH "Location of library files")
|
|
||||||
+set(WHISPER_BIN_INSTALL_DIR ${CMAKE_INSTALL_BINDIR}
|
|
||||||
+ CACHE PATH "Location of binary files")
|
|
||||||
+
|
|
||||||
install(TARGETS ${TARGET}
|
|
||||||
- LIBRARY DESTINATION lib
|
|
||||||
- ARCHIVE DESTINATION lib/static
|
|
||||||
- RUNTIME DESTINATION bin
|
|
||||||
- RESOURCE DESTINATION bin
|
|
||||||
- PUBLIC_HEADER DESTINATION include
|
|
||||||
+ LIBRARY DESTINATION "${WHISPER_LIB_INSTALL_DIR}"
|
|
||||||
+ ARCHIVE DESTINATION "${WHISPER_LIB_INSTALL_DIR}/static"
|
|
||||||
+ RUNTIME DESTINATION "${WHISPER_BIN_INSTALL_DIR}"
|
|
||||||
+ RESOURCE DESTINATION "${WHISPER_BIN_INSTALL_DIR}"
|
|
||||||
+ PUBLIC_HEADER DESTINATION "${WHISPER_INCLUDE_INSTALL_DIR}"
|
|
||||||
)
|
|
||||||
|
|
||||||
#
|
|
||||||
diff --git a/cmake/DefaultTargetOptions.cmake b/cmake/DefaultTargetOptions.cmake
|
|
||||||
index b4e93e3..277b99e 100644
|
|
||||||
--- a/cmake/DefaultTargetOptions.cmake
|
|
||||||
+++ b/cmake/DefaultTargetOptions.cmake
|
|
||||||
@@ -12,6 +12,6 @@ target_compile_features(${TARGET}
|
|
||||||
set_target_properties(${TARGET}
|
|
||||||
PROPERTIES
|
|
||||||
EXPORT_COMPILE_COMMANDS ON
|
|
||||||
- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
|
||||||
- INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib"
|
|
||||||
+ RUNTIME_OUTPUT_DIRECTORY "${WHISPER_BIN_INSTALL_DIR}"
|
|
||||||
+ INSTALL_RPATH "${WHISPER_LIB_INSTALL_DIR}"
|
|
||||||
)
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
||||||
4
sources
4
sources
|
|
@ -1,3 +1 @@
|
||||||
SHA512 (whisper.cpp-1.5.4.tar.gz) = 0375c32bc5a590e6152e1a37059554371ceab99b3c93a733c084cec356c477ab2bc2d78fc0b661104153be0becb41f0edeff68ab762cb51c528309055c141455
|
SHA512 (whisper.cpp-1.9.3.tar.gz) = 5e01ca94a49438b71e38c3cab710cf75a7aa76a1ae03fe8f81b1a5beb794becb1ae1c6e078e3eea5526e4ad89ae4cc0306d17974541050afb3a7ac1d09f94768
|
||||||
SHA512 (whisper.cpp-1.6.2.tar.gz) = 17e0485fb93fdea1a89f584a64db35f05371e0b8710a539f0dffca30bd3a2fff44c72ea754556566ca3cc55415b1e8f2bb868665437f5c93b9ce666b4fe53fb3
|
|
||||||
SHA512 (whisper.cpp-1.7.1.tar.gz) = 944d8a6e4a770462e77139d918fd1d5b93efca377051d83a584d91164ec73fa50b5bfbc7d85014151b3b5c80fa59cfd386e456960401f8b3c66a9788585cac46
|
|
||||||
|
|
|
||||||
103
whisper-cpp.spec
103
whisper-cpp.spec
|
|
@ -8,19 +8,63 @@ License: MIT
|
||||||
# examples/whisper.android/gradlew*
|
# examples/whisper.android/gradlew*
|
||||||
# These are not distributed
|
# These are not distributed
|
||||||
|
|
||||||
Version: 1.7.1
|
Version: 1.9.3
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
|
|
||||||
URL: https://github.com/ggerganov/whisper.cpp
|
URL: https://github.com/ggerganov/whisper.cpp
|
||||||
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/whisper.cpp-%{version}.tar.gz
|
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/whisper.cpp-%{version}.tar.gz
|
||||||
# https://github.com/ggerganov/whisper.cpp/pull/1791
|
|
||||||
# Patch0: 0001-Generalize-install-locations.patch
|
|
||||||
|
|
||||||
ExclusiveArch: x86_64 aarch64 ppc64le
|
ExclusiveArch: x86_64 aarch64 ppc64le
|
||||||
%global toolchain clang
|
%global toolchain gcc
|
||||||
|
|
||||||
|
# OpenVINO only supports x86_64 and aarch64
|
||||||
|
# Presently, Fedora only packages it on x86_64
|
||||||
|
%ifarch x86_64
|
||||||
|
# FTBFS 7/27/26 openvino needs rebuilding at least
|
||||||
|
%bcond_with openvino
|
||||||
|
%bcond_without rocm
|
||||||
|
%else
|
||||||
|
%bcond_with openvino
|
||||||
|
%bcond_with rocm
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with openvino}
|
||||||
|
%global build_openvino ON
|
||||||
|
%else
|
||||||
|
%global build_openvino OFF
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with rocm}
|
||||||
|
%global build_rocm ON
|
||||||
|
# need our own gpu list, without gfx1250
|
||||||
|
%global rocm_gpu_list "gfx9-generic;gfx942;gfx950;gfx10-1-generic;gfx10-3-generic;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201"
|
||||||
|
%else
|
||||||
|
%global build_rocm OFF
|
||||||
|
%global rocm_gpu_list %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%bcond_with test
|
||||||
|
%if %{with test}
|
||||||
|
%global build_test ON
|
||||||
|
%else
|
||||||
|
%global build_test OFF
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%global sover %{version}
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: clang
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: git
|
||||||
|
|
||||||
|
%if %{with openvino}
|
||||||
|
BuildRequires: openvino-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with rocm}
|
||||||
|
BuildRequires: hipblas-devel
|
||||||
|
BuildRequires: rocblas-devel
|
||||||
|
BuildRequires: rocm-rpm-macros
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
High-performance inference of OpenAI's Whisper automatic speech
|
High-performance inference of OpenAI's Whisper automatic speech
|
||||||
|
|
@ -65,22 +109,35 @@ recognition (ASR) model:
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n whisper.cpp-%{version}
|
%autosetup -p1 -n whisper.cpp-%{version}
|
||||||
|
|
||||||
# verson the ggml *.so
|
|
||||||
sed -i -e 's@POSITION_INDEPENDENT_CODE ON@POSITION_INDEPENDENT_CODE ON SOVERSION ${SOVERSION}@' ggml/src/CMakeLists.txt
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%cmake \
|
%cmake \
|
||||||
-DWHISPER_BUILD_TESTS=ON \
|
-DCMAKE_HIP_ARCHITECTURES=%{rocm_gpu_list} \
|
||||||
|
-DWHISPER_BUILD_EXAMPLES=%{build_test} \
|
||||||
|
-DWHISPER_BUILD_SERVER=%{build_test} \
|
||||||
|
-DWHISPER_BUILD_TESTS=%{build_test} \
|
||||||
|
-DWHISPER_OPENVINO=%{build_openvino} \
|
||||||
|
-DGGML_HIP=%{build_rocm} \
|
||||||
-DGGML_NATIVE=OFF \
|
-DGGML_NATIVE=OFF \
|
||||||
|
-DGGML_AMX_TILE=OFF \
|
||||||
|
-DGGML_AMX_INT8=OFF \
|
||||||
|
-DGGML_AMX_BF16=OFF \
|
||||||
-DGGML_AVX=OFF \
|
-DGGML_AVX=OFF \
|
||||||
|
-DGGML_AVX_VNNI=OFF \
|
||||||
-DGGML_AVX2=OFF \
|
-DGGML_AVX2=OFF \
|
||||||
-DGGML_AVX512=OFF \
|
-DGGML_AVX512=OFF \
|
||||||
-DGGML_AVX512_VBMI=OFF \
|
-DGGML_AVX512_VBMI=OFF \
|
||||||
-DGGML_AVX512_VNNI=OFF \
|
-DGGML_AVX512_VNNI=OFF \
|
||||||
-DGGML_AVX512_BF16=OFF \
|
-DGGML_AVX512_BF16=OFF \
|
||||||
|
-DGGML_BMI2=OFF \
|
||||||
-DGGML_FMA=OFF \
|
-DGGML_FMA=OFF \
|
||||||
-DGGML_F16C=OFF
|
-DGGML_F16C=OFF \
|
||||||
|
-DGGML_LASX=OFF \
|
||||||
|
-DGGML_LSX=OFF \
|
||||||
|
-DGGML_RVV=OFF \
|
||||||
|
-DGGML_RV_ZFH=OFF \
|
||||||
|
-DGGML_SSE42=OFF \
|
||||||
|
-DGGML_XTHEADVECTOR=OFF \
|
||||||
|
-DGGML_VXE=OFF
|
||||||
|
|
||||||
%cmake_build
|
%cmake_build
|
||||||
|
|
||||||
|
|
@ -90,21 +147,39 @@ sed -i -e 's@POSITION_INDEPENDENT_CODE ON@POSITION_INDEPENDENT_CODE ON SOVERSION
|
||||||
find %{buildroot} -name 'whisper.pc' -delete
|
find %{buildroot} -name 'whisper.pc' -delete
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
# FIXME: Tests have been disabled in upstream sources since v1.7.0
|
# FIXME: Tests have been disabled in upstream sources since v1.7.0
|
||||||
%ctest
|
%ctest
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{_libdir}/libggml.so.*
|
%{_libdir}/libggml.so.*
|
||||||
|
%{_libdir}/libggml-base.so.*
|
||||||
|
%{_libdir}/libggml-cpu.so.*
|
||||||
%{_libdir}/libwhisper.so.*
|
%{_libdir}/libwhisper.so.*
|
||||||
|
%{_libdir}/libparakeet.so.*
|
||||||
|
|
||||||
|
%if %{with rocm}
|
||||||
|
%{_libdir}/libggml-hip.so.*
|
||||||
|
%endif
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{_includedir}/ggml*.h
|
%{_includedir}/*.h
|
||||||
%{_includedir}/whisper.h
|
|
||||||
%{_libdir}/libggml.so
|
%{_libdir}/libggml.so
|
||||||
|
%{_libdir}/libggml-base.so
|
||||||
|
%{_libdir}/libggml-cpu.so
|
||||||
|
%{_libdir}/libparakeet.so
|
||||||
%{_libdir}/libwhisper.so
|
%{_libdir}/libwhisper.so
|
||||||
%{_libdir}/cmake/whisper/*.cmake
|
%{_libdir}/cmake/ggml/
|
||||||
|
%{_libdir}/cmake/parakeet/
|
||||||
|
%{_libdir}/cmake/whisper/
|
||||||
|
%{_libdir}/pkgconfig/parakeet.pc
|
||||||
|
|
||||||
|
%if %{with rocm}
|
||||||
|
%{_libdir}/libggml-hip.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue