Skip to content

Commit

Permalink
change cudnn installer
Browse files Browse the repository at this point in the history
  • Loading branch information
springkim committed Feb 13, 2019
1 parent 677cd0c commit 45cbcc0
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 94 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ And this script converts cuda include files to UNICODE. Because, Visual Studio(K

### <img src="img/cuda.png" width="64">cudnn

<img src="img/cudnn7.1_ver.png" height="20"><img src="img/cudnn7.3.1_ver.png" height="20">
<img src="img/ver_latest.png" height="20">

The NVIDIA CUDA® Deep Neural Network library (**[cuDNN](https://developer.nvidia.com/cudnn)**) is a GPU-accelerated library of primitives for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalization, and activation layers. cuDNN is part of the NVIDIA Deep Learning SDK.

Expand Down
File renamed without changes.
72 changes: 72 additions & 0 deletions install_cudnn.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
::
:: install_cudnn7.3.1.bat
:: WSpring
::
:: Created by kimbomm on 2018. 10. 08...
:: Modified by kimbomm on 2019. 02. 13...
:: Copyright 2018 kimbomm. All rights reserved.
::
<# :
@echo off
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
echo Get admin permission...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
rem del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"

pushd "%CD%"
title install_cudnn
echo Please download and select the correct version of cudnn zip file. If the version is different, it may not work.

set CUDNNZIP=""

for /f "delims=" %%I in ('powershell -noprofile "iex (${%~f0} | out-string)"') do (
set CUDNNZIP=%%~I
)
if not exist "%CUDNNZIP%" (
echo No file selected.
pause
exit /b
)

echo %CUDNNZIP%

echo Installing...
call :SafeRMDIR "%TEMP%\cuda"
powershell -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('%CUDNNZIP%', '%TEMP%'); }"
cd %TEMP%
xcopy /Y "cuda\include\*.*" "%CUDA_PATH%\include\" /e /h /k 2>&1 >NUL
xcopy /Y "cuda\lib\x64\*.*" "%CUDA_PATH%\lib\x64\" /e /h /k 2>&1 >NUL
xcopy /Y "cuda\bin\*.*" "%CUDA_PATH%\bin\" /e /h /k 2>&1 >NUL
call :SafeRMDIR "%TEMP%\cuda"

echo Finish!!
pause
exit /b

:SafeRMDIR
IF EXIST "%~1" (
RMDIR /S /Q "%~1"
)
exit /b
::https://stackoverflow.com/questions/15885132/file-folder-chooser-dialog-from-a-windows-batch-script
: #>

Add-Type -AssemblyName System.Windows.Forms
$f = new-object Windows.Forms.OpenFileDialog
$f.InitialDirectory = pwd
$f.Filter = "cudnn zip files (*.zip)|*.zip"
$f.ShowHelp = $true
$f.Multiselect = $false
[void]$f.ShowDialog()
if ($f.Multiselect) { $f.FileNames } else { $f.FileName }
93 changes: 0 additions & 93 deletions install_cudnn7.3.1.bat

This file was deleted.

0 comments on commit 45cbcc0

Please sign in to comment.