javacudand4j

Errors when trying to run Nd4j with Cuda


I've followed about every tutorial I could find, but somehow I can't seem to get Nd4j to work with a Cuda backend. I think I'm missing a library, but I can't figure out which one or where to download it.

The error I'm getting is:

18:23:23.872 [main] WARN  org.nd4j.linalg.factory.Nd4jBackend - Skipped [JCublasBackend] backend (unavailable): java.lang.UnsatisfiedLinkError: no cudart in java.library.path
18:23:23.958 [main] INFO  org.nd4j.linalg.factory.Nd4jBackend - Loaded [CpuBackend] backend

I'm using Nd4j and I have (amongst a whole bunch of others) the following jars on my class path:

nd4j-native-1.0.0-beta3.jar
nd4j-native-api-1.0.0-beta3.jar
cuda-10.0-7.3-1.4.3.jar
nd4j-cuda-10.0-1.0.0-beta3.jar. 

Cuda 10.0 is successfully installed:

C:\Users\username>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:04_Central_Daylight_Time_2018
Cuda compilation tools, release 10.0, V10.0.130

I tried to point Java to the Cuda bin directory like so:

-Djava.library.path="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin"

but that makes no difference. Furthermore, I've tried the mvn command on the pom.xml's inside nd4j-cuda-10.0-platform-1.0.0-beta3.jar and cuda-platform-10.0-7.3-1.4.3.jar, which results in a download of a lot of jars, but none of them appear to contain the dll I'm missing.

When searching around I found other users talking about jars like 'cuda-10.0-7.3-1.4.3-windows-x86_64.jar' that should contain a jnicudart.dll, but I can't find such a jar anywhere. What am I missing here?

--UPDATE-- I've updated everything to beta5, and found a cuda jar containing the missing jnicudart.dll, but I still get the same error. I have used Dependencies to check what's wrong, and this is the result: enter image description here

It says the checksum of the NVidia cudart64_100.dll is incorrect. Would this be related to NVidia Cuda10 not supporting my Geforce GT 730 because it is a Fermi architecture? Or is the cuda installation corrupt or something?


Solution

  • OK I figured it out; had to install Cuda8.0 and revert all Nd4j to beta2, and add the correct cuda-8.9-6.0-1.4.1-windows-x86_64.jar to my classpath. Furthermore, I had to restart my IDE for the windows PATH environment to be updated so that the CUDA 8 bin directory was in it. And then I found out that

    CUDA backend requires compute capatibility of 3.0 and above to run
    

    and my retro card was only 2.1, so all was for nothing :/

    Will have to purchase a new GPU I guess...