Skip to main content

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

Hi Mary:

In order to use the gpu you just need the backend.

You can find an overview of how to work with backends here:
https://deeplearning4j.konduit.ai/multi-project/explanation/configuration/backends#cuda-installation

Please feel free to use the site search on https://deeplearning4j.konduit.ai/ if you have any other questions.

We also have the forums at: https://community.konduit.ai/ where people might have asked this question as well.

I would start with the basic backend first but feel free to also move to cudnn once you get that figured out:
https://deeplearning4j.konduit.ai/multi-project/explanation/configuration/backends/cudnn


Note that sometimes you may run into dependency clashes if you have anything like multiple versions of  cuda on your PATH.
Be careful with what you have installed if you run into any other issues.

If you run into anything else, please set the system property: org.bytedeco.javacpp.logger.debug=true
and post the results here so we can figure out why it runs into issues with your local install.

Adam


On Fri, Oct 21, 2022 at 11:56 PM Maria Xekalaki <maria.xekalaki@xxxxxxxxxxxxxxxx> wrote:
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 



_______________________________________________
deeplearning4j-dev mailing list
deeplearning4j-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/deeplearning4j-dev

Back to the top