-
Notifications
You must be signed in to change notification settings - Fork 74.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apple M1 - How to build 2.6 or Master (Fixed) #51506
Comments
This issue better raised on https://github.com/apple/tensorflow_macos/issues |
Current Progress on MacOS 12 Beta 5 & default Python 3.9.6 Install from Developer site: conda deactivate #exit Conda environment pip3 install --upgrade pip brew install bazel git clone https://github.com/tensorflow/tensorflow.git ./configure bazel build --config=macos_arm64 tensorflow/tools/pip_package:build_pip_package ./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg Result in: tensorflow-2.7.0-cp39-cp39-macosx_12_0_arm64.whl pip install *.whl To get GPU support, we need to install the new Pluggable Device: python3 -m pip install tensorflow-metal # 0.1.2 Those wheels are for TF 2.5, it works with TF 2.7 but slower. Apple needs to regularly update tensorflow-metal to match new TF main versions, and also release sources. |
Thanks for sharing your analysis. I will close this issue now. |
Any way to make this work for a M1 inside a Conda environment? |
@MR-T77 TF build install issues in Conda environment are supported on https://github.com/ContinuumIO/anaconda-issues/issues |
@ymodak sorry, I tried here because I can't find any way to have tensorflow working in my M1. |
I was having same problem what was missing is after installing miniforge you have to change the directory to it as below cd /Users/<your_username>/miniforgeX. "don't forget to change<your_username> with your user name and to change minifrogX with version like miniforge3
hope that help |
Don't work for me. macOS 12.6 |
Above procedure died after compiling over 15K files: ld: malformed trie, node past end file 'bazel-out/darwin_arm64-opt/bin/_solib_darwin_arm64/libtensorflow_Slibtensorflow_Ucc.2.12.0.dylib' Target //tensorflow/tools/pip_package:build_pip_package failed to build INFO: Elapsed time: 2578.594s, Critical Path: 245.43s |
Running this |
I'm also hitting the This issue should not have been closed in the first place, we are still not able to build sources on an Apple Silicon, which is the main topic here. The |
Having a similar malformed trie issue both on an M1 mac and Intel-based. |
Downgrading Xcode CL Tools to 13.x did the trick for me, probably related to this: #58368 |
@0xA1B2, Thanks! With many additional tips, it works for me on Mac Big Sur 11 with M1 and python 3. I am a fresher of tensorflow and python and I came across several problems during the process, hope it helps buddies who have the same problems:
And I found the solution here as:
It is caused by wrong python version in my case. Checkout the file name of .whl: And the command
I followed the answer here as:
Finally works, it takes whole day!! |
The genius command "pip install tensorflow" does not even work in Debian 11, so we have to compile from source. The instructions on the TF homepage do not work for the M1.
Has anyone compiled TF 2.6+ on the M1 and can share a guideline please ?
The text was updated successfully, but these errors were encountered: