Skip to content

Commit 0904230

Browse files
atalmanjithunnair-amd
authored andcommitted
Add pypi cudnn package to tests (pytorch#1168)
* Add pypi cudnn package to tests * Fix pypi installation check * Fix pypi instructions setting
1 parent dc17371 commit 0904230

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.github/actions/validate-binary/action.yml

+16
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ inputs:
1313
description: 'Installation instructions'
1414
required: true
1515
default: ''
16+
installation_pypi:
17+
description: 'Installation instructions for pypi'
18+
required: false
19+
default: ''
1620
python_version:
1721
description: 'Python version'
1822
required: true
@@ -60,13 +64,16 @@ runs:
6064
GPU_ARCH_VER: ${{ inputs.gpu_arch_ver }}
6165
GPU_ARCH_TYPE: ${{ inputs.gpu_arch_type }}
6266
INSTALLATION: ${{ inputs.installation }}
67+
INSTALLATION_PYPI: ${{ inputs.installation_pypi }}
6368
ENV_NAME: conda-env-${{ github.run_id }}
6469
DESIRED_PYTHON: ${{ inputs.python_version }}
6570
DESIRED_CUDA: ${{ inputs.desired_cuda }}
6671
DESIRED_DEVTOOLSET: ${{ inputs.dev_toolset }}
6772
PACKAGE_TYPE: ${{ inputs.package_type }}
73+
TARGET_OS: ${{ inputs.target_os }}
6874
run: |
6975
76+
# Special case Python 3.11 wheels
7077
if [ $DESIRED_PYTHON == '3.11' ]; then
7178
set -ex
7279
export CPYTHON_VERSIONS=3.11.0
@@ -84,6 +91,15 @@ runs:
8491
eval ${PYTHON_PATH}/python ./test/smoke_test/smoke_test.py --package torchonly
8592
else
8693
set -ex
94+
95+
# Special case Pypi installation instructions
96+
if [ ! -z "${INSTALLATION_PYPI}" ]; then
97+
conda create -yp ${ENV_NAME}_pypi python=${{ inputs.python_version }} numpy
98+
conda run -p ${ENV_NAME}_pypi $INSTALLATION_PYPI
99+
conda run -p ${ENV_NAME}_pypi python3 ./test/smoke_test/smoke_test.py --package torchonly
100+
conda env remove -p ${ENV_NAME}_pypi
101+
fi
102+
87103
conda create -yp ${ENV_NAME} python=${{ inputs.python_version }} numpy
88104
conda run -p ${ENV_NAME} $INSTALLATION
89105
conda run -p ${ENV_NAME} python3 ./test/smoke_test/smoke_test.py

.github/workflows/validate-linux-binaries.yml

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
gpu_arch_type: ${{ matrix.gpu_arch_type }}
7777
gpu_arch_ver: ${{ matrix.gpu_arch_version }}
7878
installation: ${{ matrix.installation }}
79+
installation_pypi: ${{ matrix.installation_pypi }}
7980
python_version: ${{ matrix.python_version }}
8081
desired_cuda: ${{ matrix.desired_cuda }}
8182
dev_toolset: ''

0 commit comments

Comments
 (0)