Hacker News new | ask | show | jobs
by matheist 3291 days ago
I've managed to compile tensorflow with MKL on Mac OS X. The ingredients were roughly:

1. Download MKL from Intel's website, install to /usr/local/lib/

2. Change tensorflow's configure script to look for the downloaded library on OS X instead of just aborting.

3. Possibly change some other bazel build files to look for .dylib instead of .so files.

4. Build with extra flags to look for the appropriate libraries.

I'm not sure if all these steps are necessary but they were sufficient.

The reason I had install to /usr/local/lib/ instead of Intel's suggestion of /opt/intel/something was that, with the latter, even though I passed the appropriate directory to the linker, I think there was still some intermediate binary that wasn't seeing that path. Putting the dylibs in the default directory solved that.

I can't contribute my patch because I did this on my employer's computer and it'd be an enormous hassle to work out the licensing stuff.