cuDNN Library is not found

Hi,

I’ve installed the CUDA 10.2 toolkit and got the CuDNN 7.6 Library and copied cudnn64_7.dll in the bin directory of the CUDA installation (on a RTX 2080 system with the latest drivers (CUDA 11.3, but not CUDA 11.3 toolkit, that doesn’t seem to exist yet) and I installed the CUDA 11.2 toolkit as well).

CUDA gets loaded fine, but it doesn’t find the CuDNN Library. The CUDA bin library is in the PATH.

o.n.l.f.Nd4jBackend - Loaded [JCublasBackend] backend
o.n.n.NativeOpsHolder - Number of threads used for linear algebra: 32
o.n.l.a.o.e.DefaultOpExecutioner - Backend used: [CUDA]; OS: [Windows 10]
o.n.l.a.o.e.DefaultOpExecutioner - Cores: [16]; Memory: [8.0GB];
o.n.l.a.o.e.DefaultOpExecutioner - Blas vendor: [CUBLAS]
o.n.l.j.JCublasBackend - ND4J CUDA build version: 10.2.89
o.n.l.j.JCublasBackend - CUDA device 0: [NVIDIA GeForce RTX 2080 with Max-Q Design]; cc: [7.5]; Total memory: [8589934592]
o.d.n.g.ComputationGraph - Starting ComputationGraph with WorkspaceModes set to [training: ENABLED; inference: ENABLED], cacheMode set to [DEVICE]
o.d.n.l.c.ConvolutionLayer - cuDNN not found: use cuDNN for better GPU performance by including the deeplearning4j-cuda module. For more information, please refer to: cuDNN - Deeplearning4j
java.lang.ClassNotFoundException: org.deeplearning4j.cuda.convolution.CudnnConvolutionHelper
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)

java.library.path: C:\Program Files\Amazon Corretto\jdk11.0.3_7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.2\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp;C:\Program Files\Amazon Corretto\jdk11.0.3_7\bin;C:\Python38\Scripts;C:\Python38;C:\Python39\Scripts;C:\Python39;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler;C:\Program Files\Amazon Corretto\jdk11.0.3_7\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\PuTTY;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\ProgramData\chocolatey\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\dotnet;C:\Program Files\SlikSvn\bin;C:\Program Files (x86)\dotnet;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\IDEMIA\AWP\Dlls;C:\Program Files\IDEMIA\AWP\Dlls;C:\Program Files\nodejs;C:\Users\alexi\AppData\Roaming\npm;C:\Program Files\Git\cmd;C:\Go\bin;C:\Program Files\NVIDIA Corporation\Nsight Compute 2020.3.1;C:\Users\alexi\AppData\Local\Microsoft\WindowsApps;C:\Users\alexi\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\alexi\AppData\Local\GitHubDesktop\bin;C:\apache-maven-3.6.1\apache-maven-3.6.1\bin;C:\OneDrive__90_tools sysinternals\UnxUtils\usr\local\wbin;C:\Program Files\CMake\bin;C:\Users\alexi.dotnet\tools;C:\Users\alexi\AppData\Local\Microsoft\WindowsApps;C:\msys64\mingw64\bin;C:\flutter\bin;C:\D\dmd2\windows\bin64;C:\D\dmd2\windows\bin;C:\Users\alexi\go\bin;.

On Windows 10.

Any ideas why it doesn’t load cuDNN?

Thanks!

@al-the-bear you need to add the deeplearning4j-cuda dependency. It says it right in the stack trace. That’s not an indicator of cudnn at all. We have a separate dependency for cuda usage in deeplearning4j with cudnn. It’s meant to be optional. What you’re using right now is just nd4j-cuda.

Ok. Well, I added

    <dependency>
        <groupId>org.deeplearning4j</groupId>
        <artifactId>deeplearning4j-cuda-10.2</artifactId>
        <version>1.0.0-beta7</version>
    </dependency>

and now it seems to load ok. I was starting the “cuda-specific-examples” project, so I was expecting the dependencies would be complete. But actually I just overlooked the difference in artifact name when reading the page on how to fix cudnn problems, so I was thinking the dependency is in there. Maybe the readme should mention that one has to change 2 lines to switch, not one.

Thank you!!