-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
tensorboard-data-server: add Apple M1 support #5715
tensorboard-data-server: add Apple M1 support #5715
Conversation
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). For more information, open the CLA check for this pull request. |
658d3f1
to
43ef114
Compare
Okay, latest version adds cross-compilation support. The argparse isn't perfect, ideally I think we would want |
Confirmed that the current commit builds properly on my system. |
@japie1235813 is there anything else this PR still needs? |
Ping @japie1235813 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply. Thanks for this contribution! LGTM
Is this has been released as a part of pre-built wheel? Neither tensorboard==2.10.0 nor nightly (2.11) seem to have a rustboard binary shipped in the wheel.
In the CI jobs https://github.com/tensorflow/tensorboard/actions/runs/3397568456/jobs/5649844791 have the macos-universal matrix disabled (running UPDATE: Probably this is because the Github CI does not have arm64 runner available. M1 mac users can build tensorboard on their own rather than installing from pip, quite easily: $ cd /path/to/tensorboard
$ git checkout v2.11 -- or nightly/master
$ cd tensorboard/data/server/ && cargo build --release
$ mkdir -p /tmp/pip_package/
$ python pip_package/build.py --server-binary target/release/rustboard --out-dir /tmp/pip_package
$ pip install /tmp/pip_package/tensorboard_data_server-0.7.0a0-py3-none-any.whl If tonic-examples fails to build, you'll probably need to install |
@wookayin Feel free to file an issue requesting a pre-built wheel with macos-arm64 support. As you mentioned, it may or may not be feasible since we currently rely on building the data server wheel on GitHub CI, but we can at least track interest in the pre-built wheel that way. |
* Motivation for features / changes When building tensorboard-data-server from source on Linux aarch64, pip install raises the following error: ``` pip._internal.exceptions.UnsupportedWheel: tensorboard_data_server-0.6.1-py3-none-manylinux2010_aarch64.whl is not a supported wheel on this platform. ``` * Technical description of changes From what I can tell, manylinux2014 is the first version that supports aarch64. TensorFlow also moved to manylinux2014, so there should be no issues with us updating as well: https://pypi.org/project/tensorflow/#files * Screenshots of UI changes N/A * Detailed steps to verify changes work correctly (as executed by you) I don't have access to Linux aarch64 myself (this was discovered in our CI) but anyone who does should be able to confirm that this works using: ```console $ cd tensorboard/data/server $ cargo build --release $ cd pip_package $ python3 build.py $ pip install *.whl ``` * Alternate designs / implementations considered Alternatively, we could use manylinux2010 on x86_64 and manylinux2014 on all other architectures, but I see no reason to avoid manylinux2014. This is sort of a follow-up to #5715, @japie1235813 may be willing to review this
* Motivation for features / changes When building tensorboard-data-server from source on Linux aarch64, pip install raises the following error: ``` pip._internal.exceptions.UnsupportedWheel: tensorboard_data_server-0.6.1-py3-none-manylinux2010_aarch64.whl is not a supported wheel on this platform. ``` * Technical description of changes From what I can tell, manylinux2014 is the first version that supports aarch64. TensorFlow also moved to manylinux2014, so there should be no issues with us updating as well: https://pypi.org/project/tensorflow/#files * Screenshots of UI changes N/A * Detailed steps to verify changes work correctly (as executed by you) I don't have access to Linux aarch64 myself (this was discovered in our CI) but anyone who does should be able to confirm that this works using: ```console $ cd tensorboard/data/server $ cargo build --release $ cd pip_package $ python3 build.py $ pip install *.whl ``` * Alternate designs / implementations considered Alternatively, we could use manylinux2010 on x86_64 and manylinux2014 on all other architectures, but I see no reason to avoid manylinux2014. This is sort of a follow-up to tensorflow#5715, @japie1235813 may be willing to review this
…ensorflow#5715) Previously cup and os version are fixed in build.py. This PR adds the support to take them as params (along with the server_binary) to build the wheel.
* Motivation for features / changes When building tensorboard-data-server from source on Linux aarch64, pip install raises the following error: ``` pip._internal.exceptions.UnsupportedWheel: tensorboard_data_server-0.6.1-py3-none-manylinux2010_aarch64.whl is not a supported wheel on this platform. ``` * Technical description of changes From what I can tell, manylinux2014 is the first version that supports aarch64. TensorFlow also moved to manylinux2014, so there should be no issues with us updating as well: https://pypi.org/project/tensorflow/#files * Screenshots of UI changes N/A * Detailed steps to verify changes work correctly (as executed by you) I don't have access to Linux aarch64 myself (this was discovered in our CI) but anyone who does should be able to confirm that this works using: ```console $ cd tensorboard/data/server $ cargo build --release $ cd pip_package $ python3 build.py $ pip install *.whl ``` * Alternate designs / implementations considered Alternatively, we could use manylinux2010 on x86_64 and manylinux2014 on all other architectures, but I see no reason to avoid manylinux2014. This is sort of a follow-up to tensorflow#5715, @japie1235813 may be willing to review this
…ensorflow#5715) Previously cup and os version are fixed in build.py. This PR adds the support to take them as params (along with the server_binary) to build the wheel.
* Motivation for features / changes When building tensorboard-data-server from source on Linux aarch64, pip install raises the following error: ``` pip._internal.exceptions.UnsupportedWheel: tensorboard_data_server-0.6.1-py3-none-manylinux2010_aarch64.whl is not a supported wheel on this platform. ``` * Technical description of changes From what I can tell, manylinux2014 is the first version that supports aarch64. TensorFlow also moved to manylinux2014, so there should be no issues with us updating as well: https://pypi.org/project/tensorflow/#files * Screenshots of UI changes N/A * Detailed steps to verify changes work correctly (as executed by you) I don't have access to Linux aarch64 myself (this was discovered in our CI) but anyone who does should be able to confirm that this works using: ```console $ cd tensorboard/data/server $ cargo build --release $ cd pip_package $ python3 build.py $ pip install *.whl ``` * Alternate designs / implementations considered Alternatively, we could use manylinux2010 on x86_64 and manylinux2014 on all other architectures, but I see no reason to avoid manylinux2014. This is sort of a follow-up to tensorflow#5715, @japie1235813 may be willing to review this
Fixes #5713.
The
cpu_name
should match the hardware you are building on, it shouldn't be hardcoded tox86_64
. Also, the macOS version depends on the hardware as well.arm64
seems to requiremacosx_11_0
or higher. See https://pypi.org/project/numpy/#files for an example of this.N/A
Successfully built and installed a wheel on macOS 12.3.1 and Apple M1 (arm64).
An alternative would be to add flags to manually specify these things. If you want me to do that instead let me know, but that seemed like more work since we would need to change it in multiple places.