Skip to content

Commit 712d3e3

Browse files
committed
CUDA 11.6 and cudnn related changes
1 parent 9074429 commit 712d3e3

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

packaging/windows/internal/cuda_install.bat

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ set /a CUDA_VER=%CU_VERSION:cu=%
2020
set CUDA_VER_MAJOR=%CUDA_VER:~0,-1%
2121
set CUDA_VER_MINOR=%CUDA_VER:~-1,1%
2222
set CUDA_VERSION_STR=%CUDA_VER_MAJOR%.%CUDA_VER_MINOR%
23+
set CUDNN_FOLDER="cuda"
24+
set CUDNN_LIB_FOLDER="lib\x64"
2325

2426
if %CUDA_VER% EQU 102 goto cuda102
2527
if %CUDA_VER% EQU 113 goto cuda113
@@ -66,11 +68,18 @@ if not exist "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%" (
6668

6769
)
6870

69-
set CUDNN_INSTALL_ZIP=cudnn-11.3-windows-x64-v8.2.0.53.zip
71+
set CUDNN_INSTALL_ZIP=cudnn-windows-x86_64-8.3.2.44_cuda11.5-archive.zip
72+
set CUDNN_FOLDER=cudnn-windows-x86_64-8.3.2.44_cuda11.5-archive
73+
set CUDNN_LIB_FOLDER="lib"
7074
if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" (
7175
curl -k -L "http://s3.amazonaws.com/ossci-windows/%CUDNN_INSTALL_ZIP%" --output "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
7276
if errorlevel 1 exit /b 1
7377
set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
78+
79+
rem Make sure windows path contains zlib dll
80+
curl -k -L "http://s3.amazonaws.com/ossci-windows/zlib123dllx64.zip" --output "%SRC_DIR%\temp_build\zlib123dllx64.zip"
81+
7z x "%SRC_DIR%\temp_build\zlib123dllx64.zip" -o"%SRC_DIR%\temp_build\zlib"
82+
xcopy /Y "%SRC_DIR%\temp_build\zlib\dll_x64\*.dll" "C:\Windows\System32"
7483
)
7584

7685
goto cuda_common
@@ -85,11 +94,18 @@ if not exist "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%" (
8594
set "ARGS=thrust_11.5 nvcc_11.5 cuobjdump_11.5 nvprune_11.5 nvprof_11.5 cupti_11.5 cublas_11.5 cublas_dev_11.5 cudart_11.5 cufft_11.5 cufft_dev_11.5 curand_11.5 curand_dev_11.5 cusolver_11.5 cusolver_dev_11.5 cusparse_11.5 cusparse_dev_11.5 npp_11.5 npp_dev_11.5 nvrtc_11.5 nvrtc_dev_11.5 nvml_dev_11.5"
8695
)
8796

88-
set CUDNN_INSTALL_ZIP=cudnn-11.3-windows-x64-v8.2.0.53.zip
97+
set CUDNN_INSTALL_ZIP=cudnn-windows-x86_64-8.3.2.44_cuda11.5-archive.zip
98+
set CUDNN_FOLDER=cudnn-windows-x86_64-8.3.2.44_cuda11.5-archive
99+
set CUDNN_LIB_FOLDER="lib"
89100
if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" (
90101
curl -k -L "http://s3.amazonaws.com/ossci-windows/%CUDNN_INSTALL_ZIP%" --output "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
91102
if errorlevel 1 exit /b 1
92103
set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
104+
105+
rem Make sure windows path contains zlib dll
106+
curl -k -L "http://s3.amazonaws.com/ossci-windows/zlib123dllx64.zip" --output "%SRC_DIR%\temp_build\zlib123dllx64.zip"
107+
7z x "%SRC_DIR%\temp_build\zlib123dllx64.zip" -o"%SRC_DIR%\temp_build\zlib"
108+
xcopy /Y "%SRC_DIR%\temp_build\zlib\dll_x64\*.dll" "C:\Windows\System32"
93109
)
94110

95111
goto cuda_common
@@ -105,6 +121,8 @@ if not exist "%SRC_DIR%\temp_build\%CUDA_INSTALL_EXE%" (
105121
)
106122

107123
set CUDNN_INSTALL_ZIP=cudnn-windows-x86_64-8.3.2.44_cuda11.5-archive.zip
124+
set CUDNN_FOLDER=cudnn-windows-x86_64-8.3.2.44_cuda11.5-archive
125+
set CUDNN_LIB_FOLDER="lib"
108126
if not exist "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%" (
109127
curl -k -L "http://s3.amazonaws.com/ossci-windows/%CUDNN_INSTALL_ZIP%" --output "%SRC_DIR%\temp_build\%CUDNN_INSTALL_ZIP%"
110128
if errorlevel 1 exit /b 1
@@ -172,9 +190,9 @@ if not exist "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_ST
172190

173191
echo Installing cuDNN...
174192
7z x %CUDNN_SETUP_FILE% -o"%SRC_DIR%\temp_build\cudnn"
175-
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\bin\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin"
176-
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\lib\x64\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\lib\x64"
177-
xcopy /Y "%SRC_DIR%\temp_build\cudnn\cuda\include\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\include"
193+
xcopy /Y "%SRC_DIR%\temp_build\cudnn\%CUDNN_FOLDER%\bin\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\bin"
194+
xcopy /Y "%SRC_DIR%\temp_build\cudnn\%CUDNN_FOLDER%\%CUDNN_LIB_FOLDER%\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\lib\x64"
195+
xcopy /Y "%SRC_DIR%\temp_build\cudnn\%CUDNN_FOLDER%\include\*.*" "%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v%CUDA_VERSION_STR%\include"
178196

179197
echo Cleaning temp files
180198
rd /s /q "%SRC_DIR%\temp_build" || ver > nul

0 commit comments

Comments
 (0)