-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Provide Raspberry Pi #aarch64 cross-compile instructions #30716
Comments
Haven't tried this myself, but you can find here how to install using pip directly on the Raspberry Pi |
That would only work for installing the Python wheel. I need the C library to bind via FFI to other languages (like Go, Rust, etc) |
Not sure about 1.13.1, For 1.14 or master branch, Something like
should just work. I think I upstreamed necessary patches for
Raspbian 32-bit is a bit complicated, because for RPI 3, an AAarch64 platform, it runs aarch32 (armv7-a) kernel, armv6 user-level binaries, and compilers/toolchains configured to armv6. |
Hi @freedomtan
If you see here you can see all the magic. Cross compiling is much easier and faster than compiling on the Pi. I have many images running 64 bits OS on a Pi 3 and 4 (Armiban, Ubuntu Server 18.04, etc)... In addition, an aarch64 build would also help other similar SBC like Pine64, Odriod etc.. What I was proposing is a similar Thoughts? |
Yes, cross-compiling usually is much faster, esp. for a fresh build. Easier, I don't think so. As I said, the environments before RPi 4 is quite complex. |
Thanks @freedomtan for all your help. |
I added an AArch64 toolchain to bazel in #38399 which should make cross-compiling a lot easier. It would be great if the PR could get a review. |
There are commands to build Python PIP wheel for aarch64. |
Oh we need a guide to build full Tensorflow package. Let me check it. |
- Simplify build commands with only container name without providing environment variables. - Add Python 3.8 support. - Update build_raspberry_pi.sh to build generate aarch64 binary. [Python 3.8 PIP package for ARM64] The following command is used to build Python 3.8 PIP package for aarch64. $ tensorflow/tools/ci_build/ci_build.sh PI-PYTHON38 \ tensorflow/tools/ci_build/pi/build_raspberry_pi.sh AARCH64 [Test on Ubuntu 20.04 ARM64] I've tested the PIP package on Ubuntu 20.04 64bit with RPI4. There was an issue on installing h5py on Ubuntu 20.04. The following command was needed to install h5py package. $ HDF5_DIR=/usr/lib/aarch64-linux-gnu/hdf5/serial CC=h5cc pip3 install h5py This PR handles #30716 issue. PiperOrigin-RevId: 323111228 Change-Id: I408149305a082afe105215fc380f602961b2fdf0
You can build TF Python wheel for aarch64. |
How can i cross compile TF for ODROID? This script work for odroid xu4? |
System information
Describe the feature and the current behavior/state.
There is no pre-build binary for Raspberry Pi / ARM and the instructions to build from scratch here. However, there is nothing for any kind of SBC (like Raspberry Pi, ODroid, Pine64, etc) with a aarch64 architecture.
I cannot use the Python wheel. I need the C library to bind to a different language.
Will this change the current api? How?
No.
Who will benefit with this feature?
Anyone using a SBC with a aarch64 OS.
The text was updated successfully, but these errors were encountered: