Page https://deeplearning4j.konduit.ai/nd4j/backend not found

Hi!

CUDA toolkit 11.5 and cuDNN 8.3.3.40 are correctly installed. I want to use GPU (on Windows 10) with DL4J.

In the dl4j-examples pom, when I change <nd4j.backend>nd4j-native</nd4j.backend> into
<nd4j.backend>nd4j-cuda-11.5-platform</nd4j.backend> I receive the following exception while running e.g. IrisClassifier:

org.nd4j.linalg.factory.Nd4jBackend$NoAvailableBackendException: Please ensure that you have an nd4j backend on your classpath. Please see: https://deeplearning4j.konduit.ai/nd4j/backend

Page https://deeplearning4j.konduit.ai/nd4j/backend is however not found.

Would there be another page that explains how to configure the pom and what to put in the classpath to have the nd4j backend? Or simply get the advise here?

Thanks greatly for your support!

The url structure of the documentation has changed, I guess you’ll want to look at Backends - Deeplearning4j and its sub-pages.

As for your problem at hand: There is no 11.5 cuda backend version, so maven ends up not pulling any backend at all.

If you take a look at Maven Central Namespace: org.nd4j you’ll find that there is nd4j-cuda-11.6-platform.

So try using cuda 11.6 instead.

Additionally, the link to http://nd4j.org/backend.html in Quickstart - Deeplearning4j (konduit.ai) does not work.

Many thanks for your swift reply. I’m gonna go along your advices.

Running DL4J examples on CUDA works now (Windows 10).
Here is what I did:

  • Installed Microsoft Visual Studio 2019 Community version
  • installed the CUDA driver toolkit (11.6 - although 11.4 is supported by DL4J 1.0.0-M2.1)
  • compiled with Visual Studio 2019 some CUDA Samples to ensure CUDA is well installed (see for example those in C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.5\1_Utilities such as deviceQuery or bandwidthTest)
  • installed cuDNN that fits with the CUDA Toolkit version (I downloaded cuDNN v8.8.1 (March 8th, 2023), for CUDA 11.x.zip from cuDNN Archive Download, cuDNN Archive | NVIDIA Developer). In practice this consists in unzipping the directory and put it somewhere, adding each sub-directory in the environment variable path and copying the dlls, libs and h files in the CUDA directory (most of the time in C:\Programme or C:\Program Files) - see Installing cuDNN on Windows, Installation Guide :: NVIDIA cuDNN Documentation)
  • ensured that the pom contains in the tag: <nd4j.version>1.0.0-M2.1</nd4j.version>, <nd4j.backend>nd4j-cuda-11.6</nd4j.backend> and preferably the correct java version with <java.version>17</java.version> for my case. The pom shall also contain in the tag, inter alia
        <dependency>
            <groupId>org.nd4j</groupId>
            <artifactId>${nd4j.backend}</artifactId>
            <version>${dl4j-master.version}</version>
        </dependency>
  • rebuilt the samples with mvn clean install
  • here is how you see that CUDA is used at the execution: …
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: [4]; Memory: [4,0GB];
o.n.l.a.o.e.DefaultOpExecutioner - Blas vendor: [CUBLAS]
o.n.l.j.JCublasBackend - ND4J CUDA build version: 11.6.55
o.n.l.j.JCublasBackend - CUDA device 0: [NVIDIA GeForce GTX 850M]; cc: [5.0]; Total memory: [2147352576]

Good luck to all newbies!

1 Like