@@ -88,6 +88,10 @@ $CUDA_PACKAGES = ""
8888if ([version ]$CUDA_VERSION_FULL -ge [version ]" 13.0" -and -not ($CUDA_PACKAGES_IN -contains " crt" )) {
8989 $CUDA_PACKAGES_IN += " crt"
9090}
91+ # CUDA 13+ requires NVVM tooling (cicc) for nvcc compilation.
92+ if ([version ]$CUDA_VERSION_FULL -ge [version ]" 13.0" -and -not ($CUDA_PACKAGES_IN -contains " nvvm" )) {
93+ $CUDA_PACKAGES_IN += " nvvm"
94+ }
9195
9296# for CUDA >= 11 cudart is a required package.
9397# if([version]$CUDA_VERSION_FULL -ge [version]"11.0") {
@@ -98,9 +102,9 @@ if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN
98102
99103Foreach ($package in $CUDA_PACKAGES_IN ) {
100104 # Make sure the correct package name is used for nvcc.
101- if ($package -eq " nvcc" -and [version ]$CUDA_VERSION_FULL -ge [version ]" 9.1" ){
105+ if ($package -eq " nvcc" -and [version ]$CUDA_VERSION_FULL -lt [version ]" 9.1" ){
102106 $package = " compiler"
103- } elseif ($package -eq " compiler" -and [version ]$CUDA_VERSION_FULL -lt [version ]" 9.1" ) {
107+ } elseif ($package -eq " compiler" -and [version ]$CUDA_VERSION_FULL -ge [version ]" 9.1" ) {
104108 $package = " nvcc"
105109 }
106110 $CUDA_PACKAGES += " $ ( $package ) _$ ( $CUDA_MAJOR ) .$ ( $CUDA_MINOR ) "
@@ -140,12 +144,12 @@ if(Test-Path -Path $CUDA_REPO_PKG_LOCAL){
140144
141145# Invoke silent install of CUDA (via network installer)
142146Write-Output " Installing CUDA $ ( $CUDA_VERSION_FULL ) . Subpackages $ ( $CUDA_PACKAGES ) "
143- Start-Process - Wait - FilePath .\" $ ( $CUDA_REPO_PKG_LOCAL ) " - ArgumentList " -s $ ( $CUDA_PACKAGES ) "
147+ $installerProcess = Start-Process - Wait - PassThru - FilePath .\" $ ( $CUDA_REPO_PKG_LOCAL ) " - ArgumentList " -s $ ( $CUDA_PACKAGES ) "
144148
145149# Check the return status of the CUDA installer.
146- if (! $? ) {
147- Write-Output " Error: CUDA installer reported error. $ ( $LASTEXITCODE ) "
148- exit 1
150+ if ($installerProcess .ExitCode -ne 0 ) {
151+ Write-Output " Error: CUDA installer reported error. Exit code: $ ( $installerProcess .ExitCode ) "
152+ exit $installerProcess .ExitCode
149153}
150154
151155# Store the CUDA_PATH in the environment for the current session, to be forwarded in the action.
0 commit comments