This gist summarises the tensorflow related steps I took to get the above combo working.
When its all tested in c++ I'll update the instructions fully (and add anything I forgot below).
But in summary ( with the current master dd06643cf098ed362212ce0f76ee746951466e81 ):
I have uploaded the pip wheel which I believe should work if you have the same setup but no promises (built for compute capability 3.5, 5.2, 6.0 and named tensorflow-gpu
).
Install with (not sure dropbox allows this direct linking):
pip install http://dl.dropboxusercontent.com/s/reo3pkz6dn33u8k/tensorflow_gpu-1.2.1-cp27-cp27m-macosx_10_11_x86_64.whl
Or download then install
pip install tensorflow_gpu-1.2.1-cp27-cp27m-macosx_10_11_x86_64.whl
- CUDA 8.0.61
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
- cuDNN 6.0.21
- NVidia Web Driver 378.05.05.15f01
- LLVM but older command line tools to keep nvcc happy (xcode-select version 2347)
- Add libgomp from GCC... to the library paths (brew install gcc)
export LD_LIBRARY_PATH=/usr/local/Cellar/gcc/7.1.0/lib/gcc/7:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/Cellar/gcc/7.1.0/lib/gcc/7:$DYLD_LIBRARY_PATH
- Normal configure steps (set your CUDA compute capability)
- Export your library paths to the bazel build with
--action_env LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
. Not sure if this is necessary but was needed at one point, Ill try when I next build and drop it from here if unecessary. So for example if you also want libtensorflow.so :bazel build --config=opt --config=cuda --show_result 100 //tensorflow/tools/pip_package:build_pip_package //tensorflow/python/tools:freeze_graph //tensorflow/python/tools:optimize_for_inference //tensorflow:libtensorflow.so //tensorflow/cc:tutorials_example_trainer --action_env LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
- Build pip package if you want to use python
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
- Install
sudo pip install /tmp/tensorflow_pkg/<OUTPUT_WHEEL>.whl
Let me know if you have any problems as im sure I forgot some steps
Hey, I will definitely try out your guide! Thanks!
Did you do anything else to setup your eGPU, like using this tool https://egpu.io/forums/mac-setup/imac-egpu-simply-for-3d-accelleration/?
Did you do any benchmarks? Is TF playing nicely or is there a significant performance loss compared to using this GPU with Windows?
Thank you so much!
Dennis