How can I make use of intel-mkl with tensorflow
<p>I've seen a lot of documentation about making using of a CPU with tensorflow, however, I don't have a GPU. What I do have is a fairly capable CPU and a holing 5GB of intel math kernel, which, I hope, might help me speed up tensorflow a fair bit.</p>

<p>Does anyone know how I can "make" tensorflow use the intel-mlk ?</p>

<p>Since tensorflow uses Eigen, try to use an MKL enabled version of Eigen as described <a href="https://eigen.tuxfamily.org/dox/TopicUsingIntelMKL.html" rel="nofollow">here</a>:</p>

<blockquote>
  <ol>
  <li>define the EIGEN_USE_MKL_ALL macro before including any Eigen's header</li>
  <li>link your program to MKL libraries (see the <a href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/" rel="nofollow">MKL linking advisor</a>)</li>
  <li>on a 64bits system, you must use the LP64 interface (not the ILP64 one)</li>
  </ol>
</blockquote>

<p>So one way to do it is to follow the above steps to modify the source of tensorflow, recompile and install on your machine. While you're at it you should also try the Intel compiler, which might provide a decent performance boost by itself, if you <a href="https://software.intel.com/en-us/articles/step-by-step-optimizing-with-intel-c-compiler" rel="nofollow">set the correct flags</a>: <code>-O3 -xHost -ipo</code>.</p>

python c++ numpy tensorflow blas