Linux dependencies for CPU backend - BLAS

Several years ago I tried DL4J with success. At that time the CPU backend required I install OpenBLAS, ATLAS or Intel’s MKL. Looking at the current documentation I see no mention of these requirements save for building our own version of DL4J. I only see this:

No mention of JavaCPP, OpenBlas or anything else. My question is, what dependencies exist for the CPU backend? Is their documentation on the run-time dependencies of DL4J?


That’s all you need. By default mkl-dnn (or oneDNN as they are calling it at the moment) will be used on supported platforms these days, and it is bundled with nd4j-native. On platforms that aren’t supported by mkl-dnn, openblas is used - and it is still bundled.

On the topic of bundled, I guess on can argue that it isn’t bundled but rather just a transitive dependency via JavaCPP presets.

So yes, the dependencies that are listed in the documentation are really all you need on a normal Linux distribution.

@treo Thanks for the information. I am still a little unsure of what you mean when you say:

Does that mean I do not need to install any of the libraries in the OS?

BTW, I think this is precious information that should be documented. I was unaware of mkl-dnn. I have installed Intel(R) Math Kernel Library 2020 Update 1 for Linux as an OpenBlas substitute.


Yes, you don’t need to install any blas libraries on your system.

But if you want to use them anyway, you still can. We use the JavaCPP openblas preset to load the bundled library, and you can use its System properties to configure it to load something else:

@treo Ok, I also see

So no installs.

Thank you

P.S: BTW, thanks for correcting the title.