Skip to content
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

Fix building on raspberry pi #2230

Merged
merged 1 commit into from
Nov 6, 2020
Merged

Conversation

DanBmh
Copy link
Contributor

@DanBmh DanBmh commented Nov 5, 2020

Description

Fix building package on raspberry pi

Type of change

  • Bug fix

Checklist:

  • I've properly formatted my code according to the guidelines
    • By running Black + Flake8
    • By running pre-commit hooks
  • This PR addresses an already submitted issue for TensorFlow Addons
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • This PR contains modifications to C++ custom-ops

How Has This Been Tested?

Build of package in raspbian buster container did work after applying the suggested changes

@google-cla
Copy link

google-cla bot commented Nov 5, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Nov 5, 2020
@DanBmh
Copy link
Contributor Author

DanBmh commented Nov 5, 2020

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Nov 5, 2020
Copy link
Member

@seanpmorgan seanpmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're unable to test this without a ARM CI, but looks correct and shouldn't have any negative effects for the other builds we support.

Thanks for the PR!

@seanpmorgan seanpmorgan merged commit 55cf508 into tensorflow:master Nov 6, 2020
jrruijli pushed a commit to jrruijli/addons that referenced this pull request Dec 23, 2020
@StuartIanNaylor
Copy link

Any chance anyone could do aarch64 build for the pi? I tried but failed even after doing a symlink to _pywrap_tensorflow_internal

@Qengineering
Copy link

@StuartIanNaylor could you be so kind to have a look at pull request #2420, A fix for the Raspberry Pi 64-bit OS and Jetson Nanon?

@StuartIanNaylor
Copy link

StuartIanNaylor commented Apr 5, 2021

sudo nano configure.py Change 2 lines to the following:-

def is_raspi_arm():
    return (os.uname()[4] == "armv7l") or (os.uname()[4] == "aarch64")  
    
    if is_macos() or is_linux():
#        write("build --copt=-mavx") <-not known in gcc aarch64 
        write("build --cxxopt=-std=c++14")
        write("build --host_cxxopt=-std=c++14")
        
 sudo ln -s /home/pi/google-kws/venv/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so /usr/lib/lib_pywrap_tensorflow_internal.so

Works for Aarch64 just do the normal install after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants