From 05c02a4e7c71ea476349b49d25a3cef1b4490803 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 11 Jun 2025 07:52:33 +0200 Subject: [PATCH 1/8] ci : update windows runner to windows-2022 This commit changes the windows-2019 runner to windows-2022. The motiation for this is that the windows-2019 runner is scheduled for deprection and will be removed 2025-06-30. There are currently "burnout" periods that started 2025-06-01 and during these times jobs with windows-2019 will fails which has happened lately on our CI. Refs: https://github.com/actions/runner-images/issues/12045 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 40dd393d084..07c06212ca2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -761,7 +761,7 @@ jobs: windows-cublas: if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' || github.event.inputs.run_type == 'full-ci' }} - runs-on: windows-2019 + runs-on: windows-2022 strategy: matrix: build: [Release] From 276b55a113512b271f7397bc5a3fd0eaa1e5779a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 11 Jun 2025 08:14:03 +0200 Subject: [PATCH 2/8] squash! ci : update windows runner to windows-2022 Update paths for Visual Studio 2022 in Windows CI workflow. --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07c06212ca2..3094cc115ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -836,7 +836,7 @@ jobs: xcopy "$CUDA_TOOLKIT_DIR\visual_studio_integration-windows-x86_64-${VS_VER}-archive\*" "$CUDA_TOOLKIT_DIR" /E /I /H /Y # Visual Studio integration - xcopy "$CUDA_TOOLKIT_DIR\visual_studio_integration-windows-x86_64-${VS_VER}-archive\visual_studio_integration\MSBuildExtensions\*" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations" /E /I /H /Y + xcopy "$CUDA_TOOLKIT_DIR\visual_studio_integration-windows-x86_64-${VS_VER}-archive\visual_studio_integration\MSBuildExtensions\*" "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations" /E /I /H /Y # Set environment variables echo "$CUDA_TOOLKIT_DIR\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append @@ -894,7 +894,7 @@ jobs: xcopy "$CUDA_TOOLKIT_DIR\visual_studio_integration-windows-x86_64-${VS_VER}-archive\*" "$CUDA_TOOLKIT_DIR" /E /I /H /Y # Visual Studio integration - xcopy "$CUDA_TOOLKIT_DIR\visual_studio_integration-windows-x86_64-${VS_VER}-archive\visual_studio_integration\MSBuildExtensions\*" "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations" /E /I /H /Y + xcopy "$CUDA_TOOLKIT_DIR\visual_studio_integration-windows-x86_64-${VS_VER}-archive\visual_studio_integration\MSBuildExtensions\*" "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations" /E /I /H /Y # Set environment variables echo "$CUDA_TOOLKIT_DIR\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append @@ -922,7 +922,7 @@ jobs: - name: Build Project shell: cmd run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" cmake --version where cmake cmake -S . -B build -G "Ninja Multi-Config" ^ From 696a66cf27b9a462afcbd3c602b157cde2b33f3f Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 11 Jun 2025 08:26:06 +0200 Subject: [PATCH 3/8] ci : add unsupported compiler flag for CUDA 11.8.0 --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3094cc115ab..c3ae74de61e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -925,11 +925,17 @@ jobs: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" cmake --version where cmake + if "${{ matrix.cuda-toolkit }}" == "11.8.0" ( + set CUDA_FLAGS=-allow-unsupported-compiler + ) else ( + set CUDA_FLAGS= + ) cmake -S . -B build -G "Ninja Multi-Config" ^ -DCMAKE_BUILD_TYPE=${{ matrix.build }} ^ -DGGML_CUDA=${{ matrix.cublas }} ^ -DWHISPER_SDL2=${{ matrix.sdl2 }} ^ - -DSDL2_DIR="%SDL2_DIR%" + -DSDL2_DIR="%SDL2_DIR%" ^ + -DCMAKE_CUDA_FLAGS="%CUDA_FLAGS%" set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1 cmake --build build --config ${{ matrix.build }} -j %NUMBER_OF_PROCESSORS% From 9dedb2f188cfcf573e43aad3dabc2a815affc96e Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 11 Jun 2025 08:46:45 +0200 Subject: [PATCH 4/8] ci : try setting -allow-unsupported-compiler in envvar --- .github/workflows/build.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3ae74de61e..894b14b6e8e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -921,21 +921,17 @@ jobs: - name: Build Project shell: cmd + env: + CUDAFLAGS: -allow-unsupported-compiler run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" cmake --version where cmake - if "${{ matrix.cuda-toolkit }}" == "11.8.0" ( - set CUDA_FLAGS=-allow-unsupported-compiler - ) else ( - set CUDA_FLAGS= - ) cmake -S . -B build -G "Ninja Multi-Config" ^ -DCMAKE_BUILD_TYPE=${{ matrix.build }} ^ -DGGML_CUDA=${{ matrix.cublas }} ^ -DWHISPER_SDL2=${{ matrix.sdl2 }} ^ - -DSDL2_DIR="%SDL2_DIR%" ^ - -DCMAKE_CUDA_FLAGS="%CUDA_FLAGS%" + -DSDL2_DIR="%SDL2_DIR%" set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1 cmake --build build --config ${{ matrix.build }} -j %NUMBER_OF_PROCESSORS% From 50924fa3d98108a58af507623c67b777a65a1ced Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 11 Jun 2025 09:15:38 +0200 Subject: [PATCH 5/8] ci : set CMAKE_POLICY_VERSION_MINIMUM to 3.5 --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 894b14b6e8e..6800b901edf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -931,7 +931,8 @@ jobs: -DCMAKE_BUILD_TYPE=${{ matrix.build }} ^ -DGGML_CUDA=${{ matrix.cublas }} ^ -DWHISPER_SDL2=${{ matrix.sdl2 }} ^ - -DSDL2_DIR="%SDL2_DIR%" + -DSDL2_DIR="%SDL2_DIR%" ^ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1 cmake --build build --config ${{ matrix.build }} -j %NUMBER_OF_PROCESSORS% From afeaa8553fd5e95c69825e704da592dd786ee142 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 11 Jun 2025 09:33:53 +0200 Subject: [PATCH 6/8] ci : try upgrading CUDA toolkit to 12.4.0 --- .github/workflows/build.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6800b901edf..879b8d03fa6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -763,12 +763,13 @@ jobs: github.event.inputs.run_type == 'full-ci' }} runs-on: windows-2022 strategy: + fail-fast: false matrix: build: [Release] arch: [x64] cublas: [ON] sdl2: [ON] - cuda-toolkit: [12.2.0, 11.8.0] + cuda-toolkit: [12.4.0, 11.8.0] include: - arch: x64 sdl2: ON @@ -844,23 +845,23 @@ jobs: echo "CUDA_PATH=$CUDA_TOOLKIT_DIR" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 echo "CUDA_PATH_V11_8=$CUDA_TOOLKIT_DIR" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 - - name: Install Cuda Toolkit 12.2.0 - if: ${{ matrix.cuda-toolkit == '12.2.0' }} + - name: Install Cuda Toolkit 12.4.0 + if: ${{ matrix.cuda-toolkit == '12.4.0' }} run: | $CUDA_VERSION = ${{ matrix.cuda-toolkit }} $CUDA_TOOLKIT_DIR = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v$CUDA_VERSION" $CUDA_DOWNLOAD = "https://developer.download.nvidia.com/compute/cuda/redist" # Components versions - $CUDART_VER = "12.2.140" - $NVCC_VER = "12.2.140" - $NVRTC_VER = "12.2.140" - $CUBLAS_VER = "12.2.5.6" - $NVTX_VER = "12.2.140" - $PROFILER_VER = "12.2.140" - $VS_VER = "12.2.140" - $NVPROF_VER = "12.2.142" - $CCCL_VER = "12.2.140" + $CUDART_VER = "12.4.127" + $NVCC_VER = "12.4.131" + $NVRTC_VER = "12.4.127" + $CUBLAS_VER = "12.4.5.8" + $NVTX_VER = "12.4.127" + $PROFILER_VER = "12.4.127" + $VS_VER = "12.4.127" + $NVPROF_VER = "12.4.128" + $CCCL_VER = "12.4.127" # Create the directory where the CUDA Toolkit will be installed mkdir -p $CUDA_TOOLKIT_DIR From 35ef09029e62d42620b406a6b51bb772866c9749 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 11 Jun 2025 09:55:26 +0200 Subject: [PATCH 7/8] ci : try to fix CUDA 11.8 build for windows 2022 This commit attempts to fix the CUDA 11.8 build for Windows 2022. It is possible to download the CUDA 11.8 toolkit from the NVIDIA website for windows 2022 so it looks like this should work. --- .github/workflows/build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 879b8d03fa6..111a43ea296 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -923,17 +923,22 @@ jobs: - name: Build Project shell: cmd env: - CUDAFLAGS: -allow-unsupported-compiler run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" cmake --version where cmake + if "${{ matrix.cuda-toolkit }}" == "11.8.0" ( + set CUDA_FLAGS=-allow-unsupported-compiler -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH -D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR + ) else ( + set CUDA_FLAGS= + ) cmake -S . -B build -G "Ninja Multi-Config" ^ -DCMAKE_BUILD_TYPE=${{ matrix.build }} ^ -DGGML_CUDA=${{ matrix.cublas }} ^ -DWHISPER_SDL2=${{ matrix.sdl2 }} ^ -DSDL2_DIR="%SDL2_DIR%" ^ - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^ + -DCMAKE_CUDA_FLAGS="%CUDA_FLAGS%" set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1 cmake --build build --config ${{ matrix.build }} -j %NUMBER_OF_PROCESSORS% From af7a3bd47089407c08f7adb3ffe9bcf00a1e2d74 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 11 Jun 2025 10:18:57 +0200 Subject: [PATCH 8/8] ci: remove env from build step --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 111a43ea296..3568db32b71 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -922,7 +922,6 @@ jobs: - name: Build Project shell: cmd - env: run: | call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" cmake --version