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 wheel workflows #2198

Closed
wants to merge 1 commit into from
Closed
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
54 changes: 54 additions & 0 deletions .github/workflows/build-wheels-aarch64-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build AARCH64 Linux Wheels

on:
pull_request:
push:
branches:
- nightly
- main
- release/*
tags:
# NOTE: Binary build pipelines should only get triggered on release candidate builds
# Release candidate tags look like: v1.11.0-rc1
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:

jobs:
generate-matrix:
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
with:
package-type: wheel
os: linux-aarch64
test-infra-repository: pytorch/test-infra
test-infra-ref: main
with-cuda: disable
build:
needs: generate-matrix
strategy:
fail-fast: false
matrix:
include:
- repository: pytorch/text
pre-script: packaging/install_torchdata.sh
post-script: ""
smoke-test-script: test/smoke_tests/smoke_tests.py
package-name: torchtext
name: ${{ matrix.repository }}
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
with:
repository: ${{ matrix.repository }}
ref: ""
test-infra-repository: pytorch/test-infra
test-infra-ref: main
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
pre-script: ${{ matrix.pre-script }}
post-script: ${{ matrix.post-script }}
package-name: ${{ matrix.package-name }}
smoke-test-script: ${{ matrix.smoke-test-script }}
# Using "development" as trigger event so these binaries are not uploaded
# to official channels yet
trigger-event: ${{ github.event_name }}
architecture: aarch64
secrets:
AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
69 changes: 69 additions & 0 deletions .github/workflows/test-linux-aarch64-cpu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Unit-tests on Linux CPU

on:
pull_request:
push:
branches:
- nightly
- main
- release/*
workflow_dispatch:

env:
CHANNEL: "nightly"

jobs:
tests:
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: t4g.2xlarge
repository: pytorch/text
script: |
# Mark Build Directory Safe
git config --global --add safe.directory /__w/text/text

# Set up Environment Variables
export PYTHON_VERSION="${{ matrix.python_version }}"
export VERSION="cpu"
export CUDATOOLKIT="cpuonly"

# Set CHANNEL
if [[ (${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
export CHANNEL=test
else
export CHANNEL=nightly
fi

# Create Conda Env
conda create -yp ci_env python="${PYTHON_VERSION}"
conda activate /work/ci_env
python3 -m pip --quiet install cmake>=3.18.0 ninja
conda env update --file ".circleci/unittest/linux/scripts/environment.yml" --prune

# TorchText-specific Setup
printf "* Downloading SpaCy English models\n"
python -m spacy download en_core_web_sm
printf "* Downloading SpaCy German models\n"
python -m spacy download de_core_news_sm

# Install PyTorch, Torchvision, and TorchData
set -ex
conda install \
--yes \
-c "pytorch-${CHANNEL}" \
-c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] \
"${CUDATOOLKIT}"
printf "Installing torchdata nightly\n"
python3 -m pip install "portalocker>=2.0.0"
python3 -m pip install --pre torchdata --extra-index-url https://download.pytorch.org/whl/nightly/cpu
python3 setup.py develop
python3 -m pip install parameterized

# Run Tests
python3 -m torch.utils.collect_env
cd test
python3 -m pytest --cov=torchtext --junitxml=test-results/junit.xml -v --durations 20 torchtext_unittest
Loading