From 5552e26214691b2fef8aa0678fb2a54b623fec58 Mon Sep 17 00:00:00 2001 From: "Alexander F. Lent" Date: Fri, 14 Feb 2025 00:37:53 -0500 Subject: [PATCH] Add option for OpenVINO Backend It is disabled by default because the OpenVINO backend has a crash bug that is only fixed in v1.7.2. [1] [1]: https://github.com/ggerganov/whisper.cpp/pull/2464 Signed-off-by: Alexander F. Lent --- whisper-cpp.spec | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/whisper-cpp.spec b/whisper-cpp.spec index 9bbb207..2fee429 100644 --- a/whisper-cpp.spec +++ b/whisper-cpp.spec @@ -19,8 +19,20 @@ Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/whisper.cpp-%{versi ExclusiveArch: x86_64 aarch64 ppc64le %global toolchain clang +# OpenVINO only supports x86_64 and aarch64 +# Presently, Fedora only packages it on x86_64 +%ifarch x86_64 +# FIXME: Enable OpenVINO backend on 1.7.2 and later +%bcond_with openvino +%else +%bcond_with openvino +%endif + BuildRequires: cmake BuildRequires: clang +%if %{with openvino} +BuildRequires: openvino-devel +%endif %description High-performance inference of OpenAI's Whisper automatic speech @@ -72,6 +84,9 @@ sed -i -e 's@POSITION_INDEPENDENT_CODE ON@POSITION_INDEPENDENT_CODE ON SOVERSION %cmake \ -DWHISPER_BUILD_TESTS=ON \ +%if %{with openvino} + -DWHISPER_OPENVINO=1 \ +%endif -DGGML_NATIVE=OFF \ -DGGML_AVX=OFF \ -DGGML_AVX2=OFF \