From 2a8d89689487e915ac95f048fc3ca92b0581a6ba Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 10 Aug 2023 13:22:46 -0700 Subject: [PATCH] Add aarch64 to validation framework --- .github/scripts/validate_binaries.sh | 2 + .../validate-aarch64-linux-binaries.yml | 61 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/validate-aarch64-linux-binaries.yml diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index 56668ab77..cdcbea30b 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -27,6 +27,8 @@ else if [[ ${TARGET_OS} == 'windows' ]]; then python ./test/smoke_test/smoke_test.py + elif [[ ${TARGET_OS} == 'aarch64-linux' ]]; then + python3 ./test/smoke_test/smoke_test.py --package=torchonly else python3 ./test/smoke_test/smoke_test.py fi diff --git a/.github/workflows/validate-aarch64-linux-binaries.yml b/.github/workflows/validate-aarch64-linux-binaries.yml new file mode 100644 index 000000000..3ffefa52a --- /dev/null +++ b/.github/workflows/validate-aarch64-linux-binaries.yml @@ -0,0 +1,61 @@ +name: Validate Aarch64 linux binaries + +on: + workflow_call: + inputs: + channel: + description: "Channel to use (nightly, test, release, all)" + required: true + type: string + ref: + description: 'Reference to checkout, defaults to empty' + default: "" + required: false + type: string + workflow_dispatch: + inputs: + channel: + description: "Channel to use (nightly, test, release, all)" + required: true + type: choice + options: + - release + - nightly + - test + - all + ref: + description: 'Reference to checkout, defaults to empty' + default: "" + required: false + type: string + +jobs: + generate-aarch64-linux-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: linux-aarch64 + channel: ${{ inputs.channel }} + with-cuda: disable + + linux: + needs: generate-aarch64-linux-matrix + strategy: + matrix: ${{ fromJson(needs.generate-linux-matrix.outputs.matrix) }} + fail-fast: false + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + name: ${{ matrix.build_name }} + with: + runner: ${{ matrix.validation_runner }} + repository: "pytorch/builder" + ref: ${{ inputs.ref || github.ref }} + job-name: ${{ matrix.build_name }} + binary-matrix: ${{ toJSON(matrix) }} + script: | + set -ex + export ENV_NAME="conda-env-${{ github.run_id }}" + export TARGET_OS="aarch64-linux" + eval "$(conda shell.bash hook)" + + # Standart case: Validate binaries + source ./.github/scripts/validate_binaries.sh