Files
.github
CMakeModules
LICENSES
dist
externals
FidelityFX-FSR
SDL
Vulkan-Headers
cmake-modules
cpp-httplib
cpp-jwt
cubeb
discord-rpc
dynarmic
enet
ffmpeg
find-modules
getopt
glad
inih
libressl
libusb
mbedtls
microprofile
opus
sirit
vcpkg
.github
docs
ports
scripts
azure-pipelines
linux
osx
windows
azure-pipelines.yml
bootstrap-from-source.cmd
create-image.ps1
create-vmss.ps1
deploy-cuda.ps1
deploy-install-disk.ps1
deploy-inteloneapi.ps1
deploy-mpi.ps1
deploy-psexec.ps1
deploy-pwsh.ps1
deploy-settings.txt
deploy-tlssettings.ps1
deploy-visual-studio.ps1
deploy-windows-sdks.ps1
disk-space.ps1
drop-to-admin-user-prefix.ps1
provision-entire-image.ps1
sysprep.ps1
utility-prefix.ps1
validate-version-files.ps1
windows-unstable
Create-PRDiff.ps1
azure-pipelines.yml
bootstrap-from-source.sh
create-vmss-helpers.psm1
test-modified-ports.ps1
boost
buildsystems
cmake
detect_compiler
get_cmake_vars
ifw
posh-vcpkg
templates
test_ports
toolchains
Get-Changelog.ps1
addPoshVcpkgToPowershellProfile.ps1
bootstrap.ps1
bootstrap.sh
build_info.cmake
ci.baseline.txt
file_script.py
generateBaseline.py
generatePortVersionsDb.py
ports.cmake
vcpkg.schema.json
vcpkgTools.xml
vcpkg_completion.bash
vcpkg_completion.fish
vcpkg_completion.zsh
vcpkg_get_dep_info.cmake
vcpkg_get_tags.cmake
toolsrc
triplets
versions
.gitattributes
.gitignore
.vcpkg-root
CHANGELOG.md
CONTRIBUTING.md
CONTRIBUTING_zh.md
LICENSE.txt
NOTICE.txt
README.md
README_es.md
README_fr.md
README_ko_KR.md
README_zh_CN.md
SECURITY.md
bootstrap-vcpkg.bat
bootstrap-vcpkg.sh
shell.nix
xbyak
CMakeLists.txt
hooks
patches
src
CMakeLists.txt
CONTRIBUTING.md
Doxyfile
LICENSE.txt
README.md
license.txt
vcpkg.json
yuzu/externals/vcpkg/scripts/azure-pipelines/windows/deploy-cuda.ps1
2022-07-23 03:01:36 +02:00

63 lines
2.2 KiB
PowerShell
Executable File

# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT
# REPLACE WITH DROP-TO-ADMIN-USER-PREFIX.ps1
# REPLACE WITH UTILITY-PREFIX.ps1
# REPLACE WITH $CudnnUrl
$CudnnLocalZipPath = "$PSScriptRoot\cudnn-windows-x86_64-8.3.2.44_cuda11.5-archive.zip"
$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/11.6.0/network_installers/cuda_11.6.0_windows_network.exe'
$CudaFeatures = 'nvcc_11.6 cuobjdump_11.6 nvprune_11.6 cupti_11.6 memcheck_11.6 nvdisasm_11.6 nvprof_11.6 ' + `
'visual_studio_integration_11.6 visual_profiler_11.6 visual_profiler_11.6 cublas_11.6 cublas_dev_11.6 ' + `
'cudart_11.6 cufft_11.6 cufft_dev_11.6 curand_11.6 curand_dev_11.6 cusolver_11.6 cusolver_dev_11.6 ' + `
'cusparse_11.6 cusparse_dev_11.6 npp_11.6 npp_dev_11.6 nvrtc_11.6 nvrtc_dev_11.6 nvml_dev_11.6 ' + `
'occupancy_calculator_11.6 thrust_11.6 '
$destination = "$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v11.6"
try {
Write-Host 'Downloading CUDA...'
[string]$installerPath = Get-TempFilePath -Extension 'exe'
curl.exe -L -o $installerPath -s -S $CudaUrl
Write-Host 'Installing CUDA...'
$proc = Start-Process -FilePath $installerPath -ArgumentList @('-s ' + $CudaFeatures) -Wait -PassThru
$exitCode = $proc.ExitCode
if ($exitCode -eq 0) {
Write-Host 'Installation successful!'
}
else {
Write-Error "Installation failed! Exited with $exitCode."
throw
}
}
catch {
Write-Error "Failed to install CUDA! $($_.Exception.Message)"
throw
}
try {
if ([string]::IsNullOrWhiteSpace($CudnnUrl)) {
if (-Not (Test-Path $CudnnLocalZipPath)) {
throw "CUDNN zip ($CudnnLocalZipPath) was missing, please download from NVidia and place next to this script."
}
$cudnnZipPath = $CudnnLocalZipPath
} else {
Write-Host 'Downloading CUDNN...'
$cudnnZipPath = Get-TempFilePath -Extension 'zip'
curl.exe -L -o $cudnnZipPath -s -S $CudnnUrl
}
Write-Host "Installing CUDNN to $destination..."
tar.exe -xvf "$cudnnZipPath" --strip 1 --directory "$destination"
Write-Host 'Installation successful!'
}
catch {
Write-Error "Failed to install CUDNN! $($_.Exception.Message)"
throw
}