From af8c9f3b12450ac603b58d65c1b264cdf3c75ee4 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 20 Oct 2022 08:19:48 -0700 Subject: [PATCH 1/3] Add pypi cudnn package to tests --- .github/actions/validate-binary/action.yml | 16 ++++++++++++++++ .github/workflows/validate-linux-binaries.yml | 1 + 2 files changed, 17 insertions(+) diff --git a/.github/actions/validate-binary/action.yml b/.github/actions/validate-binary/action.yml index ab3ec4728..7da9fe7e4 100644 --- a/.github/actions/validate-binary/action.yml +++ b/.github/actions/validate-binary/action.yml @@ -13,6 +13,10 @@ inputs: description: 'Installation instructions' required: true default: '' + installation_pypi: + description: 'Installation instructions for pypi' + required: false + default: '' python_version: description: 'Python version' required: true @@ -60,13 +64,16 @@ runs: GPU_ARCH_VER: ${{ inputs.gpu_arch_ver }} GPU_ARCH_TYPE: ${{ inputs.gpu_arch_type }} INSTALLATION: ${{ inputs.installation }} + INSTALLATION_PYPI: ${{ inputs.installation_pypi }} ENV_NAME: conda-env-${{ github.run_id }} DESIRED_PYTHON: ${{ inputs.python_version }} DESIRED_CUDA: ${{ inputs.desired_cuda }} DESIRED_DEVTOOLSET: ${{ inputs.dev_toolset }} PACKAGE_TYPE: ${{ inputs.package_type }} + TARGET_OS: ${{ inputs.target_os }} run: | + # Special case Python 3.11 wheels if [ $DESIRED_PYTHON == '3.11' ]; then set -ex export CPYTHON_VERSIONS=3.11.0 @@ -84,6 +91,15 @@ runs: eval ${PYTHON_PATH}/python ./test/smoke_test/smoke_test.py --package torchonly else set -ex + + # Special case Pypi installation instructions + if [ ! -z $INSTALLATION_PYPI ]; then + conda create -yp ${ENV_NAME}_pypi python=${{ inputs.python_version }} numpy + conda run -p ${ENV_NAME}_pypi $INSTALLATION + conda run -p ${ENV_NAME}_pypi python3 ./test/smoke_test/smoke_test.py --package torchonly + conda env remove -p ${ENV_NAME}_pypi + fi + conda create -yp ${ENV_NAME} python=${{ inputs.python_version }} numpy conda run -p ${ENV_NAME} $INSTALLATION conda run -p ${ENV_NAME} python3 ./test/smoke_test/smoke_test.py diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index eb5cd9b3f..082497b0f 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -76,6 +76,7 @@ jobs: gpu_arch_type: ${{ matrix.gpu_arch_type }} gpu_arch_ver: ${{ matrix.gpu_arch_version }} installation: ${{ matrix.installation }} + installation_pypi: ${{ matrix.installation_pypi }} python_version: ${{ matrix.python_version }} desired_cuda: ${{ matrix.desired_cuda }} dev_toolset: '' From 0b461920b37dbed53fa8e24c3c589be13c748d7a Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 20 Oct 2022 11:15:08 -0700 Subject: [PATCH 2/3] Fix pypi installation check --- .github/actions/validate-binary/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/validate-binary/action.yml b/.github/actions/validate-binary/action.yml index 7da9fe7e4..108a14ec1 100644 --- a/.github/actions/validate-binary/action.yml +++ b/.github/actions/validate-binary/action.yml @@ -93,9 +93,9 @@ runs: set -ex # Special case Pypi installation instructions - if [ ! -z $INSTALLATION_PYPI ]; then + if [ ! -z ${INSTALLATION_PYPI} ]; then conda create -yp ${ENV_NAME}_pypi python=${{ inputs.python_version }} numpy - conda run -p ${ENV_NAME}_pypi $INSTALLATION + conda run -p ${ENV_NAME}_pypi $INSTALLATION_PYPI conda run -p ${ENV_NAME}_pypi python3 ./test/smoke_test/smoke_test.py --package torchonly conda env remove -p ${ENV_NAME}_pypi fi From 559deba6153cbcb29c29505795b1a3b01444a54e Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 20 Oct 2022 12:51:30 -0700 Subject: [PATCH 3/3] Fix pypi instructions setting --- .github/actions/validate-binary/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/validate-binary/action.yml b/.github/actions/validate-binary/action.yml index 108a14ec1..baa041b7e 100644 --- a/.github/actions/validate-binary/action.yml +++ b/.github/actions/validate-binary/action.yml @@ -93,10 +93,10 @@ runs: set -ex # Special case Pypi installation instructions - if [ ! -z ${INSTALLATION_PYPI} ]; then + if [ ! -z "${INSTALLATION_PYPI}" ]; then conda create -yp ${ENV_NAME}_pypi python=${{ inputs.python_version }} numpy conda run -p ${ENV_NAME}_pypi $INSTALLATION_PYPI - conda run -p ${ENV_NAME}_pypi python3 ./test/smoke_test/smoke_test.py --package torchonly + conda run -p ${ENV_NAME}_pypi python3 ./test/smoke_test/smoke_test.py --package torchonly conda env remove -p ${ENV_NAME}_pypi fi