@@ -663,24 +663,26 @@ jobs:
663
663
strategy :
664
664
matrix :
665
665
include :
666
- - build : ' noavx'
666
+ - build : ' noavx-x64 '
667
667
defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX=OFF -DLLAMA_AVX2=OFF -DLLAMA_FMA=OFF -DBUILD_SHARED_LIBS=ON'
668
- - build : ' avx2'
668
+ - build : ' avx2-x64 '
669
669
defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON'
670
- - build : ' avx'
670
+ - build : ' avx-x64 '
671
671
defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX2=OFF -DBUILD_SHARED_LIBS=ON'
672
- - build : ' avx512'
672
+ - build : ' avx512-x64 '
673
673
defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_AVX512=ON -DBUILD_SHARED_LIBS=ON'
674
- - build : ' clblast'
674
+ - build : ' clblast-x64 '
675
675
defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CLBLAST=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/clblast"'
676
- - build : ' openblas'
676
+ - build : ' openblas-x64 '
677
677
defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
678
- - build : ' kompute'
678
+ - build : ' kompute-x64 '
679
679
defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_KOMPUTE=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON -DBUILD_SHARED_LIBS=ON'
680
- - build : ' vulkan'
680
+ - build : ' vulkan-x64 '
681
681
defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_VULKAN=ON -DBUILD_SHARED_LIBS=ON'
682
- - build : ' arm64'
683
- defines : ' -A ARM64 -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON'
682
+ - build : ' llvm-arm64'
683
+ defines : ' -G Ninja -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON'
684
+ - build : ' msvc-arm64'
685
+ defines : ' -G Ninja -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-msvc.cmake -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=ON'
684
686
685
687
steps :
686
688
- name : Clone
@@ -691,21 +693,21 @@ jobs:
691
693
692
694
- name : Clone Kompute submodule
693
695
id : clone_kompute
694
- if : ${{ matrix.build == 'kompute' }}
696
+ if : ${{ matrix.build == 'kompute-x64 ' }}
695
697
run : |
696
698
git submodule update --init kompute
697
699
698
700
- name : Download OpenCL SDK
699
701
id : get_opencl
700
- if : ${{ matrix.build == 'clblast' }}
702
+ if : ${{ matrix.build == 'clblast-x64 ' }}
701
703
run : |
702
704
curl.exe -o $env:RUNNER_TEMP/opencl.zip -L "https://github.com/KhronosGroup/OpenCL-SDK/releases/download/v${env:OPENCL_VERSION}/OpenCL-SDK-v${env:OPENCL_VERSION}-Win-x64.zip"
703
705
mkdir $env:RUNNER_TEMP/opencl
704
706
tar.exe -xvf $env:RUNNER_TEMP/opencl.zip --strip-components=1 -C $env:RUNNER_TEMP/opencl
705
707
706
708
- name : Download CLBlast
707
709
id : get_clblast
708
- if : ${{ matrix.build == 'clblast' }}
710
+ if : ${{ matrix.build == 'clblast-x64 ' }}
709
711
run : |
710
712
curl.exe -o $env:RUNNER_TEMP/clblast.7z -L "https://github.com/CNugteren/CLBlast/releases/download/${env:CLBLAST_VERSION}/CLBlast-${env:CLBLAST_VERSION}-windows-x64.7z"
711
713
curl.exe -o $env:RUNNER_TEMP/CLBlast.LICENSE.txt -L "https://github.com/CNugteren/CLBlast/raw/${env:CLBLAST_VERSION}/LICENSE"
@@ -718,7 +720,7 @@ jobs:
718
720
719
721
- name : Download OpenBLAS
720
722
id : get_openblas
721
- if : ${{ matrix.build == 'openblas' }}
723
+ if : ${{ matrix.build == 'openblas-x64 ' }}
722
724
run : |
723
725
curl.exe -o $env:RUNNER_TEMP/openblas.zip -L "https://github.com/xianyi/OpenBLAS/releases/download/v${env:OPENBLAS_VERSION}/OpenBLAS-${env:OPENBLAS_VERSION}-x64.zip"
724
726
curl.exe -o $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt -L "https://github.com/xianyi/OpenBLAS/raw/v${env:OPENBLAS_VERSION}/LICENSE"
@@ -731,38 +733,41 @@ jobs:
731
733
732
734
- name : Install Vulkan SDK
733
735
id : get_vulkan
734
- if : ${{ matrix.build == 'kompute' || matrix.build == 'vulkan' }}
736
+ if : ${{ matrix.build == 'kompute-x64 ' || matrix.build == 'vulkan-x64 ' }}
735
737
run : |
736
738
curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/VulkanSDK-${env:VULKAN_VERSION}-Installer.exe"
737
739
& "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
738
740
Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
739
741
Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
740
742
743
+ - name : Install Ninja
744
+ id : install_ninja
745
+ run : |
746
+ choco install ninja
747
+
741
748
- name : Build
742
749
id : cmake_build
743
750
run : |
744
- mkdir build
745
- cd build
746
- cmake .. ${{ matrix.defines }}
747
- cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
751
+ cmake -S . -B build ${{ matrix.defines }}
752
+ cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
748
753
749
754
- name : Add clblast.dll
750
755
id : add_clblast_dll
751
- if : ${{ matrix.build == 'clblast' }}
756
+ if : ${{ matrix.build == 'clblast-x64 ' }}
752
757
run : |
753
758
cp $env:RUNNER_TEMP/clblast/lib/clblast.dll ./build/bin/Release
754
759
cp $env:RUNNER_TEMP/CLBlast.LICENSE.txt ./build/bin/Release/CLBlast-${env:CLBLAST_VERSION}.txt
755
760
756
761
- name : Add libopenblas.dll
757
762
id : add_libopenblas_dll
758
- if : ${{ matrix.build == 'openblas' }}
763
+ if : ${{ matrix.build == 'openblas-x64 ' }}
759
764
run : |
760
765
cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll
761
766
cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt
762
767
763
768
- name : Check AVX512F support
764
769
id : check_avx512f
765
- if : ${{ matrix.build == 'avx512' }}
770
+ if : ${{ matrix.build == 'avx512-x64 ' }}
766
771
continue-on-error : true
767
772
run : |
768
773
cd build
@@ -776,14 +781,14 @@ jobs:
776
781
- name : Test
777
782
id : cmake_test
778
783
# not all machines have native AVX-512
779
- if : ${{ matrix.build != 'arm64' && matrix.build != 'clblast' && matrix.build != 'kompute' && matrix.build != 'vulkan' && (matrix.build != 'avx512' || env.HAS_AVX512F == '1') }}
784
+ if : ${{ matrix.build != 'msvc- arm64' && matrix.build != 'llvm-arm64' && matrix.build != ' clblast-x64 ' && matrix.build != 'kompute-x64 ' && matrix.build != 'vulkan-x64 ' && (matrix.build != 'avx512-x64 ' || env.HAS_AVX512F == '1') }}
780
785
run : |
781
786
cd build
782
787
ctest -L main -C Release --verbose --timeout 900
783
788
784
789
- name : Test (Intel SDE)
785
790
id : cmake_test_sde
786
- if : ${{ matrix.build == 'avx512' && env.HAS_AVX512F == '0' }} # use Intel SDE for AVX-512 emulation
791
+ if : ${{ matrix.build == 'avx512-x64 ' && env.HAS_AVX512F == '0' }} # use Intel SDE for AVX-512 emulation
787
792
run : |
788
793
curl.exe -o $env:RUNNER_TEMP/sde.tar.xz -L "https://downloadmirror.intel.com/813591/sde-external-${env:SDE_VERSION}-win.tar.xz"
789
794
# for some weird reason windows tar doesn't like sde tar.xz
@@ -811,14 +816,14 @@ jobs:
811
816
if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
812
817
run : |
813
818
Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt
814
- 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-x64 .zip .\build\bin\Release\*
819
+ 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip .\build\bin\Release\*
815
820
816
821
- name : Upload artifacts
817
822
if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
818
823
uses : actions/upload-artifact@v4
819
824
with :
820
- path : llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-x64 .zip
821
- name : llama-bin-win-${{ matrix.build }}-x64 .zip
825
+ path : llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip
826
+ name : llama-bin-win-${{ matrix.build }}.zip
822
827
823
828
windows-latest-cmake-cuda :
824
829
runs-on : windows-latest
0 commit comments