Skip to content

Commit 200b119

Browse files
authored
ci : add GGML_NATIVE=OFF and GGML_BMI2=OFF to windows-blas (#3891)
* ci : add GGML_NATIVE=OFF and build all cpu-variants This commit adds -DGGML_BACKEND_DL=ON, -DGGML_NATIVE=OFF, and -DGGML_CPU_ALL_VARIANTS=ON to the releases. The motivation for this is that currently the Windows BLAS build uses the native CPU instructions and if target systems do not support these instructions, the build will fail like the linked issue reports. Resolves: #3889 * ci : update ubuntu-cpu release job for all variants [no ci] This commit enables the ubuntu-cpu job to include all cpu variants and ensures that the ggml backend libraries are built into the bin directory similar to how llama.cpp does it. The following is a build on my fork with this change: https://github.com/danbev/whisper.cpp/releases/tag/untagged-fc3c71f0bf0f7bf19d19
1 parent 86c40c3 commit 200b119

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ jobs:
115115
run: |
116116
cmake -B build \
117117
-DCMAKE_BUILD_TYPE=Release \
118-
-DBUILD_SHARED_LIBS=OFF \
118+
-DCMAKE_INSTALL_RPATH='$ORIGIN' \
119+
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
120+
-DGGML_BACKEND_DL=ON \
119121
-DGGML_NATIVE=OFF \
120-
${{ matrix.build == 'arm64' && '-DGGML_CPU_ARM_ARCH=armv8-a' || '' }}
122+
${{ matrix.build == 'x64' && '-DGGML_CPU_ALL_VARIANTS=ON' || '-DGGML_CPU_ARM_ARCH=armv8-a' }}
121123
cmake --build build --config Release -j $(nproc)
122124
123125
- name: Pack artifacts
@@ -173,7 +175,7 @@ jobs:
173175
-DBUILD_SHARED_LIBS=ON
174176
-DWHISPER_SDL2=${{ matrix.sdl2 }}
175177
-DGGML_NATIVE=OFF
176-
-DGGML_BMI2=OFF
178+
${{ matrix.arch == 'x64' && '-DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON' || '-DGGML_BMI2=OFF' }}
177179
178180
- name: Build
179181
run: |
@@ -287,6 +289,8 @@ jobs:
287289
-DBLAS_LIBRARIES="$env:GITHUB_WORKSPACE/OpenBLAS-${{matrix.blasver}}/lib/libopenblas.lib"
288290
-DBLAS_INCLUDE_DIRS="$env:GITHUB_WORKSPACE/OpenBLAS-${{matrix.blasver}}/include"
289291
-DWHISPER_SDL2=${{ matrix.sdl2 }}
292+
-DGGML_NATIVE=OFF
293+
${{ matrix.arch == 'x64' && '-DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON' || '-DGGML_BMI2=OFF' }}
290294
291295
- name: Build
292296
run: |
@@ -490,7 +494,10 @@ jobs:
490494
-DWHISPER_SDL2=${{ matrix.sdl2 }} ^
491495
-DSDL2_DIR="%SDL2_DIR%" ^
492496
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^
493-
-DCMAKE_CUDA_FLAGS="%CUDA_FLAGS%"
497+
-DCMAKE_CUDA_FLAGS="%CUDA_FLAGS%" ^
498+
-DGGML_BACKEND_DL=ON ^
499+
-DGGML_NATIVE=OFF ^
500+
-DGGML_CPU_ALL_VARIANTS=ON
494501
set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1
495502
cmake --build build --config ${{ matrix.build }} -j %NUMBER_OF_PROCESSORS%
496503

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ endif()
1919
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
2020

2121
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
22+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
2223

2324
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
2425
set(WHISPER_STANDALONE ON)

0 commit comments

Comments
 (0)