Compiling libtensorflow in Ubuntu 18.04 to use it from Scala

Repositories and dependencies

Installation instructions provided for tensorflow_scala (Platanios) do not work at the moment of writing (2018-08-21). It may be related to differences in the supported hardware the native library was compiled for.

So, it was necessary for me to compile libtensorflow.so from source:

git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout r1.9

I installed the Intel Distribution for Python, with instructions for intelpython3_core more ...


Using High Performance Libraries with Python

Compiling Tensorflow with Intel MKL support for Mac

The simplest and fastest way to get Intel MKL support in tensorflow is by using Intel Distribution for Python with the conda package manager.

By using the intelpython3_full (providing Python 3.6.3 at the moment), you get numpy and scipy MKL-accelerated libraries out of the box. Unfortunately, there is not an easy way to install Tensorflow compiled with MKL support on Mac OS X more ...