Skip to content

GPUSetup

daw3rd edited this page Apr 26, 2022 · 8 revisions

GPU Enablement

Build the GPU-enabled CLI tools.

  1. cd aisp-core
  2. mvn -DskipTests=true -P cuda10.2 clean install

This has created aisp-core/aisp-core-main/target/aisp-core-main-0.0.1-SNAPSHOT-cuda10.2.zip

On the target machine (With the GPUs)

Install the CLI tools

  • cd SOMEDIR
  • unzip aisp-core-main-0.0.1-SNAPSHOT-cuda10.2.zip
  • export AISP_HOME=$SOMEDIR/aisp
  • export PATH=$AISP_HOME/bin:$PATH
  • sudo setup-aisp -gpu

Manually install Cuda10.2 and Cudnn (Linux)

Instead of using the setup-aisp tool, you can manually install the GPU support.

Running the CLI

Before running the CLI tools you may want to set the memory options for DL4J. Something like the following

  • export JAVA_OPTIONS="-Xmx32g -Dorg.bytedeco.javacpp.maxbytes=16g -Dorg.bytedeco.javacpp.maxphysicalbytes=48g"

DL4J has a page on memory if you have problems (in general maxphysicalbytes= maxbytes + java heap)

Test your setup using the train or evaluate CLI tools

evaluate -model dcase -sounds <your sounds> -label <your label>

If all goes well, you should see this in the log - Note that CUDA is in being used in the Backend.

...
[main] INFO org.nd4j.linalg.factory.Nd4jBackend - Loaded [JCublasBackend] backend
[main] INFO org.nd4j.nativeblas.NativeOpsHolder - Number of threads used for linear algebra: 32
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Backend used: [CUDA]; OS: [Linux]
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Cores: [8]; Memory: [32.0GB];
[main] INFO org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner - Blas vendor: [CUBLAS]
[main] INFO org.nd4j.linalg.jcublas.JCublasBackend - ND4J CUDA build version: 10.2.89
[main] INFO org.nd4j.linalg.jcublas.JCublasBackend - CUDA device 0: [Tesla V100-PCIE-16GB]; cc: [7.0]; Total memory: [16945512448]
...

I

Clone this wiki locally