Skip to content

Commit aab6976

Browse files
authored
ci : use dynamic libopenblas.dll for window-blas (#3177)
* ci : use dynamic libopenblas.dll for window-blas This commit updates the windows-blas job to use the dynamic (can load different kernels depending of the CPU arch) libopenblas.dll instead of the "static" openblas.dll that get installed by vcpgk. The motivation for this change is that there have been reports of performance drops in later version specifically related to blas. Please see the links below for more details. Resolves: #3166 Refs: #2666 (comment)
1 parent 78b31ca commit aab6976

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -629,11 +629,14 @@ jobs:
629629
arch: [Win32, x64]
630630
blas: [ON]
631631
sdl2: [ON]
632+
blasver: [0.3.29]
632633
include:
633634
- arch: Win32
634635
s2arc: x86
636+
blasfile: x86
635637
- arch: x64
636638
s2arc: x64
639+
blasfile: x64_64
637640
- sdl2: ON
638641
s2ver: 2.28.5
639642

@@ -654,7 +657,8 @@ jobs:
654657
- name: Install OpenBLAS and pkgconfiglite
655658
if: matrix.blas == 'ON'
656659
run: |
657-
vcpkg install --triplet=${{ matrix.s2arc }}-windows openblas
660+
Invoke-WebRequest "https://github.com/OpenMathLib/OpenBLAS/releases/download/v${{matrix.blasver}}/OpenBLAS-${{matrix.blasver}}_${{matrix.blasfile}}.zip" -OutFile "OpenBLAS-${{matrix.blasver}}.zip"
661+
Expand-Archive "OpenBLAS-${{matrix.blasver}}.zip" -DestinationPath "OpenBLAS-${{matrix.blasver}}"
658662
choco install pkgconfiglite
659663
660664
- name: Fetch SDL2 and set SDL2_DIR
@@ -671,6 +675,8 @@ jobs:
671675
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
672676
-DGGML_BLAS=${{ matrix.blas }}
673677
-DGGML_BLAS_VENDOR=OpenBLAS
678+
-DBLAS_LIBRARIES="$env:GITHUB_WORKSPACE/OpenBLAS-${{matrix.blasver}}/lib/libopenblas.lib"
679+
-DBLAS_INCLUDE_DIRS="$env:GITHUB_WORKSPACE/OpenBLAS-${{matrix.blasver}}/include"
674680
-DWHISPER_SDL2=${{ matrix.sdl2 }}
675681
676682
- name: Build
@@ -680,25 +686,20 @@ jobs:
680686
681687
- name: Copy openblas.dll
682688
if: matrix.blas == 'ON'
683-
run: copy "C:/vcpkg/packages/openblas_${{ matrix.s2arc }}-windows/bin/openblas.dll" build/bin/${{ matrix.build }}
689+
run: copy "$env:GITHUB_WORKSPACE/OpenBLAS-${{matrix.blasver}}/bin/libopenblas.dll" build/bin/${{ matrix.build }}
684690

685691
- name: Copy SDL2.dll
686692
if: matrix.sdl2 == 'ON'
687693
run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
688694

689-
- name: Pack bin artifacts
690-
shell: pwsh
691-
run: |
692-
Compress-Archive -Path "build/bin/${{ matrix.build }}" -DestinationPath "whisper-blas-bin-${{ matrix.arch }}.zip"
693-
694695
- name: Upload binaries
695696
if: matrix.blas == 'ON' && matrix.sdl2 == 'ON' && ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
696697
github.event.inputs.create_release == 'true' ||
697698
github.event.inputs.pre_release_tag != '' }}
698699
uses: actions/upload-artifact@v4
699700
with:
700701
name: whisper-blas-bin-${{ matrix.arch }}.zip
701-
path: whisper-blas-bin-${{ matrix.arch }}.zip
702+
path: "build/bin/${{ matrix.build }}/**"
702703

703704
windows-cublas:
704705
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' ||

0 commit comments

Comments
 (0)