Skip to content

Commit 5365d74

Browse files
committed
setup: locate nvvm for CUDA 13
CUDA 13 split libnvvm off the nvcc component and moved its dll into an x64 subdirectory, so the release job installed no nvvm at all and the hardcoded nvvm/bin copy aborted the setup. Install the nvvm sub-package and accept both the CUDA 12 and CUDA 13 dll locations, failing with a hint if none is present.
1 parent 99a1706 commit 5365d74

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/release-windows.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ jobs:
2222

2323
# The CUDA toolkit is needed so the installer ships the CUDA device
2424
# runtime (runtime_cuda + bundled nvrtc/nvvm). A network install with
25-
# just the required sub-packages keeps this reasonably small: nvcc
26-
# carries libnvvm, cudart the driver stub, nvrtc the runtime compiler.
25+
# just the required sub-packages keeps this reasonably small: cudart
26+
# provides the driver stub, nvrtc the runtime compiler. Since CUDA 13
27+
# libnvvm is no longer part of nvcc and needs its own sub-package.
2728
- name: Setup CUDA toolkit
2829
uses: Jimver/cuda-toolkit@v0.2.35
2930
with:
3031
cuda: "13.2.0"
3132
method: network
32-
sub-packages: '["nvcc", "cudart", "nvrtc", "nvrtc_dev"]'
33+
sub-packages: '["nvcc", "nvvm", "cudart", "nvrtc", "nvrtc_dev"]'
3334

3435
- name: Setup sccache
3536
uses: hendrikmuhs/ccache-action@v1.2

scripts/setup/setup_runtime.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ If ($IsLinux) {
4040
}
4141

4242
If ($HasCuda) {
43-
Copy-Item "$CUDA\nvvm\bin\nvvm*.dll" "$BIN_ROOT/" > $null
43+
# CUDA 13 moved the nvvm dll into an x64 subdirectory and split nvvm off the nvcc component
44+
$NVVM_BIN = @("$CUDA\nvvm\bin\x64", "$CUDA\nvvm\bin") | Where-Object { Test-Path -Path "$_\nvvm*.dll" } | Select-Object -First 1
45+
If ($null -eq $NVVM_BIN) {
46+
throw "No nvvm library found in '$CUDA\nvvm'. Since CUDA 13 it is provided by the separate 'nvvm' toolkit component."
47+
}
48+
Copy-Item "$NVVM_BIN\nvvm*.dll" "$BIN_ROOT/" > $null
4449
}
4550
}
4651

0 commit comments

Comments
 (0)