CPU (nd4j-native)
Setting up the nd4j-native CPU backend — Maven dependencies, AVX2/AVX512 optimizations, OpenBLAS, MKL, and multi-threading
Maven Dependencies
Recommended: -platform artifact
-platform artifact<properties>
<dl4j.version>1.0.0-M2.1</dl4j.version>
</properties>
<dependencies>
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-native-platform</artifactId>
<version>${dl4j.version}</version>
</dependency>
</dependencies>Minimal: current-platform only
Using the DL4J BOM
Platform Classifiers
Classifier
OS
Architecture
Notes
-compile classifiers (1.0.0-rewrite)
-compile classifiers (1.0.0-rewrite)Classifier
OS
Architecture
Includes
AVX2 and AVX-512 Optimizations
Selecting AVX via Maven classifier
Selecting AVX via system property (with -platform)
-platform)Which AVX level to use
Instruction set
Minimum CPU
Expected speedup over baseline
BLAS Libraries
OpenBLAS (bundled, default)
Intel MKL (optional, higher performance)
Disabling multi-threaded BLAS
Thread Configuration
OMP_NUM_THREADS
Nd4j.setNumThreads()
Thread recommendations by workload
Workload
Recommendation
Memory Configuration
Maximum off-heap allocation
Maximum physical bytes
Typical production invocation
Workspace-based memory management
Verifying the CPU Backend Is Active
Quick Reference
Goal
Setting
See Also
Last updated
Was this helpful?