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

add aarch64 platform build support #8663

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion codegen/fix_includes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ sed -i 's#<torch_xla/csrc/tensor.h>#"torch_xla/csrc/tensor.h"#' $@
# remove the runfiles-prefix used in codegen for pytorch
# `torchgen` generates relative includes path and does not support customizing the root,
# so we have to fix them up.
sed -i 's#bazel-out/k8-[^/]*/bin/codegen/lazy_tensor_generator.runfiles/torch/##' $@
if [[ $(uname -m) == "x86_64" ]]; then
sed -i 's#bazel-out/k8-[^/]*/bin/codegen/lazy_tensor_generator.runfiles/torch/##' $@
elif [[ $(uname -m) == "aarch64" ]]; then
sed -i 's#bazel-out/aarch64-[^/]*/bin/codegen/lazy_tensor_generator.runfiles/torch/##' $@
fi

# use the generated files that are in the compilation unit
sed -i 's#<bazel-out/\(.*\)>#"bazel-out/\1"#' $@
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@
_libtpu_wheel_name += f".dev{_date}+nightly"
_libtpu_storage_directory = 'libtpu-nightly-releases'

_libtpu_storage_path = f'https://storage.googleapis.com/{_libtpu_storage_directory}/wheels/libtpu/{_libtpu_wheel_name}-py3-none-linux_x86_64.whl'
import platform
platform_machine = platform.machine()

_libtpu_storage_path = f'https://storage.googleapis.com/{_libtpu_storage_directory}/wheels/libtpu/{_libtpu_wheel_name}-py3-none-linux_{platform_machine}.whl'


def _get_build_mode():
Expand Down