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..6ab001538 100644 --- a/.github/scripts/install-cuda-woa.ps1 +++ b/.github/scripts/install-cuda-woa.ps1 @@ -1,13 +1,24 @@ -# 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.3", "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])" +# 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_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 @@ -15,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 fc0b196af..323d617d2 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: @@ -62,7 +62,9 @@ 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 }} 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:
cuda