-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
cuda_curr_max
to CUDA 12.5 (#328)
* Update to cuda12.5 * Fix windows build for 12.5 (#329) * Improve CUDA toolkit URI generation. --------- Co-authored-by: Wesley Maxey <[email protected]>
- Loading branch information
Showing
2 changed files
with
34 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,47 @@ | ||
Param( | ||
[Parameter(Mandatory=$false)] | ||
[string] | ||
$cudaVersion="latest" | ||
$cudaVersion="12.5.0" | ||
) | ||
|
||
$cudaUri = @{ | ||
# Why did the names change??? | ||
"11.0.2" = "11.0.2/network_installers/cuda_11.0.2_win10_network.exe" | ||
"11.0.3" = "11.0.3/network_installers/cuda_11.0.3_win10_network.exe" | ||
"11.0" = "11.0.3/network_installers/cuda_11.0.3_win10_network.exe" | ||
"11.1.0" = "11.1.0/network_installers/cuda_11.1.0_win10_network.exe" | ||
"11.1.1" = "11.1.1/network_installers/cuda_11.1.1_win10_network.exe" | ||
"11.1" = "11.1.1/network_installers/cuda_11.1.1_win10_network.exe" | ||
"12.0.0" = "12.0.0/network_installers/cuda_12.0.0_windows_network.exe" | ||
"12.0.1" = "12.0.1/network_installers/cuda_12.0.1_windows_network.exe" | ||
"12.0" = "12.0.1/network_installers/cuda_12.0.1_windows_network.exe" | ||
"12.1.0" = "12.1.0/network_installers/cuda_12.1.0_windows_network.exe" | ||
"12.1.1" = "12.1.1/network_installers/cuda_12.1.1_windows_network.exe" | ||
"12.1" = "12.1.1/network_installers/cuda_12.1.1_windows_network.exe" | ||
"12.2" = "12.2.0/network_installers/cuda_12.2.0_windows_network.exe" | ||
"12.2.0" = "12.2.0/network_installers/cuda_12.2.0_windows_network.exe" | ||
"12.3" = "12.3.0/network_installers/cuda_12.3.0_windows_network.exe" | ||
"12.3.0" = "12.3.0/network_installers/cuda_12.3.0_windows_network.exe" | ||
"12.4" = "12.4.0/network_installers/cuda_12.4.0_windows_network.exe" | ||
"12.4.0" = "12.4.0/network_installers/cuda_12.4.0_windows_network.exe" | ||
"latest" = "12.4.0/network_installers/cuda_12.4.0_windows_network.exe" | ||
}[$cudaVersion] | ||
# Use System.Version to tokenize version | ||
$version = [Version]$cudaVersion | ||
|
||
# The component tags don't include patch, so we need to map input to major.minor | ||
$componentTag = @{ | ||
"11.0.2" = "11.0" | ||
"11.0.3" = "11.0" | ||
"11.0" = "11.0" | ||
"11.1.0" = "11.1" | ||
"11.1.1" = "11.1" | ||
"11.1" = "11.1" | ||
"12.0.0" = "12.0" | ||
"12.0.1" = "12.0" | ||
"12.0" = "12.0" | ||
"12.1.0" = "12.1" | ||
"12.1.1" = "12.1" | ||
"12.1" = "12.1" | ||
"12.2" = "12.2" | ||
"12.2.0" = "12.2" | ||
"12.3" = "12.3" | ||
"12.3.0" = "12.3" | ||
"12.4" = "12.4" | ||
"12.4.0" = "12.4" | ||
"latest" = "12.4" | ||
}[$cudaVersion] | ||
$major = $version.Major | ||
$minor = $version.Minor | ||
$build = $version.Build | ||
|
||
$cudaVersionUrl = "https://developer.download.nvidia.com/compute/cuda/$cudaUri" | ||
# Minimum build is 0, not -1 as default in case "12.5" is passed | ||
if ($build -lt 0) { | ||
$build = 0 | ||
} | ||
|
||
# mmb == major minor build | ||
$mmbVersionTag = "${major}.${minor}.${build}" | ||
# mm = major minor | ||
$mmVersionTag = "${major}.${minor}" | ||
|
||
$cudaMajorUri = @{ | ||
"11" = "${mmbVersionTag}/network_installers/cuda_${mmbVersionTag}_win10_network.exe" | ||
"12" = "${mmbVersionTag}/network_installers/cuda_${mmbVersionTag}_windows_network.exe" | ||
}["$major"] | ||
|
||
$cudaVersionUrl = "https://developer.download.nvidia.com/compute/cuda/$cudaMajorUri" | ||
$cudaComponents = | ||
"nvcc_$componentTag", | ||
"curand_$componentTag", | ||
"curand_dev_$componentTag", | ||
"cudart_$componentTag", | ||
"cupti_$componentTag", | ||
"nvrtc_$componentTag", | ||
"nvrtc_dev_$componentTag", | ||
"nvml_dev_$componentTag", | ||
"nvtx_$componentTag" | ||
"nvcc_$mmVersionTag", | ||
"curand_$mmVersionTag", | ||
"curand_dev_$mmVersionTag", | ||
"cudart_$mmVersionTag", | ||
"cupti_$mmVersionTag", | ||
"nvrtc_$mmVersionTag", | ||
"nvrtc_dev_$mmVersionTag", | ||
"nvml_dev_$mmVersionTag", | ||
"nvtx_$mmVersionTag" | ||
|
||
Invoke-WebRequest -Uri "$cudaVersionUrl" -OutFile "./cuda_network.exe" -UseBasicParsing | ||
Start-Process -Wait -PassThru -FilePath .\cuda_network.exe -ArgumentList "-s $cudaComponents" | ||
|
||
$ENV:PATH="$ENV:PATH;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v$componentTag\bin" | ||
$ENV:CUDA_PATH="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v$componentTag" | ||
$ENV:PATH="$ENV:PATH;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v$mmVersionTag\bin" | ||
$ENV:CUDA_PATH="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v$mmVersionTag" | ||
|
||
Remove-Item .\cuda_network.exe |