Skip to content

Commit 1778af3

Browse files
committed
Support Vulkan in whisper.cpp on Windows and Linux
1 parent 9d5062c commit 1778af3

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/build-windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
mingw-w64-x86_64-sox
5656
mingw-w64-x86_64-svt-av1
5757
mingw-w64-x86_64-vid.stab
58+
mingw-w64-x86_64-vulkan-headers
59+
mingw-w64-x86_64-vulkan-loader
5860
mingw-w64-x86_64-x264
5961
mingw-w64-x86_64-x265
6062
mingw-w64-x86_64-zimg

scripts/build-shotcut-msys2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ function set_globals {
648648

649649
#####
650650
# whisper.cpp
651-
CONFIG[9]="cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX=$FINAL_INSTALL_DIR $CMAKE_DEBUG_FLAG -D BUILD_SHARED_LIBS=ON -D GGML_NATIVE=OFF -D WHISPER_BUILD_SERVER=OFF -D WHISPER_BUILD_TESTS=OFF"
651+
CONFIG[9]="cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX=$FINAL_INSTALL_DIR $CMAKE_DEBUG_FLAG -D BUILD_SHARED_LIBS=ON -D GGML_VULKAN=1 -D GGML_NATIVE=OFF -D WHISPER_BUILD_SERVER=OFF -D WHISPER_BUILD_TESTS=OFF"
652652
if [ "$TARGET_ARCH" = "clangarm64" ]; then
653653
CONFIG[9]="${CONFIG[9]} -D GGML_BLAS=OFF"
654654
else

scripts/build-shotcut.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ function set_globals {
11331133
CONFIG[30]="${CONFIG[30]} -D OpenMP_C_FLAGS=-I/opt/local/include/libomp -D OpenMP_CXX_FLAGS=-I/opt/local/include/libomp -D OpenMP_C_LIB_NAMES=libomp -D OpenMP_CXX_LIB_NAMES=libomp -D OpenMP_libomp_LIBRARY=omp"
11341134
LDFLAGS_[30]="$LDFLAGS -L /opt/local/lib/libomp"
11351135
else
1136-
CONFIG[30]="${CONFIG[30]} -D GGML_BLAS=ON -D GGML_BLAS_VENDOR=OpenBLAS"
1136+
CONFIG[30]="${CONFIG[30]} -D GGML_BLAS=ON -D GGML_BLAS_VENDOR=OpenBLAS -D GGML_VULKAN=1"
11371137
CFLAGS_[30]=$CFLAGS
11381138
LDFLAGS_[30]=$LDFLAGS
11391139
fi

0 commit comments

Comments
 (0)