Skip to content

Commit 85fc343

Browse files
authored
Windows CUDA 11.8 changes (#1207)
1 parent f217c6a commit 85fc343

File tree

6 files changed

+42
-65
lines changed

6 files changed

+42
-65
lines changed

.github/workflows/build-magma-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: windows-2019
1818
strategy:
1919
matrix:
20-
cuda_version: ["117", "116"]
20+
cuda_version: ["118", "117", "116"]
2121
config: ["Release", "Debug"]
2222
env:
2323
CUDA_VERSION: ${{ matrix.cuda_version }}

conda/pytorch-nightly/bld.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if "%desired_cuda%" == "11.7" (
3333
set TORCH_CUDA_ARCH_LIST=%TORCH_CUDA_ARCH_LIST%;6.0;6.1;7.0;7.5;8.0;8.6
3434
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all --threads 2
3535
)
36+
if "%desired_cuda%" == "11.8" (
37+
set TORCH_CUDA_ARCH_LIST=%TORCH_CUDA_ARCH_LIST%;6.0;6.1;7.0;7.5;8.0;8.6
38+
set TORCH_NVCC_FLAGS=-Xfatbin -compress-all --threads 2
39+
)
3640

3741
:cuda_flags_end
3842

windows/cuda115.bat

Lines changed: 0 additions & 58 deletions
This file was deleted.

windows/cuda113.bat renamed to windows/cuda118.bat

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ IF "%NVTOOLSEXT_PATH%"=="" (
2727
)
2828
)
2929

30-
IF "%CUDA_PATH_V113%"=="" (
31-
IF EXIST "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin\nvcc.exe" (
32-
set "CUDA_PATH_V113=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3"
30+
IF "%CUDA_PATH_V118%"=="" (
31+
IF EXIST "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc.exe" (
32+
set "CUDA_PATH_V118=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8"
3333
) ELSE (
34-
echo CUDA 11.3 not found, failing
34+
echo CUDA 11.8 not found, failing
3535
exit /b 1
3636
)
3737
)
@@ -43,8 +43,8 @@ IF "%BUILD_VISION%" == "" (
4343
set NVCC_FLAGS=-D__CUDA_NO_HALF_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_86,code=compute_86
4444
)
4545

46-
set "CUDA_PATH=%CUDA_PATH_V113%"
47-
set "PATH=%CUDA_PATH_V113%\bin;%PATH%"
46+
set "CUDA_PATH=%CUDA_PATH_V118%"
47+
set "PATH=%CUDA_PATH_V118%\bin;%PATH%"
4848

4949
:optcheck
5050

windows/internal/cuda_install.bat

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ if exist "C:\\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR
2121

2222
if %CUDA_VER% EQU 116 goto cuda116
2323
if %CUDA_VER% EQU 117 goto cuda117
24+
if %CUDA_VER% EQU 118 goto cuda118
2425

2526
echo CUDA %CUDA_VERSION_STR% is not supported
2627
exit /b 1
@@ -79,6 +80,33 @@ xcopy /Y "%SRC_DIR%\temp_build\zlib\dll_x64\*.dll" "C:\Windows\System32"
7980

8081
goto cuda_common
8182

83+
:cuda118
84+
85+
set CUDA_INSTALL_EXE=cuda_11.8.0_522.06_windows.exe
86+
if not exist "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%" (
87+
curl -k -L "https://ossci-windows.s3.amazonaws.com/%CUDA_INSTALL_EXE%" --output "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%"
88+
if errorlevel 1 exit /b 1
89+
set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%"
90+
set "ARGS=thrust_11.8 nvcc_11.8 cuobjdump_11.8 nvprune_11.8 nvprof_11.8 cupti_11.8 cublas_11.8 cublas_dev_11.8 cudart_11.8 cufft_11.8 cufft_dev_11.8 curand_11.8 curand_dev_11.8 cusolver_11.8 cusolver_dev_11.8 cusparse_11.8 cusparse_dev_11.8 npp_11.8 npp_dev_11.8 nvrtc_11.8 nvrtc_dev_11.8 nvml_dev_11.8"
91+
)
92+
93+
set CUDNN_FOLDER=cudnn-windows-x86_64-8.5.0.96_cuda11-archive
94+
set CUDNN_LIB_FOLDER="lib"
95+
set "CUDNN_INSTALL_ZIP=%CUDNN_FOLDER%.zip"
96+
if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" (
97+
curl -k -L "http://s3.amazonaws.com/ossci-windows/%CUDNN_INSTALL_ZIP%" --output "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
98+
if errorlevel 1 exit /b 1
99+
set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
100+
)
101+
102+
@REM Cuda 8.3+ required zlib to be installed on the path
103+
echo Installing ZLIB dlls
104+
curl -k -L "http://s3.amazonaws.com/ossci-windows/zlib123dllx64.zip" --output "%SRC_DIR%\temp_build\zlib123dllx64.zip"
105+
7z x "%SRC_DIR%\temp_build\zlib123dllx64.zip" -o"%SRC_DIR%\temp_build\zlib"
106+
xcopy /Y "%SRC_DIR%\temp_build\zlib\dll_x64\*.dll" "C:\Windows\System32"
107+
108+
goto cuda_common
109+
82110
:cuda_common
83111
:: NOTE: We only install CUDA if we don't have it installed already.
84112
:: With GHA runners these should be pre-installed as part of our AMI process

windows/internal/smoke_test.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ if "%CUDA_VERSION%" == "116" (
7878
if "%CUDA_VERSION%" == "117" (
7979
set "CONDA_EXTRA_ARGS=-c=nvidia"
8080
)
81+
if "%CUDA_VERSION%" == "118" (
82+
set "CONDA_EXTRA_ARGS=-c=nvidia"
83+
)
8184

8285
rmdir /s /q conda
8386
del miniconda.exe

0 commit comments

Comments
 (0)