Skip to content

Commit e66aa8c

Browse files
johnnynunezTom94
andcommitted
feat: initial support for blackwell
Co-authored-by: Thomas Müller <[email protected]>
1 parent 1e38444 commit e66aa8c

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

.github/workflows/main.yml

+10
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ jobs:
1515
strategy:
1616
matrix:
1717
include:
18+
- os: ubuntu-24.04
19+
cuda: "12.8"
20+
arch: 120
21+
- os: ubuntu-24.04
22+
cuda: "12.8"
23+
arch: 100
1824
- os: ubuntu-24.04
1925
cuda: "12.6"
2026
arch: 89
@@ -72,6 +78,10 @@ jobs:
7278
strategy:
7379
matrix:
7480
include:
81+
- os: windows-2025
82+
visual_studio: "Visual Studio 17 2022"
83+
cuda: "12.8.0"
84+
arch: 120
7585
- os: windows-2025
7686
visual_studio: "Visual Studio 17 2022"
7787
cuda: "12.6.3"

bindings/torch/setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def max_supported_compute_capability(cuda_version):
2626
return 80
2727
elif cuda_version < parse_version("11.8"):
2828
return 86
29-
else:
29+
elif cuda_version < parse_version("12.8"):
3030
return 90
31+
else:
32+
return 120
3133

3234
# Find version of tinycudann by scraping CMakeLists.txt
3335
with open(os.path.join(ROOT_DIR, "CMakeLists.txt"), "r") as cmakelists:

bindings/torch/tinycudann/modules.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import torch
1515

16-
ALL_COMPUTE_CAPABILITIES = [20, 21, 30, 35, 37, 50, 52, 53, 60, 61, 62, 70, 72, 75, 80, 86, 87, 89, 90]
16+
ALL_COMPUTE_CAPABILITIES = [20, 21, 30, 35, 37, 50, 52, 53, 60, 61, 62, 70, 72, 75, 80, 86, 87, 89, 90, 100, 101, 120]
1717

1818
if not torch.cuda.is_available():
1919
raise EnvironmentError("Unknown compute capability. Ensure PyTorch with CUDA support is installed.")

