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

Fix validations #1620

Open
wants to merge 1 commit into
base: release_validations
Choose a base branch
from
Open
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
12 changes: 9 additions & 3 deletions .github/scripts/validate_pipy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,21 @@ conda create -yn ${ENV_NAME}_pypi python=${MATRIX_PYTHON_VERSION} numpy ffmpeg
conda activate ${ENV_NAME}_pypi

TEST_SUFFIX=""
RELEASE_SUFFIX=""
# if RELESE version is passed as parameter - install speific version
if [[ ! -z ${RELEASE_VERSION} ]]; then
RELEASE_SUFFIX="==${RELEASE_VERSION}"
fi

if [[ ${TORCH_ONLY} == 'true' ]]; then
TEST_SUFFIX=" --package torchonly"
pip3 install --pre torch --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
pip3 install --pre torch${RELEASE_SUFFIX} --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
else
if [[ ${MATRIX_CHANNEL} != "release" ]]; then
pip3 install --pre torch --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
pip3 install --pre torch${RELEASE_SUFFIX} --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
pip3 install --pre torchvision torchaudio --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
else
pip3 install torch torchvision torchaudio
pip3 install torch${RELEASE_SUFFIX} torchvision torchaudio
fi
fi

Expand Down
26 changes: 9 additions & 17 deletions .github/scripts/validate_poetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,17 @@ if [[ ${TORCH_ONLY} == 'true' ]]; then
TEST_SUFFIX=" --package torchonly"
fi

if [[ ${MATRIX_CHANNEL} != "release" ]]; then
# Installing poetry from our custom repo. We need to configure it before use and disable authentication
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
poetry source add --priority=explicit domains "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}"
poetry source add --priority=supplemental pytorch-channel "https://download.pytorch.org/whl/${MATRIX_CHANNEL}"
poetry source add --priority=supplemental pytorch "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn"
poetry --quiet add --source pytorch torch
RELEASE_SUFFIX=""
# if RELESE version is passed as parameter - install speific version
if [[ ! -z ${RELEASE_VERSION} ]]; then
RELEASE_SUFFIX="@${RELEASE_VERSION}"
fi


if [[ ${TORCH_ONLY} != 'true' ]]; then
poetry --quiet add --source domains torchvision torchaudio
fi
if [[ ${TORCH_ONLY} == 'true' ]]; then
poetry --quiet add torch${RELEASE_SUFFIX}
else
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
poetry source add --priority=explicit pytorch "https://download.pytorch.org/whl/${MATRIX_DESIRED_CUDA}"
if [[ ${TORCH_ONLY} == 'true' ]]; then
poetry --quiet add torch
else
poetry --quiet add --source pytorch torch torchaudio torchvision
fi
poetry --quiet add torch${RELEASE_SUFFIX} torchaudio torchvision
fi

python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled
Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/validate-aarch64-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -38,6 +48,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-aarch64-linux-matrix:
Expand All @@ -47,7 +67,6 @@ jobs:
os: linux-aarch64
channel: ${{ inputs.channel }}
with-cuda: disable

linux-aarch64:
needs: generate-aarch64-linux-matrix
strategy:
Expand All @@ -72,6 +91,8 @@ jobs:
export ENV_NAME="conda-env-${{ github.run_id }}"
export TARGET_OS="linux-aarch64"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
eval "$(conda shell.bash hook)"

# Standart case: Validate binaries
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/validate-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,44 +60,69 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate'
default: ""
required: false
type: string


jobs:
generate-release-matrix:
uses: pytorch/test-infra/.github/workflows/generate_release_matrix.yml@main
with:
version: ${{ inputs.version }}

win:
if: inputs.os == 'windows' || inputs.os == 'all'
needs: generate-release-matrix
uses: ./.github/workflows/validate-windows-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}

linux:
if: inputs.os == 'linux' || inputs.os == 'all'
needs: generate-release-matrix
uses: ./.github/workflows/validate-linux-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}

