GPU and CPU Setup
Configuring GPU and CPU backends — CUDA setup, multi-GPU, CPU optimizations, and backend switching
Overview
CPU Backend Setup
Maven
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-native-platform</artifactId>
<version>1.0.0-M2.1</version>
</dependency>Gradle
implementation "org.nd4j:nd4j-native-platform:1.0.0-M2.1"What the CPU backend uses
o.n.l.a.o.e.DefaultOpExecutioner - Blas vendor: [MKL]GPU Backend Setup
Prerequisites
Maven — CUDA Backend
Gradle — CUDA Backend
Switching Between CPU and GPU
Maven
Gradle
Verifying Which Backend Is Active
Multi-GPU Configuration
ParallelWrapper for Data-Parallel Training
Controlling Which GPU Is Used
Memory Management with Multiple GPUs
CPU Optimizations
AVX Extensions
OpenMP Threads
Disabling Periodic GC During Training
GPU Memory Management
Performance Comparison: CPU vs GPU
Workload
CPU
GPU
Related Pages
Last updated
Was this helpful?