0

For me DL4j 1.0.0-Beta6 is not using Intel MKL any more:

WARN 28823 --- [:54:17 UTC 2020] org.nd4j.linalg.factory.Nd4jBackend      : Skipped [JCublasBackend] backend (unavailable): java.lang.UnsatisfiedLinkError: /home/app/.javacpp/cache/cuda-10.0-7.4-1.5-linux-x86_64.jar/org/bytedeco/cuda/linux-x86_64/libjnicudart.so: libcuda.so.1: cannot open shared object file: No such file or directory
INFO 28823 --- [:54:17 UTC 2020] org.nd4j.linalg.factory.Nd4jBackend      : Loaded [CpuBackend] backend
INFO 28823 --- [:54:17 UTC 2020] org.nd4j.nativeblas.NativeOpsHolder      : Number of threads used for linear algebra: 1
WARN 28823 --- [:54:17 UTC 2020] o.n.l.cpu.nativecpu.CpuNDArrayFactory    : *********************************** CPU Feature Check Warning ***********************************
WARN 28823 --- [:54:17 UTC 2020] o.n.l.cpu.nativecpu.CpuNDArrayFactory    : Warning: Initializing ND4J with Generic x86 binary on a CPU with AVX/AVX2 support
WARN 28823 --- [:54:17 UTC 2020] o.n.l.cpu.nativecpu.CpuNDArrayFactory    : Using ND4J with AVX/AVX2 will improve performance. See deeplearning4j.org/cpu for more details
WARN 28823 --- [:54:17 UTC 2020] o.n.l.cpu.nativecpu.CpuNDArrayFactory    : Or set environment variable ND4J_IGNORE_AVX=true to suppress this warning
WARN 28823 --- [:54:17 UTC 2020] o.n.l.cpu.nativecpu.CpuNDArrayFactory    : *************************************************************************************************
INFO 28823 --- [:54:17 UTC 2020] org.nd4j.nativeblas.Nd4jBlas             : Number of threads used for OpenMP BLAS: 1
INFO 28823 --- [:54:17 UTC 2020] o.n.l.a.o.e.DefaultOpExecutioner         : Backend used: [CPU]; OS: [Linux]
INFO 28823 --- [:54:17 UTC 2020] o.n.l.a.o.e.DefaultOpExecutioner         : Cores: [2]; Memory: [0.4GB];
INFO 28823 --- [:54:17 UTC 2020] o.n.l.a.o.e.DefaultOpExecutioner         : Blas vendor: [OPENBLAS]

I tried just adding regular nd4j-native and various combinations of nd4j-native:avx classifiers. I can see mkl & mkl-dnn in my mvn-dependency-tree, but on startup it always reports Openblas being used.

Why is Beta6 not using MKL any more?

  • It's not used by default because it's big, but doesn't provide a measurable improvement in performance for most cases anymore, but it's still possible to use it. Make sure that the system properties described here are set: https://github.com/bytedeco/javacpp-presets/tree/master/openblas#documentation – Samuel Audet Jan 22 '20 at 21:19
  • Thanks @SamuelAudet, there is a lot of useful information. – Horschi Jan 23 '20 at 18:32

1 Answers1

0

It still does. Just make sure you're using avx2 or avx512 binaries (depending on your actual CPU sure)

p.s. When it comes to actual layers, like conv2d, MKL-DNN will be used, and internally high-perf MKL gemm will be used.

raver119
  • 336
  • 1
  • 5
  • I deleted my previous comment where I said AVX2 is required for MKL. It works fine without AVX2. I must have made a mistake. – Horschi Jan 24 '20 at 09:26