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 test ops validation for validation workflows #1650

Merged
merged 2 commits into from
Dec 28, 2023
Merged
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
16 changes: 16 additions & 0 deletions .github/scripts/validate_test_ops.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions .github/workflows/validate-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/validate-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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)"
Expand All @@ -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