Merge pull request #64 from jacob-vincent-mink/feature/openvino-genai
Add OpenVINO GenAI C runtime package
This commit is contained in:
3 files changed
+105
No files matched your search
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"source": "local"
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
# Maintainer: Spencer Bull <spencer@omarchy.org>
|
||||
|
||||
pkgname=openvino-genai
|
||||
pkgver=2026.3.1.0
|
||||
pkgrel=3
|
||||
pkgdesc="OpenVINO GenAI C and C++ runtime libraries"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/openvinotoolkit/openvino.genai"
|
||||
license=('Apache-2.0')
|
||||
options=('!debug' '!lto')
|
||||
depends=(
|
||||
'gcc-libs'
|
||||
'glibc'
|
||||
'onetbb'
|
||||
'openvino=2026.3.1' # Includes libopenvino_c.so.
|
||||
)
|
||||
makedepends=(
|
||||
'cmake'
|
||||
'git'
|
||||
'ninja'
|
||||
'python'
|
||||
)
|
||||
optdepends=(
|
||||
'openvino-intel-gpu-plugin: inference on Intel GPUs'
|
||||
'openvino-intel-npu-plugin: inference on Intel NPUs'
|
||||
)
|
||||
|
||||
_commit=56d9685302da2fc5cc7c9689cfab500fd0660a02
|
||||
source=(
|
||||
"openvino.genai::git+$url.git#commit=$_commit"
|
||||
'gcc-16-char8_t.patch'
|
||||
'format-template-linkage.patch::https://github.com/openvinotoolkit/openvino.genai/commit/398fbc1450f7485368edf52dd82f45eba215d6c9.patch'
|
||||
)
|
||||
sha256sums=(
|
||||
'SKIP'
|
||||
'6e685c1e45d4b2314fd55e2f791846cc9086413ba62a6bb5e31be5a5878a243c'
|
||||
'8c2a3e4bf1d33e00b780da7bec2d5e40b6fd26a4e518359d6ff7c59ca7f649e3'
|
||||
)
|
||||
|
||||
prepare() {
|
||||
cd openvino.genai
|
||||
patch -Np1 -i "$srcdir/gcc-16-char8_t.patch"
|
||||
# Backport upstream 398fbc14: GCC -O3 can otherwise leave format<int>
|
||||
# unresolved in libopenvino_genai.so.
|
||||
patch -Np1 -i "$srcdir/format-template-linkage.patch"
|
||||
git submodule update --init --recursive
|
||||
}
|
||||
|
||||
build() {
|
||||
CFLAGS+=" -ffile-prefix-map=$srcdir=/usr/src/$pkgname"
|
||||
CXXFLAGS+=" -ffile-prefix-map=$srcdir=/usr/src/$pkgname"
|
||||
|
||||
cmake -S openvino.genai -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DENABLE_JS=OFF \
|
||||
-DENABLE_MISAKI_CPP=OFF \
|
||||
-DENABLE_PYTHON=OFF \
|
||||
-DENABLE_SAMPLES=OFF \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DENABLE_TOOLS=OFF \
|
||||
-DENABLE_XGRAMMAR=OFF
|
||||
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
check() {
|
||||
LD_LIBRARY_PATH="$srcdir/build/openvino_genai:$srcdir/build/src/c${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
|
||||
python -c 'import ctypes; ctypes.CDLL("libopenvino_c.so"); ctypes.CDLL("libopenvino_genai_c.so")'
|
||||
}
|
||||
|
||||
package() {
|
||||
install -d "$pkgdir/usr/lib" "$pkgdir/usr/share/licenses/$pkgname"
|
||||
|
||||
cp -a build/openvino_genai/libopenvino_genai.so* "$pkgdir/usr/lib/"
|
||||
cp -a build/openvino_genai/libopenvino_tokenizers.so* "$pkgdir/usr/lib/"
|
||||
cp -a build/src/c/libopenvino_genai_c.so* "$pkgdir/usr/lib/"
|
||||
|
||||
# Consumers such as omawake load the unversioned name dynamically.
|
||||
# Reject a missing/empty library or a broken symlink before publishing.
|
||||
if [[ ! -s "$pkgdir/usr/lib/libopenvino_genai_c.so" ]]; then
|
||||
error 'Required C binding is missing or empty: libopenvino_genai_c.so'
|
||||
return 1
|
||||
fi
|
||||
|
||||
install -Dm644 openvino.genai/LICENSE \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
install -Dm644 openvino.genai/third-party-programs.txt \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/third-party-programs.txt"
|
||||
install -Dm644 openvino.genai/thirdparty/openvino_tokenizers/LICENSE \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/openvino-tokenizers-LICENSE"
|
||||
install -Dm644 openvino.genai/thirdparty/openvino_tokenizers/third-party-programs.txt \
|
||||
"$pkgdir/usr/share/licenses/$pkgname/openvino-tokenizers-third-party-programs.txt"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
diff --git a/src/cpp/src/whisper/word_level_timestamps.cpp b/src/cpp/src/whisper/word_level_timestamps.cpp
|
||||
index 7b3da124..d1f9212f 100644
|
||||
--- a/src/cpp/src/whisper/word_level_timestamps.cpp
|
||||
+++ b/src/cpp/src/whisper/word_level_timestamps.cpp
|
||||
@@ -327 +327 @@ std::pair<std::vector<std::string>, std::vector<std::vector<int64_t>>> split_toke
|
||||
- const std::string replacement_char = u8"\uFFFD";
|
||||
+ const std::string replacement_char = "\xEF\xBF\xBD";
|
||||
Reference in new issue
Block a user