Skip to content

Commit ee7392f

Browse files
pytorchbotmanuelcandalesCopilot
authored
Make nvidia-smi non-fatal in Windows CUDA CI (#18586)
Some Windows GPU runners don't have nvidia-smi available even though the CUDA toolkit (nvcc) is properly installed. The nvidia-smi call is purely informational — the actual CUDA toolchain validation is done by nvcc --version and the version check that follows. Co-authored-by: Manuel Candales <42380156+manuelcandales@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 916ed11 commit ee7392f

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.ci/scripts/test_model_e2e_windows.ps1

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,19 @@ try {
122122
Write-Host "::group::Check CUDA toolchain"
123123
$nvccOutput = nvcc --version | Out-String
124124
Write-Host $nvccOutput
125-
nvidia-smi
125+
$nvidiaSmiCmd = Get-Command nvidia-smi -ErrorAction SilentlyContinue
126+
if ($null -eq $nvidiaSmiCmd) {
127+
Write-Host "nvidia-smi not available (command not found; driver may not be installed)"
128+
}
129+
else {
130+
try {
131+
nvidia-smi
132+
}
133+
catch {
134+
Write-Host "nvidia-smi failed (driver or GPU issue). Error details:"
135+
Write-Host $_
136+
}
137+
}
126138
if (-not [string]::IsNullOrWhiteSpace($ExpectedCudaVersion)) {
127139
$versionMatch = [Regex]::Match($nvccOutput, "release\s+(\d+\.\d+)")
128140
if (-not $versionMatch.Success) {

0 commit comments

Comments
 (0)