Skip to content

Commit

Permalink
Validate binary size
Browse files Browse the repository at this point in the history
  • Loading branch information
izaitsevfb committed Dec 14, 2022
1 parent f52bc92 commit 2aaac3a
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/validate-repackaged-binary-sizes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Validate manywheel binaries

on:
pull_request:

jobs:
validate-binary-size:
runs-on: linux.4xlarge.nvidia.gpu
strategy:
fail-fast: false
matrix:
whl:
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp310-cp310-linux_x86_64.whl
python: 3.10
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp311-cp311-linux_x86_64.whl
# python: 3.11
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp37-cp37m-linux_x86_64.whl
# python: 3.7
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp38-cp38-linux_x86_64.whl
# python: 3.8
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp39-cp39-linux_x86_64.whl
# python: 3.9

env:
GPU_ARCH_TYPE: cuda
GPU_ARCH_VERSION: "11.7"

steps:
- name: Checkout PyTorch builder
uses: actions/checkout@v3

- name: Install patchelf
run: |
chmod a+x common/install_patchelf.sh
sudo common/install_patchelf.sh
- name: Download torch whl
run: |
wget ${{ matrix.whl.url }}
FILENAME=$(ls -1 *.whl | head -n 1)
echo "::notice::Before repackaging: $(du -h $FILENAME | cut -f1)"
echo "FILENAME=$FILENAME" >> $GITHUB_ENV
- name: Repackage into manywheel
continue-on-error: true
run: |
release/pypi/prep_binary_for_pypi.sh $FILENAME
NEW_FILENAME=$(ls -1 *.whl | head -n 1)
echo "::notice::After repackaging: $(du -h $NEW_FILENAME | cut -f1)"
echo "NEW_FILENAME=$NEW_FILENAME" >> $GITHUB_ENV
- name: Run smoke test
continue-on-error: true
run: |
set -ex
# run smoke test to make sure the binary is not broken
conda create -n smoke-test python=${{ matrix.whl.python }} -y
conda activate smoke-test
pip install $NEW_FILENAME
python ./test/smoke_test/smoke_test.py -- --package=torchonly
- name: Hold runner for 60 minutes or until ssh sessions have drained
timeout-minutes: 60
run: |
sleep infinity

0 comments on commit 2aaac3a

Please sign in to comment.