We can further optimize the training throughput by configuring cuDNN into CUDA devices. We can run a training instance in Spark without CUDA/cuDNN installed on every node. To gain optimal performance with cuDNN support, we can add the DL4J CUDA dependency. For that, the following components must be added and made available:
- The DL4J CUDA Maven dependency:
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-cuda-x.x</artifactId>
<version>1.0.0-beta3</version>
</dependency>
- The cuDNN library files at https://developer.nvidia.com/cuDNN. Note that you need to sign up to the NVIDIA website to download cuDNN libraries. Signup is free. Refer to the installation guide here: https://docs.nvidia.com/deeplearning/sdk/cuDNN-install/index.html.