This commit is contained in:
XXXXRT666 2025-10-20 12:33:54 +01:00
parent 2409f91191
commit 6bea410296
2 changed files with 6 additions and 6 deletions

View File

@ -221,7 +221,7 @@ switch ($Device) {
$cudaLine = nvidia-smi | Select-String "CUDA Version"
$version = ($cudaLine -split "CUDA Version:")[1].Trim()
Write-Info "Maximum CUDA Version Supported By Current Driver: $version"
if ([version](nvidia-smi | Select-String "CUDA Version" | ForEach-Object { ($_ -split "CUDA Version:")[1].Trim() }) -ge [version]"12.8") {
if ([version](nvidia-smi | Select-String "CUDA Version" | ForEach-Object { ($_ -split "CUDA Version:")[1].Trim() }) -ge [version]"12.0") {
Write-Warning "CUDA 12.8 Is Not Supported By Current Driver"
}
Write-Info "Installing PyTorch For CUDA 12.8..."
@ -236,7 +236,7 @@ switch ($Device) {
$cudaLine = nvidia-smi | Select-String "CUDA Version"
$version = ($cudaLine -split "CUDA Version:")[1].Trim()
Write-Info "Maximum CUDA Version Supported By Current Driver: $version"
if ([version](nvidia-smi | Select-String "CUDA Version" | ForEach-Object { ($_ -split "CUDA Version:")[1].Trim() }) -ge [version]"12.8") {
if ([version](nvidia-smi | Select-String "CUDA Version" | ForEach-Object { ($_ -split "CUDA Version:")[1].Trim() }) -ge [version]"12.0") {
Write-Warning "CUDA 12.6 Is Not Supported By Current Driver"
}
Write-Info "Installing PyTorch For CUDA 12.6..."

View File

@ -330,15 +330,15 @@ if [ "$USE_CUDA" = true ] && [ "$WORKFLOW" = false ]; then
CUDAVERSION=$(nvidia-smi | grep "CUDA Version" | sed -E 's/.*CUDA Version: ([0-9]+\.[0-9]+).*/\1/')
echo -e "${INFO}Maximum CUDA Version Supported By Current Driver: $CUDAVERSION"
if [ "$CUDA" = 128 ]; then
if awk "BEGIN {exit !($CUDAVERSION < 12.8)}"; then
echo -r "${WARNING}CUDA 12.8 Is Not Supported By Current Driver"
if awk "BEGIN {exit !($CUDAVERSION < 12.0)}"; then
echo -e "${WARNING}CUDA 12.8 Is Not Supported By Current Driver"
fi
echo -e "${INFO}Installing PyTorch For CUDA 12.8..."
run_pip_quiet torch torchao --index-url "https://download.pytorch.org/whl/cu128"
run_conda_quiet cuda-nvcc=12.8
elif [ "$CUDA" = 126 ]; then
if awk "BEGIN {exit !($CUDAVERSION < 12.6)}"; then
echo -r "${WARNING}CUDA 12.6 Is Not Supported By Current Driver"
if awk "BEGIN {exit !($CUDAVERSION < 12.0)}"; then
echo -e "${WARNING}CUDA 12.6 Is Not Supported By Current Driver"
fi
echo -e "${INFO}Installing PyTorch For CUDA 12.6..."
run_pip_quiet torch torchao --index-url "https://download.pytorch.org/whl/cu126"