From f4914e10400508f35d80e72eda1879788124fa74 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 28 Dec 2023 09:23:12 -0800 Subject: [PATCH 1/2] Add test ops validation --- .github/scripts/validate_test_ops.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/scripts/validate_test_ops.sh diff --git a/.github/scripts/validate_test_ops.sh b/.github/scripts/validate_test_ops.sh new file mode 100644 index 000000000..7c80b601e --- /dev/null +++ b/.github/scripts/validate_test_ops.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -eux -o pipefail + +retry () { + $* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*) +} + +# Clone the Pytorch branch +retry git clone --depth 1 https://github.com/pytorch/pytorch.git +retry git submodule update --init --recursive +pushd pytorch + +# Run test_ops validation +export CUDA_LAUNCH_BLOCKING=1 +python3 test/test_ops.py From 8a463afe996937183ac8357613789a8c3633242f Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 28 Dec 2023 09:25:17 -0800 Subject: [PATCH 2/2] include workflows --- .github/workflows/validate-binaries.yml | 11 +++++++++++ .github/workflows/validate-linux-binaries.yml | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/validate-binaries.yml b/.github/workflows/validate-binaries.yml index 8dbe5f27c..558be8e56 100644 --- a/.github/workflows/validate-binaries.yml +++ b/.github/workflows/validate-binaries.yml @@ -27,6 +27,11 @@ on: default: false required: false type: boolean + include-test-ops: + description: 'Include Test Ops tests (only Linux)' + default: false + required: false + type: boolean workflow_dispatch: inputs: os: @@ -65,6 +70,11 @@ on: default: "" required: false type: string + include-test-ops: + description: 'Include Test Ops tests (only Linux)' + default: false + required: false + type: boolean jobs: @@ -94,6 +104,7 @@ jobs: torchonly: ${{ inputs.torchonly }} version: ${{ inputs.version }} release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }} + include-test-ops: ${{ inputs.include-test-ops }} linux-aarch64: if: inputs.os == 'linux-aarch64' || inputs.os == 'all' diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index d1c6c29bd..3f652eff8 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -27,6 +27,11 @@ on: default: "" required: false type: string + include-test-ops: + description: 'Include Test Ops tests (only Linux)' + default: false + required: false + type: boolean workflow_dispatch: inputs: channel: @@ -58,6 +63,11 @@ on: default: "" required: false type: string + include-test-ops: + description: 'Include Test Ops tests (only Linux)' + default: false + required: false + type: boolean jobs: generate-linux-matrix: @@ -84,6 +94,7 @@ jobs: set -ex export ENV_NAME="conda-env-${{ github.run_id }}" export TORCH_ONLY=${{ inputs.torchonly }} + export INCLUDE_TEST_OPS=${{ inputs.include-test-ops }} export RELEASE_VERSION=${{ inputs.version }} export TARGET_OS="linux" eval "$(conda shell.bash hook)" @@ -97,3 +108,7 @@ jobs: # Standart case: Validate binaries source ./.github/scripts/validate_binaries.sh + + if [[ ${INCLUDE_TEST_OPS} == 'true' ]]; then + source ./.github/scripts/validate_test_ops.sh + fi