dependencies/cuda-cmake-github-actions/scripts/actions/install_cuda_windows.ps1

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Dictionary of known cuda versions and thier download URLS, which do not follow a consistent pattern :(
66
$CUDA_KNOWN_URLS = @{
7-
"8.0.44" = "http://developer.nvidia.com/compute/cuda/8.0/Prod/network_installers/cuda_8.0.44_win10_network-exe";
7+
"8.0.44" = "http://developer.nvidia.com/compute/cuda/8.0/Prod/network_installers/cuda_8.0.44_win10_network-exe";
88
"8.0.61" = "http://developer.nvidia.com/compute/cuda/8.0/Prod2/network_installers/cuda_8.0.61_win10_network-exe";
99
"9.0.176" = "http://developer.nvidia.com/compute/cuda/9.0/Prod/network_installers/cuda_9.0.176_win10_network-exe";
1010
"9.1.85" = "http://developer.nvidia.com/compute/cuda/9.1/Prod/network_installers/cuda_9.1.85_win10_network";
@@ -25,10 +25,11 @@ $CUDA_KNOWN_URLS = @{
2525
"11.3.0" = "https://developer.download.nvidia.com/compute/cuda/11.3.0/network_installers/cuda_11.3.0_win10_network.exe";
2626
"11.3.1" = "https://developer.download.nvidia.com/compute/cuda/11.3.1/network_installers/cuda_11.3.1_win10_network.exe";
2727
"11.5.0" = "https://developer.download.nvidia.com/compute/cuda/11.5.0/network_installers/cuda_11.5.0_win10_network.exe";
28-
"11.5.1" = "https://developer.download.nvidia.com/compute/cuda/11.5.1/network_installers/cuda_11.5.1_windows_network.exe";
28+
"11.5.1" = "https://developer.download.nvidia.com/compute/cuda/11.5.1/network_installers/cuda_11.5.1_windows_network.exe";
2929
"11.8.0" = "https://developer.download.nvidia.com/compute/cuda/11.8.0/network_installers/cuda_11.8.0_windows_network.exe";
3030
"12.5.0" = "https://developer.download.nvidia.com/compute/cuda/12.5.0/network_installers/cuda_12.5.0_windows_network.exe";
31-
"12.6.3" = "https://developer.download.nvidia.com/compute/cuda/12.6.3/network_installers/cuda_12.6.3_windows_network.exe";
31+
"12.6.3" = "https://developer.download.nvidia.com/compute/cuda/12.6.3/network_installers/cuda_12.6.3_windows_network.exe";
32+
"12.8.0" = "https://developer.download.nvidia.com/compute/cuda/12.8.0/network_installers/cuda_12.8.0_windows_network.exe";
3233
}
3334

3435
# @todo - change this to be based on _MSC_VER intead, or invert it to be CUDA keyed instead?
@@ -74,7 +75,7 @@ $CUDA_PATCH=$Matches.patch
7475
# Exit if visual studio is too new for the cuda version.
7576
$VISUAL_STUDIO = $env:visual_studio.trim()
7677
if ($VISUAL_STUDIO.length -ge 4) {
77-
$VISUAL_STUDIO_YEAR = $VISUAL_STUDIO.Substring($VISUAL_STUDIO.Length-4)
78+
$VISUAL_STUDIO_YEAR = $VISUAL_STUDIO.Substring($VISUAL_STUDIO.Length-4)
7879
if ($VISUAL_STUDIO_YEAR.length -eq 4 -and $VISUAL_STUDIO_MIN_CUDA.containsKey($VISUAL_STUDIO_YEAR)){
7980
$MINIMUM_CUDA_VERSION = $VISUAL_STUDIO_MIN_CUDA[$VISUAL_STUDIO_YEAR]
8081
if ([version]$CUDA_VERSION_FULL -lt [version]$MINIMUM_CUDA_VERSION) {
@@ -99,15 +100,14 @@ $CUDA_PACKAGES = ""
99100
# }
100101
# }
101102

102-
Foreach ($package in $CUDA_PACKAGES_IN) {
103+
foreach ($package in $CUDA_PACKAGES_IN) {
103104
# Make sure the correct package name is used for nvcc.
104105
if($package -eq "nvcc" -and [version]$CUDA_VERSION_FULL -lt [version]"9.1"){
105106
$package="compiler"
106107
} elseif($package -eq "compiler" -and [version]$CUDA_VERSION_FULL -ge [version]"9.1") {
107108
$package="nvcc"
108109
}
109110
$CUDA_PACKAGES += " $($package)_$($CUDA_MAJOR).$($CUDA_MINOR)"
110-
111111
}
112112
echo "$($CUDA_PACKAGES)"
113113
## -----------------
@@ -116,9 +116,9 @@ echo "$($CUDA_PACKAGES)"
116116

117117
# Select the download link if known, otherwise have a guess.
118118
$CUDA_REPO_PKG_REMOTE=""
119-
if($CUDA_KNOWN_URLS.containsKey($CUDA_VERSION_FULL)){
119+
if ($CUDA_KNOWN_URLS.containsKey($CUDA_VERSION_FULL)){
120120
$CUDA_REPO_PKG_REMOTE=$CUDA_KNOWN_URLS[$CUDA_VERSION_FULL]
121-
} else{
121+
} else {
122122
# Guess what the url is given the most recent pattern (at the time of writing, 10.1)
123123
Write-Output "note: URL for CUDA ${$CUDA_VERSION_FULL} not known, estimating."
124124
$CUDA_REPO_PKG_REMOTE="http://developer.download.nvidia.com/compute/cuda/$($CUDA_MAJOR).$($CUDA_MINOR)/Prod/network_installers/cuda_$($CUDA_VERSION_FULL)_win10_network.exe"
@@ -133,7 +133,7 @@ $CUDA_REPO_PKG_LOCAL="cuda_$($CUDA_VERSION_FULL)_win10_network.exe"
133133
# Get CUDA network installer
134134
Write-Output "Downloading CUDA Network Installer for $($CUDA_VERSION_FULL) from: $($CUDA_REPO_PKG_REMOTE)"
135135
Invoke-WebRequest $CUDA_REPO_PKG_REMOTE -OutFile $CUDA_REPO_PKG_LOCAL | Out-Null
136-
if(Test-Path -Path $CUDA_REPO_PKG_LOCAL){
136+
if (Test-Path -Path $CUDA_REPO_PKG_LOCAL){
137137
Write-Output "Downloading Complete"
138138
} else {
139139
Write-Output "Error: Failed to download $($CUDA_REPO_PKG_LOCAL) from $($CUDA_REPO_PKG_REMOTE)"

0 commit comments

Comments
 (0)