From 7da7a42b5d66348edc96886b234b532abd8f1bc2 Mon Sep 17 00:00:00 2001 From: Funtowicz Morgan <2241520+mfuntowicz@users.noreply.github.com> Date: Mon, 23 Nov 2026 12:04:14 +0100 Subject: [PATCH 1/2] Add CUDA 13.5 Windows ARM64 builds - Package CUDA 13.4 and 13.5 for sm_100, sm_120, and sm_121. - Parameterize the Windows ARM64 toolkit installer and update support documentation. --- .github/scripts/build-cuda.sh | 2 +- .github/scripts/install-cuda-woa.ps1 | 28 ++++++++++++++++++++++------ .github/workflows/python-package.yml | 6 ++++-- README.md | 2 +- docs/source/installation.mdx | 2 +- 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/scripts/build-cuda.sh b/.github/scripts/build-cuda.sh index a4f4b4b0a..0cd1385ab 100644 --- a/.github/scripts/build-cuda.sh +++ b/.github/scripts/build-cuda.sh @@ -9,7 +9,7 @@ if [[ -v CUDA_TARGETS ]]; then build_capability="${CUDA_TARGETS}" elif [ "${RUNNER_ARCH}" = "ARM64" ]; then if [ "${RUNNER_OS}" = "Windows" ]; then - build_capability="121" + build_capability="100;120;121" else build_capability="75;80;90" diff --git a/.github/scripts/install-cuda-woa.ps1 b/.github/scripts/install-cuda-woa.ps1 index 1d65a949f..ca818d58b 100644 --- a/.github/scripts/install-cuda-woa.ps1 +++ b/.github/scripts/install-cuda-woa.ps1 @@ -1,13 +1,29 @@ -# Installs the CUDA 13.4 preview toolkit for Windows arm64. +# Installs CUDA Toolkit 13.4 or 13.5 for Windows ARM64. +param( + [Parameter(Mandatory = $true)] + [ValidateSet("13.4.0", "13.5.0")] + [string]$CudaVersion +) + $ErrorActionPreference = "Stop" -$url = "https://packages.nvidia.com/prerelease/cuda/13.4.0/local_installers/cuda_13.4.0_windows_arm64.exe" +$versionParts = $CudaVersion.Split(".") +$cudaShortVersion = "$($versionParts[0]).$($versionParts[1])" +if ($CudaVersion -eq "13.4.0") { + $baseUrl = "https://packages.nvidia.com/prerelease/cuda" + $ccclComponent = "thrust" +} else { + $baseUrl = "https://developer.download.nvidia.com/compute/cuda" + $ccclComponent = "cccl" +} +$url = "$baseUrl/$CudaVersion/local_installers/cuda_${CudaVersion}_windows_arm64.exe" $subPackages = @( - "nvcc_13.4", "crt_13.4", "nvvm_13.4", "nvptxcompiler_13.4", - "cudart_13.4", "cublas_13.4", "cublas_dev_13.4", "thrust_13.4" + "nvcc_$cudaShortVersion", "crt_$cudaShortVersion", "nvvm_$cudaShortVersion", "nvptxcompiler_$cudaShortVersion", + "cudart_$cudaShortVersion", "cublas_$cudaShortVersion", "cublas_dev_$cudaShortVersion", + "${ccclComponent}_$cudaShortVersion" ) -$cudaPath = "$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v13.4" -$installer = Join-Path $env:RUNNER_TEMP "cuda_13.4.0.exe" +$cudaPath = "$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v$cudaShortVersion" +$installer = Join-Path $env:RUNNER_TEMP "cuda_${CudaVersion}_windows_arm64.exe" Write-Host "Downloading $url" curl.exe --fail --location --retry 3 --output $installer $url diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index fc0b196af..12a5dfe7b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -51,7 +51,7 @@ jobs: if-no-files-found: error ## - # This job matrix builds the CUDA versions of the libraries for platforms that support CUDA (Linux x64/aarch64 + Windows x64) + # This job matrix builds the CUDA versions of the libraries for platforms that support CUDA (Linux x64/aarch64 + Windows x64/ARM64) ## build-cuda: strategy: @@ -63,6 +63,8 @@ jobs: include: - os: windows-11-vs2026-arm cuda_version: "13.4.0" + - os: windows-11-vs2026-arm + cuda_version: "13.5.0" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -80,7 +82,7 @@ jobs: log-file-suffix: ${{ runner.os }}-${{ runner.arch }}-${{matrix.cuda_version}}.txt - name: Install CUDA Toolkit (WoA) if: runner.os == 'Windows' && runner.arch == 'ARM64' - run: ./.github/scripts/install-cuda-woa.ps1 + run: ./.github/scripts/install-cuda-woa.ps1 -CudaVersion "${{ matrix.cuda_version }}" shell: pwsh - name: Setup MSVC if: runner.os == 'Windows' diff --git a/README.md b/README.md index e2501a99a..554987d2f 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ bitsandbytes has the following minimum requirements for all platforms: 🟩 NVIDIA GPU
cuda - SM121 + SM100, SM120, SM121 ✅ ✅ ✅ diff --git a/docs/source/installation.mdx b/docs/source/installation.mdx index c38fa1530..4e8582da8 100644 --- a/docs/source/installation.mdx +++ b/docs/source/installation.mdx @@ -61,7 +61,7 @@ The currently distributed `bitsandbytes` packages are built with the following c | **Windows x86-64** | 11.8 - 12.6 | MSVC 19.43+ (VS2022) | sm50, sm60, sm75, sm80, sm86, sm89, sm90 | **Windows x86-64** | 12.8 | MSVC 19.43+ (VS2022) | sm70, sm75, sm80, sm86, sm89, sm90, sm100, sm120 | **Windows x86-64** | 13.0 - 13.2 | MSVC 19.43+ (VS2022) | sm75, sm80, sm86, sm89, sm90, sm100, sm120 -| **Windows arm64** | 13.4 | MSVC 19.51+ (VS2026) | sm121 +| **Windows arm64** | 13.4 - 13.5 | MSVC 19.51+ (VS2026) | sm100, sm120, sm121 The Linux build has a minimum glibc version of 2.24. From bc0e7e634ad1856b4fa5e28e70ec60878adbe711 Mon Sep 17 00:00:00 2001 From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com> Date: Tue, 24 Nov 2026 16:05:27 -0500 Subject: [PATCH 2/2] Fix WoA install, update cuda 13.4.0 -> 13.4.3 --- .github/scripts/install-cuda-woa.ps1 | 16 ++++++---------- .github/workflows/python-package.yml | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/scripts/install-cuda-woa.ps1 b/.github/scripts/install-cuda-woa.ps1 index ca818d58b..6ab001538 100644 --- a/.github/scripts/install-cuda-woa.ps1 +++ b/.github/scripts/install-cuda-woa.ps1 @@ -1,7 +1,7 @@ # Installs CUDA Toolkit 13.4 or 13.5 for Windows ARM64. param( [Parameter(Mandatory = $true)] - [ValidateSet("13.4.0", "13.5.0")] + [ValidateSet("13.4.3", "13.5.0")] [string]$CudaVersion ) @@ -9,14 +9,9 @@ $ErrorActionPreference = "Stop" $versionParts = $CudaVersion.Split(".") $cudaShortVersion = "$($versionParts[0]).$($versionParts[1])" -if ($CudaVersion -eq "13.4.0") { - $baseUrl = "https://packages.nvidia.com/prerelease/cuda" - $ccclComponent = "thrust" -} else { - $baseUrl = "https://developer.download.nvidia.com/compute/cuda" - $ccclComponent = "cccl" -} -$url = "$baseUrl/$CudaVersion/local_installers/cuda_${CudaVersion}_windows_arm64.exe" +# The CCCL subpackage is named "thrust" through 13.4 and "cccl" from 13.5 on. +$ccclComponent = if ($cudaShortVersion -eq "13.4") { "thrust" } else { "cccl" } +$url = "https://developer.download.nvidia.com/compute/cuda/$CudaVersion/local_installers/cuda_${CudaVersion}_windows_arm64.exe" $subPackages = @( "nvcc_$cudaShortVersion", "crt_$cudaShortVersion", "nvvm_$cudaShortVersion", "nvptxcompiler_$cudaShortVersion", "cudart_$cudaShortVersion", "cublas_$cudaShortVersion", "cublas_dev_$cudaShortVersion", @@ -31,8 +26,9 @@ if ($LASTEXITCODE -ne 0) { throw "Failed to download $url" } Write-Host "Installing subpackages: $($subPackages -join ' ')" $proc = Start-Process -FilePath $installer -ArgumentList (@("-s", "-n") + $subPackages) -Wait -PassThru -Remove-Item $installer -Force if ($proc.ExitCode -ne 0) { throw "CUDA installer exited with code $($proc.ExitCode)" } +# The installer can keep a handle on its own executable after exiting, so cleanup is best-effort. +Remove-Item $installer -Force -ErrorAction SilentlyContinue if (-not (Test-Path "$cudaPath\bin\nvcc.exe")) { throw "nvcc not found under $cudaPath" } diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 12a5dfe7b..323d617d2 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -62,7 +62,7 @@ jobs: ["11.8.0", "12.1.1", "12.4.1", "12.6.3", "12.8.1", "13.0.2", "13.2.0"] include: - os: windows-11-vs2026-arm - cuda_version: "13.4.0" + cuda_version: "13.4.3" - os: windows-11-vs2026-arm cuda_version: "13.5.0" runs-on: ${{ matrix.os }}