GPU computing with tensorflow on Mac OS 10.12

The newest version 0.10.0rc of tensorflow does support GPU computing on Mac OS. Users can follow the instruction. Using Anaconda environment management is highly recommended. Remember to install CUDA >= 7.5 and cudnn >= 5 before installing tensorflow.

After installation, you can check your new tensorflow as (for Python 2):

python -c 'import tensorflow as tf; print(tf.__version__)'

You might see an error:

I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.dylib locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.dylib locally
I tensorflow/stream_executor/dso_loader.cc:102] Couldn't open CUDA library libcuda.1.dylib. LD_LIBRARY_PATH: /Users/qdang/torch/install/lib:/usr/local/cuda/lib:
...

Fixing it is easy. Supposed you installed CUDA at the default location (/usr/local/cuda):

cp /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/libcuda.1.dylib

and tried again.

Published: September 28 2016

  • category:
  • tags:
blog comments powered by Disqus