linux-aarch64:
if: inputs.os == 'linux-aarch64'
needs: generate-release-matrix
uses: ./.github/workflows/validate-aarch64-linux-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}

version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
mac:
if: inputs.os == 'macos' || inputs.os == 'all'
needs: generate-release-matrix
uses: ./.github/workflows/validate-macos-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}

mac-arm64:
if: inputs.os == 'macos' || inputs.os == 'all'
needs: generate-release-matrix
uses: ./.github/workflows/validate-macos-arm64-binaries.yml
with:
channel: ${{ inputs.channel }}
ref: ${{ inputs.ref || github.ref }}
torchonly: ${{ inputs.torchonly }}
version: ${{ inputs.version }}
release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }}
23 changes: 23 additions & 0 deletions .github/workflows/validate-linux-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -38,6 +48,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-linux-matrix:
Expand All @@ -64,8 +84,11 @@ jobs:
set -ex
export ENV_NAME="conda-env-${{ github.run_id }}"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
export TARGET_OS="linux"
eval "$(conda shell.bash hook)"
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
cat release_matrix.json

# Special case PyPi installation package. And Install of PyPi package via poetry
if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" && ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/validate-macos-arm64-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -38,6 +48,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-macos-arm64-matrix:
Expand All @@ -64,4 +84,6 @@ jobs:
export ENV_NAME="conda-env-${{ github.run_id }}"
export TARGET_OS="macos-arm64"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source ./.github/scripts/validate_binaries.sh
22 changes: 22 additions & 0 deletions .github/workflows/validate-macos-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -38,6 +48,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-macos-matrix:
Expand All @@ -64,4 +84,6 @@ jobs:
export ENV_NAME="conda-env-${{ github.run_id }}"
export TARGET_OS="macos"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source ./.github/scripts/validate_binaries.sh
24 changes: 22 additions & 2 deletions .github/workflows/validate-windows-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string
workflow_dispatch:
inputs:
channel:
Expand All @@ -38,6 +48,16 @@ on:
default: false
required: false
type: boolean
version:
description: 'Version to validate - optional'
default: ""
required: false
type: string
release-matrix:
description: 'Release matrix - optional'
default: ""
required: false
type: string

jobs:
generate-windows-matrix:
Expand All @@ -46,7 +66,6 @@ jobs:
package-type: all
os: windows
channel: ${{ inputs.channel }}

win:
needs: generate-windows-matrix
strategy:
Expand All @@ -66,9 +85,10 @@ jobs:
export ENV_NAME="conda-env-${{ github.run_id }}"
export TARGET_OS="windows"
export TORCH_ONLY=${{ inputs.torchonly }}
export RELEASE_VERSION=${{ inputs.version }}
printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json
source /c/Jenkins/Miniconda3/etc/profile.d/conda.sh
if [[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then
./windows/internal/driver_update.bat
fi

source ./.github/scripts/validate_binaries.sh
14 changes: 12 additions & 2 deletions aarch64_linux/aarch64_ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@ curl -L -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/late
chmod +x /mambaforge.sh
/mambaforge.sh -b -p /opt/conda
rm /mambaforge.sh
/opt/conda/bin/conda config --set ssl_verify False
/opt/conda/bin/conda install -y -c conda-forge python=${DESIRED_PYTHON} numpy pyyaml setuptools patchelf pygit2 openblas ninja scons
source /opt/conda/etc/profile.d/conda.sh
conda config --set ssl_verify False
conda create -y -c conda-forge -n aarch64_env python=${DESIRED_PYTHON}
conda activate aarch64_env

if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
NUMPY_VERSION="1.24.4"
else
NUMPY_VERSION="1.26.0"
fi
conda install -y -c conda-forge numpy==${NUMPY_VERSION} pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.24 ninja==1.11.1 scons==4.5.2

python --version
conda --version
Loading