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

Allow building of tfx-bsl on mac arm64 machines #73

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

tangm
Copy link
Contributor

@tangm tangm commented Dec 11, 2023

Building on Apple silicon causes an error due to headers for avx-specific instructions being included for arrow. This commit adds an exclusion on avx* files from arrow when building on mac arm64.

Fixes #48

Not very familiar with Bazel or the project itself, but keen to get tfx working on apple silicon. Happy to work on this to get it through.

Copy link

google-cla bot commented Dec 11, 2023

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

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@tangm tangm force-pushed the 48-Allow-compilation-on-m1-macs branch from fa2e19b to 83e2f37 Compare December 11, 2023 09:19
@tangm tangm changed the title Allow building of tfx-bsl on mac arm64 machines #48 Allow building of tfx-bsl on mac arm64 machines Dec 12, 2023
@tangm tangm force-pushed the 48-Allow-compilation-on-m1-macs branch from 7d1fcd7 to 6dc304a Compare December 18, 2023 02:25
@iindyk
Copy link
Collaborator

iindyk commented Jan 3, 2024

Thanks for the contribution!
We can merge this, but unfortunately we don't have testing infra setup for arm64, so there's no guarantee that this will not be (accidentally) broken, though we'll try to avoid this.

How did you test this? did you build from source & run the tests?

Could you also please drop a line in release notes saying that there's partial support for building from source on mac arm64 machines.

@iindyk iindyk self-requested a review January 3, 2024 20:49
@iindyk iindyk self-assigned this Jan 3, 2024
@tangm tangm force-pushed the 48-Allow-compilation-on-m1-macs branch from 6dc304a to 0a0e90a Compare January 4, 2024 03:06
@tangm
Copy link
Contributor Author

tangm commented Jan 4, 2024

Hi @iindyk , thank you for looking at this.

Have now added to RELEASE.md. I tested this by:

  • building from source in a venv with python 3.10
  • Installing the built wheel into the venv
  • ran what I think are the tests from run_all_tests.py

Specifically:

export USE_BAZEL_VERSION=5.3.2
python3.10 -m venv .venv
. .venv/bin/activate
pip install -U pip wheel numpy
python setup.py bdist_wheel
pip install dist/tfx_bsl-1.14.0-cp310-cp310-macosx_11_0_universal2.whl
python -m tfx_bsl.test_util.run_all_tests --start_dirs=tfx_bsl

Happy to run additional tests locally, or if I can help with getting the testing infra setup on arm64 going.

@iindyk
Copy link
Collaborator

iindyk commented Jan 4, 2024

Thanks @tangm! I'd be happy to get any help in the infra setup but unfortunately it's going to be all about internal VMs and resource allocations.

RELEASE.md Outdated
@@ -25,6 +25,7 @@

## Bug Fixes and Other Changes

* Partial support for building from source on macOS arm64 machines.
Copy link
Collaborator

Choose a reason for hiding this comment

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

please move this under Current Version (~line 9)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, my bad. Done.

@tangm tangm force-pushed the 48-Allow-compilation-on-m1-macs branch from 0a0e90a to 13f1f0e Compare January 4, 2024 22:12
@iindyk iindyk merged commit 18000da into tensorflow:master Jan 4, 2024
1 check passed
@Dentrax
Copy link

Dentrax commented Jan 8, 2024

Hey, thanks for this. Any plans for new version cut on PyPI with new GitHub tag? @iindyk

@iindyk
Copy link
Collaborator

iindyk commented Jan 8, 2024

Unfortunately, we don't have releasing and test infra set up for this build. So the only way to get a mac arm64-compatible wheel at the moment is to build from source.

@Dentrax
Copy link

Dentrax commented Jan 8, 2024

for this build

Sorry, I didn't mean just for this one. I was wondering if there will be any tfx-bsl 1.14.1 version (patch or minor) cut soon.

@iindyk
Copy link
Collaborator

iindyk commented Jan 9, 2024

there's a minor release planned in a ~ week

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

Successfully merging this pull request may close these issues.

Any plans to support Apple silicon devices like M1 Macs?
3 participants