Skip to content

Commit

Permalink
Cudnn update to 7.4.2 + warn if old version is used with RTX cards (#741
Browse files Browse the repository at this point in the history
)

* move cuda info display earlier

* warn if cudnn older than 7.3.1 is used with rtx cards

* update cudnn to 7.4.2
  • Loading branch information
borg323 committed Feb 24, 2019
1 parent 95f8f3f commit a6f8aba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ install:
- cmd: IF DEFINED CUDA_INSTALL appveyor DownloadFile https://developer.nvidia.com/compute/cuda/10.0/Prod/network_installers/cuda_10.0.130_win10_network
- cmd: IF DEFINED CUDA_INSTALL cuda_10.0.130_win10_network -s nvcc_10.0 cublas_dev_10.0 cublas_10.0 cudart_10.0
- cmd: IF %CUDA%==true set PATH=%CUDA_PATH%\bin;%PATH%
- cmd: IF %CUDA%==true IF NOT EXIST C:\cache\cuda appveyor DownloadFile http://developer.download.nvidia.com/compute/redist/cudnn/v7.3.1/cudnn-10.0-windows10-x64-v7.3.1.20.zip
- cmd: IF %CUDA%==true IF NOT EXIST C:\cache\cuda 7z x cudnn-10.0-windows10-x64-v7.3.1.20.zip -oC:\cache
- cmd: IF %CUDA%==true IF NOT EXIST C:\cache\cuda appveyor DownloadFile http://developer.download.nvidia.com/compute/redist/cudnn/v7.4.2/cudnn-10.0-windows10-x64-v7.4.2.24.zip
- cmd: IF %CUDA%==true IF NOT EXIST C:\cache\cuda 7z x cudnn-10.0-windows10-x64-v7.4.2.24.zip -oC:\cache
- cmd: set PATH=C:\Python36;C:\Python36\scripts;%PATH%
- cmd: pip3 install --upgrade meson
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
Expand Down
14 changes: 9 additions & 5 deletions src/neural/cuda/network_cudnn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ class CudnnNetwork : public Network {
if (gpu_id_ >= total_gpus)
throw Exception("Invalid GPU Id: " + std::to_string(gpu_id_));

cudaDeviceProp deviceProp = {};
cudaGetDeviceProperties(&deviceProp, gpu_id_);
showInfo(deviceProp);

// Select GPU to run on (for *the current* thread).
ReportCUDAErrors(cudaSetDevice(gpu_id_));

ReportCUDNNErrors(cudnnCreate(&cudnn_));
ReportCUBLASErrors(cublasCreate(&cublas_));

cudaDeviceProp deviceProp = {};
cudaGetDeviceProperties(&deviceProp, gpu_id_);
showInfo(deviceProp);

if (std::is_same<half, DataType>::value) {
// Check if the GPU support fp16 (Volta+).
if (deviceProp.major >= 7) {
Expand Down Expand Up @@ -728,10 +728,14 @@ class CudnnNetwork : public Network {
pl = version - major * 1000 - minor * 100;
CERR << "Cudnn version: " << major << "." << minor << "." << pl;
if (version != CUDNN_VERSION) {
CERR << "WARNING: CUDA Runtime version mismatch, was compiled with "
CERR << "WARNING: CUDNN Runtime version mismatch, was compiled with "
"version "
<< CUDNN_MAJOR << "." << CUDNN_MINOR << "." << CUDNN_PATCHLEVEL;
}
if (version < 7301 && (deviceProp.major > 7 ||
(deviceProp.major == 7 && deviceProp.minor >= 5))) {
CERR << "WARNING: CUDNN version 7.3.1 or newer is better for this GPU.";
}
cudaDriverGetVersion(&version);
major = version / 1000;
minor = (version - major * 1000) / 10;
Expand Down

0 comments on commit a6f8aba

Please sign in to comment.