Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[deeplearning4j-dev] Deeplearning4j on the GPU

Hello,

I am a newbie to deepleardning4j and I am trying to run some examples on the GPU. 
First of all, I wanted to ask what type of code can be executed on the GPU. In the README file of the deeplearning4j-examples repository (https://github.com/deeplearning4j/deeplearning4j-examples) I noticed that there is a link to a module named cuda-specific-examples, but this link does not work. 
Are the GPU benchmarks the ones in the nd4j-ndarray-examples module? Or is it possible to deploy the examples from all the modules (e.g. the IrisClassifier) for GPU execution?

Secondly, I tried to run the examples of the nd4j-ndarray-examples module on the GPU by replacing the line <nd4j.backend>nd4j-native</nd4j.backend> with <nd4j.backend>nd4j-cuda-11.6-platform</nd4j.backend> in the pom.xml file, as stated in the instructions. However, for some reason, the computations still go through the CPU instead. I don't  get any error messages, just the following output:

o.n.l.f.Nd4jBackend - Loaded [CpuBackend] backend
o.n.n.NativeOpsHolder - Number of threads used for linear algebra: 6
o.n.l.c.n.CpuNDArrayFactory - Binary level Generic x86 optimization level AVX/AVX2
o.n.n.Nd4jBlas - Number of threads used for OpenMP BLAS: 6
o.n.l.a.o.e.DefaultOpExecutioner - Backend used: [CPU]; OS: [Linux]
o.n.l.a.o.e.DefaultOpExecutioner - Cores: [12]; Memory: [7.8GB];
o.n.l.a.o.e.DefaultOpExecutioner - Blas vendor: [OPENBLAS]
o.n.l.c.n.CpuBackend - Backend build information:
 GCC: "7.5.0"
STD version: 201103L
DEFAULT_ENGINE: samediff::ENGINE_CPU

I am using JDK 11.0.16, CUDA 11.6 and maven 3.6.3. My OS is Ubuntu 20.04 and I have an NVIDIA GTX 1650 Ti GPU on my machine.  

Are there any additional steps I have to perform to make sure the execution takes place on the GPU?   

Thank you in advance,
Mary 




Back to the top