Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56097 from mseth10:master-arm
PiperOrigin-RevId: 450065584
- Loading branch information
1 parent
21bd9f7
commit 7b3588f
Showing
8 changed files
with
302 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
|
||
name: ARM CD | ||
|
||
on: | ||
push: | ||
tags: | ||
- v2.** | ||
schedule: | ||
- cron: '0 8 * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, linux, ARM64] | ||
strategy: | ||
matrix: | ||
pyver: ['3.7', '3.8', '3.9', '3.10'] | ||
steps: | ||
- name: Stop old running containers (if any) | ||
shell: bash | ||
run: | | ||
running_containers=$(docker ps -q) && \ | ||
if [[ $running_containers == "" ]]; then | ||
echo "No running containers"; | ||
else | ||
echo "Running container(s) found" && \ | ||
docker stop $running_containers; | ||
fi | ||
docker container prune -f | ||
- name: Clean repository | ||
shell: bash | ||
run: find /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/. -name . -o -prune -exec sudo rm -rf -- {} + || true | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Build and test pip wheel | ||
shell: bash | ||
run: | | ||
CI_DOCKER_BUILD_EXTRA_PARAMS='--build-arg py_major_minor_version=${{ matrix.pyver }}' \ | ||
./tensorflow/tools/ci_build/ci_build.sh cpu.arm64 bash tensorflow/tools/ci_build/rel/ubuntu/cpu_arm64_pip.sh | ||
- name: Upload pip wheel to PyPI | ||
shell: bash | ||
run: python3 -m twine upload --verbose /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/whl/* -u "__token__" -p ${{ secrets.AWS_PYPI_ACCOUNT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
|
||
name: ARM CI | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- master | ||
- r2.** | ||
|
||
jobs: | ||
build: | ||
runs-on: [self-hosted, linux, ARM64] | ||
strategy: | ||
matrix: | ||
pyver: ['3.7', '3.8', '3.9', '3.10'] | ||
steps: | ||
- name: Stop old running containers (if any) | ||
shell: bash | ||
run: | | ||
running_containers=$(docker ps -q) && \ | ||
if [[ $running_containers == "" ]]; then | ||
echo "No running containers"; | ||
else | ||
echo "Running container(s) found" && \ | ||
docker stop $running_containers; | ||
fi | ||
docker container prune -f | ||
- name: Clean repository | ||
shell: bash | ||
run: find /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/. -name . -o -prune -exec sudo rm -rf -- {} + || true | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Build and test pip wheel | ||
shell: bash | ||
run: | | ||
CI_DOCKER_BUILD_EXTRA_PARAMS='--build-arg py_major_minor_version=${{ matrix.pyver }}' \ | ||
./tensorflow/tools/ci_build/ci_build.sh cpu.arm64 bash tensorflow/tools/ci_build/rel/ubuntu/cpu_arm64_pip.sh | ||
- name: Upload pip wheel to GitHub | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: tensorflow_py${{ matrix.pyver }}_wheel | ||
path: /home/ubuntu/actions-runner/_work/tensorflow/tensorflow/whl/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM quay.io/pypa/manylinux2014_aarch64 | ||
|
||
RUN yum -y check-update || true && \ | ||
yum install -y epel-release && \ | ||
yum install -y \ | ||
sudo \ | ||
wget \ | ||
openssl-devel \ | ||
libffi-devel \ | ||
java-1.8.0-openjdk-devel \ | ||
bzip2-devel \ | ||
gdbm-devel \ | ||
ncurses-devel \ | ||
nss-devel \ | ||
readline-devel \ | ||
sqlite-devel \ | ||
hdf5-devel && \ | ||
yum clean all | ||
|
||
COPY install/install_bazel.sh /install/ | ||
RUN /install/install_bazel.sh | ||
|
||
ARG py_major_minor_version | ||
|
||
ENV TF_PYTHON_VERSION=python${py_major_minor_version} | ||
ENV PYTHON_BIN_PATH=/usr/local/bin/${TF_PYTHON_VERSION} | ||
|
||
RUN ln -s ${PYTHON_BIN_PATH} /usr/local/bin/python && \ | ||
ln -s ${PYTHON_BIN_PATH} /usr/local/bin/python3 | ||
|
||
RUN curl -o /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py && \ | ||
python /tmp/get-pip.py && \ | ||
rm -f /tmp/get-pip.py | ||
|
||
RUN export PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())') && \ | ||
ln -s /opt/_internal/cpython-$PYTHON_VERSION/bin/pip3 /usr/local/bin/pip${py_major_minor_version} && \ | ||
ln -s /opt/_internal/cpython-$PYTHON_VERSION/bin/pip3 /usr/local/bin/pip3 && \ | ||
ln -s /opt/_internal/cpython-$PYTHON_VERSION/bin/pip /usr/local/bin/pip | ||
|
||
RUN pip3 install packaging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#!/bin/bash | ||
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ============================================================================== | ||
|
||
set -e | ||
set -x | ||
|
||
source tensorflow/tools/ci_build/release/common.sh | ||
|
||
# Update bazel | ||
install_bazelisk | ||
|
||
# Env vars used to avoid interactive elements of the build. | ||
export HOST_C_COMPILER=(which gcc) | ||
export HOST_CXX_COMPILER=(which g++) | ||
export TF_ENABLE_XLA=1 | ||
export TF_DOWNLOAD_CLANG=0 | ||
export TF_SET_ANDROID_WORKSPACE=0 | ||
export TF_NEED_MPI=0 | ||
export TF_NEED_ROCM=0 | ||
export TF_NEED_GCP=0 | ||
export TF_NEED_S3=0 | ||
export TF_NEED_OPENCL_SYCL=0 | ||
export TF_NEED_CUDA=0 | ||
export TF_NEED_HDFS=0 | ||
export TF_NEED_OPENCL=0 | ||
export TF_NEED_JEMALLOC=1 | ||
export TF_NEED_VERBS=0 | ||
export TF_NEED_AWS=0 | ||
export TF_NEED_GDR=0 | ||
export TF_NEED_OPENCL_SYCL=0 | ||
export TF_NEED_COMPUTECPP=0 | ||
export TF_NEED_KAFKA=0 | ||
export TF_NEED_TENSORRT=0 | ||
|
||
# Export required variables for running pip_new.sh | ||
export OS_TYPE="UBUNTU" | ||
export CONTAINER_TYPE="CPU" | ||
|
||
# Get the default test targets for bazel. | ||
source tensorflow/tools/ci_build/build_scripts/DEFAULT_TEST_TARGETS.sh | ||
|
||
# Set python version string | ||
py_ver=$(python -c 'import sys; print(str(sys.version_info.major)+str(sys.version_info.minor))') | ||
|
||
# Export optional variables for running pip_new.sh | ||
export TF_BUILD_FLAGS="--config=mkl_aarch64 --copt=-mtune=generic --copt=-march=armv8-a \ | ||
--copt=-O3 --copt=-fopenmp --copt=-flax-vector-conversions --linkopt=-lgomp" | ||
export TF_TEST_FLAGS="${TF_BUILD_FLAGS} \ | ||
--test_env=TF_ENABLE_ONEDNN_OPTS=1 --test_env=TF2_BEHAVIOR=1 --test_lang_filters=py \ | ||
--define=no_tensorflow_py_deps=true --verbose_failures=true --test_keep_going" | ||
export TF_TEST_TARGETS="${DEFAULT_BAZEL_TARGETS} \ | ||
-//tensorflow/lite/... \ | ||
-//tensorflow/compiler/mlir/lite/tests:const-fold.mlir.test \ | ||
-//tensorflow/compiler/mlir/lite/tests:prepare-tf.mlir.test \ | ||
-//tensorflow/python:nn_grad_test \ | ||
-//tensorflow/python:dequantize_op_test \ | ||
-//tensorflow/python:quantized_ops_test \ | ||
-//tensorflow/python/data/experimental/kernel_tests/service:cross_trainer_cache_test \ | ||
-//tensorflow/python/eager:forwardprop_test \ | ||
-//tensorflow/python/framework:node_file_writer_test \ | ||
-//tensorflow/python/grappler:memory_optimizer_test \ | ||
-//tensorflow/python/kernel_tests/linalg:linear_operator_householder_test \ | ||
-//tensorflow/python/kernel_tests/linalg:linear_operator_inversion_test \ | ||
-//tensorflow/python/kernel_tests/linalg:linear_operator_block_diag_test \ | ||
-//tensorflow/python/kernel_tests/linalg:linear_operator_block_lower_triangular_test \ | ||
-//tensorflow/python/kernel_tests/linalg:linear_operator_kronecker_test \ | ||
-//tensorflow/python/kernel_tests/math_ops:batch_matmul_op_test \ | ||
-//tensorflow/python/kernel_tests/nn_ops:conv_ops_test \ | ||
-//tensorflow/python/kernel_tests/nn_ops:conv2d_backprop_filter_grad_test \ | ||
-//tensorflow/python/kernel_tests/nn_ops:conv3d_backprop_filter_v2_grad_test \ | ||
-//tensorflow/python/kernel_tests/nn_ops:atrous_conv2d_test \ | ||
-//tensorflow/python/ops/parallel_for:math_test" | ||
export TF_PIP_TESTS="test_pip_virtualenv_clean" | ||
export TF_TEST_FILTER_TAGS="-no_oss,-oss_serial,-no_oss_py${py_ver},-gpu,-tpu,-benchmark-test,-v1only,-no_aarch64,-requires-gpu" | ||
export IS_NIGHTLY=0 # Not nightly; uncomment if building from tf repo. | ||
export TF_PROJECT_NAME="aws_tensorflow_cpu" | ||
export TF_PIP_TEST_ROOT="pip_test" | ||
export TF_AUDITWHEEL_TARGET_PLAT="manylinux2014" | ||
|
||
source tensorflow/tools/ci_build/builds/pip_new.sh | ||
|
||
# remove duplicate wheel and copy wheel to mounted volume for local access | ||
rm -rf /tensorflow/pip_test/whl/*linux_aarch64.whl && cp -r /tensorflow/pip_test/whl . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters