tensorflow: bezel build problem for OSX: "No toolchain corresponding to 'local_darwin' found for cpu darwin"
NOTE: Issues that are not bugs or feature requests will be closed. Please ask usage questions on StackOverflow.
You must complete this information or else your issue will be closed
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow)?: No, this is an installation issue.
- TensorFlow installed from (source or binary)?: Source
- TensorFlow version: 1.0.1
- Bazel version (if compiling from source): Build label: 0.4.5-homebrew
- CUDA/cuDNN version: 8.0.71
- GPU Model and Memory: NVIDIA GeForce GT 750M, 2048 MB
- Exact command to reproduce: From Installing Tensorflow from sources (https://www.tensorflow.org/install/install_sources#PrepareMac): bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
Describe the problem clearly
Receiving the following error when trying to build from source:
$ bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
ERROR: Inconsistent crosstool configuration; no toolchain corresponding to 'local_darwin' found for cpu 'darwin'.
INFO: Elapsed time: 0.101s
I’m wondering if ‘local_darwin’ is an incorrect parameter in the TensorFlow bazel build setup files. If so, they need to be corrected and updated.
Source Code / Logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full-traceback. Large logs and files should be attached. Try to reproducible test-case code the bare-minimum necessary to generate the problem
Input and output pasted in previous questions.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 32 (10 by maintainers)
As of version 1.2, TensorFlow no longer provides GPU support on Mac OS X.
GPUs are overrated anyway.
@udnaan @BKJackson @cody-code-wy If you say no to the
./configureprompt about using Clang as the CUDA compiler, do things work?Thanks @mattiasarro! I’ve updated that work a bit in my own tutorial covering TensorFlow 1.3.0, CUDA 8.0 and cuDNN 6.0 – hopefully it’ll be of use to others as well.
https://metakermit.com/2017/compiling-tensorflow-with-gpu-support-on-a-macbook-pro/
BTW, here’s hoping you reintroduce the tensorflow-gpu package! 🙂
@BKJackson 我的是imac和你一样的问题 在./configure时候Do you want to use clang as CUDA compiler? [y/N] N选N,不用clang用gcc就行了
I managed to compile and successfully run TensorFlow 1.2 on macOS with GPU support. This thread has been useful in resolving it, thanks guys!
I wrote a little tutorial on it, as a “note to self” for later, but maybe it’s also useful to someone else. https://medium.com/@mattias.arro/installing-tensorflow-1-2-from-sources-with-gpu-support-on-macos-4f2c5cab8186
Since there is no supported combination of hardware from Apple and software by NVIDIA (there are currently no NVIDIA drivers that actually work reliably on a MacOS platform), we have stopped supporting native CUDA/GPU support on MacOS. It appears to us that neither old nor new drivers work reliably with new versions of MacOS.
We have tried both on old hardware (MacBook Pro with NVIDIA GPUs) and using external GPUs (a bizon box with an external GPU via thunderbolt), and have not been able to get even CUDA to work reliably. Without the ability to test and build on MacOS+GPU, we cannot support it.
I’m sorry about this situation, if the driver situation improves we’d be happy to add support again.
@gunan FYI.
You get around that first error by saying not to use using clang as CUDA Compiler and instead using nvcc which it will do if you say no to that option
Hey all, That’s an unfortunate but understandable decision to remove support GPU for macOS in 1.2.
If we wanted to try to improve the CUDA driver situation in macOS, who should we go to for support? Is the problem an issue with NVidia’s drivers or Apple’s OS?
I presume if there are thousands of tensorflow developers who use macs, all asking either NVidia or Apple to improve the situation, then something might be done about it.
As announced in 1.1 we will drop official support for mac-gpu setups. The reasons are as @martinwicke described. However, the configuration files and all the necessary code is still in there. There were some test failures the last time we ran the tests, but it should not effect most training tasks. If you run into any issues, the contributions are most welcome, and we will consider any PRs fixing mac gpu builds.
@ilyaivensky TF 1.2 doesn’t have GPU support on Mac.
Here is the diff that seems to work the best so far. You have to have Xcode 8.2 for it to work: