Spaces:
Sleeping
Sleeping
ci : add cuBLAS build workflow and fix error causing lines in CMakeLists (#867)
Browse files* Add windows build with cuBLAS
* Remove error causing lines for cuBLAS on Windows
- .github/workflows/build.yml +56 -1
- CMakeLists.txt +0 -4
.github/workflows/build.yml
CHANGED
|
@@ -235,6 +235,61 @@ jobs:
|
|
| 235 |
with:
|
| 236 |
name: whisper-blas-bin-${{ matrix.arch }}
|
| 237 |
path: build/bin/${{ matrix.build }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
|
| 239 |
emscripten:
|
| 240 |
runs-on: ubuntu-latest
|
|
@@ -305,4 +360,4 @@ jobs:
|
|
| 305 |
- name: Build
|
| 306 |
run: |
|
| 307 |
cd examples/whisper.android
|
| 308 |
-
./gradlew assembleRelease --no-daemon
|
|
|
|
| 235 |
with:
|
| 236 |
name: whisper-blas-bin-${{ matrix.arch }}
|
| 237 |
path: build/bin/${{ matrix.build }}
|
| 238 |
+
|
| 239 |
+
windows-cublas:
|
| 240 |
+
runs-on: windows-latest
|
| 241 |
+
|
| 242 |
+
strategy:
|
| 243 |
+
matrix:
|
| 244 |
+
build: [Release]
|
| 245 |
+
arch: [x64]
|
| 246 |
+
cublas: [ON]
|
| 247 |
+
sdl2: [ON]
|
| 248 |
+
include:
|
| 249 |
+
- arch: x64
|
| 250 |
+
s2arc: x64
|
| 251 |
+
- sdl2: ON
|
| 252 |
+
s2ver: 2.26.0
|
| 253 |
+
|
| 254 |
+
steps:
|
| 255 |
+
- name: Clone
|
| 256 |
+
uses: actions/checkout@v1
|
| 257 |
+
|
| 258 |
+
- name: Add msbuild to PATH
|
| 259 |
+
uses: microsoft/setup-msbuild@v1
|
| 260 |
+
|
| 261 |
+
- name: Install CUDA Toolkit
|
| 262 |
+
id: cuda-toolkit
|
| 263 |
+
uses: Jimver/[email protected]
|
| 264 |
+
|
| 265 |
+
- name: Fetch SDL2 and set SDL2_DIR
|
| 266 |
+
if: matrix.sdl2 == 'ON'
|
| 267 |
+
run: |
|
| 268 |
+
C:/msys64/usr/bin/wget.exe -qO sdl2.zip https://github.com/libsdl-org/SDL/releases/download/release-${{ matrix.s2ver }}/SDL2-devel-${{ matrix.s2ver }}-VC.zip
|
| 269 |
+
7z x sdl2.zip
|
| 270 |
+
echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
|
| 271 |
+
|
| 272 |
+
- name: Configure
|
| 273 |
+
run: >
|
| 274 |
+
cmake -S . -B ./build -A ${{ matrix.arch }}
|
| 275 |
+
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
|
| 276 |
+
-DWHISPER_CUBLAS=1
|
| 277 |
+
|
| 278 |
+
- name: Build
|
| 279 |
+
run: |
|
| 280 |
+
cd ./build
|
| 281 |
+
msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
|
| 282 |
+
|
| 283 |
+
- name: Copy SDL2.dll
|
| 284 |
+
if: matrix.sdl2 == 'ON'
|
| 285 |
+
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
|
| 286 |
+
|
| 287 |
+
- name: Upload binaries
|
| 288 |
+
if: matrix.sdl2 == 'ON'
|
| 289 |
+
uses: actions/upload-artifact@v1
|
| 290 |
+
with:
|
| 291 |
+
name: whisper-cublas-bin-${{ matrix.arch }}
|
| 292 |
+
path: build/bin/${{ matrix.build }}
|
| 293 |
|
| 294 |
emscripten:
|
| 295 |
runs-on: ubuntu-latest
|
|
|
|
| 360 |
- name: Build
|
| 361 |
run: |
|
| 362 |
cd examples/whisper.android
|
| 363 |
+
./gradlew assembleRelease --no-daemon
|
CMakeLists.txt
CHANGED
|
@@ -2,10 +2,6 @@ cmake_minimum_required (VERSION 3.0)
|
|
| 2 |
|
| 3 |
project(whisper.cpp VERSION 1.4.1)
|
| 4 |
|
| 5 |
-
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
| 6 |
-
add_compile_options(/utf-8)
|
| 7 |
-
endif ()
|
| 8 |
-
|
| 9 |
# Add path to modules
|
| 10 |
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
|
| 11 |
|
|
|
|
| 2 |
|
| 3 |
project(whisper.cpp VERSION 1.4.1)
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
# Add path to modules
|
| 6 |
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
|
| 7 |
|