Skip to content

Commit b8539eb

Browse files
authored
Release 2.2.0 pypi prep script modifications (#1686)
1 parent 55b339d commit b8539eb

File tree

5 files changed

+31
-44
lines changed

5 files changed

+31
-44
lines changed

.github/workflows/validate-repackaged-binary-sizes.yml

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,66 +23,64 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
whl:
26-
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp310-cp310-linux_x86_64.whl
27-
python: "3.10" # python version to use for smoke tests
28-
upload_artifact: false # upload the repackaged binary as an artifact
29-
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp37-cp37m-linux_x86_64.whl
30-
python: "3.7"
26+
- url: https://download.pytorch.org/whl/test/cu121/torch-2.2.0%2Bcu121-cp312-cp312-linux_x86_64.whl
27+
python: "3.12"
3128
artifact: false
32-
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp38-cp38-linux_x86_64.whl
33-
python: "3.8"
29+
- url: https://download.pytorch.org/whl/test/cu121/torch-2.2.0%2Bcu121-cp311-cp311-linux_x86_64.whl
30+
python: "3.11" # python version to use for smoke tests
31+
upload_artifact: false # upload the repackaged binary as an artifact
32+
- url: https://download.pytorch.org/whl/test/cu121/torch-2.2.0%2Bcu121-cp310-cp310-linux_x86_64.whl
33+
python: "3.10"
3434
artifact: false
35-
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp39-cp39-linux_x86_64.whl
35+
- url: https://download.pytorch.org/whl/test/cu121/torch-2.2.0%2Bcu121-cp39-cp39-linux_x86_64.whl
3636
python: "3.9"
3737
artifact: false
38-
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp311-cp311-linux_x86_64.whl
39-
# python: "3.11"
40-
# artifact: false
38+
- url: https://download.pytorch.org/whl/test/cu121/torch-2.2.0%2Bcu121-cp38-cp38-linux_x86_64.whl
39+
python: "3.8"
40+
artifact: false
4141

4242
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
4343
with:
44-
runner: linux.4xlarge.nvidia.gpu
44+
runner: linux.g5.4xlarge.nvidia.gpu
4545
job-name: "Validate binary size"
4646
upload-artifact: ${{ matrix.whl.upload_artifact == 'true' && 'repackaged-binary' || '' }}
4747
script: |
4848
set -ex
4949
export ENV_NAME="conda-env-${{ github.run_id }}"
50-
export GPU_ARCH_VER="11.7"
51-
export GPU_ARCH_TYPE="cuda"
52-
export CUDA_VER="11.7"
50+
export MATRIX_GPU_ARCH_VERSION="12.1"
51+
export MATRIX_GPU_ARCH_TYPE="cuda"
52+
export MATRIX_CUDA_VER="12.1"
5353
export DESIRED_PYTHON="${{ matrix.whl.python }}"
54-
export DESIRED_CUDA="cu117"
55-
export PACKAGE_TYPE="wheel"
54+
export MATRIX_PACKAGE_TYPE="wheel"
5655
export TARGET_OS="linux"
57-
export INSTALLATION=""
58-
56+
5957
# install zip
6058
sudo yum install zip -y
61-
59+
6260
# install patchelf
6361
chmod a+x common/install_patchelf.sh
6462
sudo common/install_patchelf.sh
65-
63+
6664
# download torch whl
6765
wget ${{ matrix.whl.url }}
6866
FILENAME=$(ls -1 *.whl | head -n 1)
6967
SIZE_BEFORE=$(du -h $FILENAME | cut -f1)
70-
68+
7169
# repackage into manywheel
7270
release/pypi/prep_binary_for_pypi.sh $FILENAME
73-
71+
7472
NEW_FILENAME=$(ls -1 *.whl | head -n 1)
7573
echo "::notice:: $FILENAME before: $SIZE_BEFORE after: $(du -h $NEW_FILENAME | cut -f1)"
76-
74+
7775
# cp to ${RUNNER_ARTIFACT_DIR}
7876
cp $NEW_FILENAME ${RUNNER_ARTIFACT_DIR}/
79-
77+
8078
# create conda env
8179
conda create -y -n $ENV_NAME python=$DESIRED_PYTHON
8280
conda activate $ENV_NAME
83-
81+
8482
# install torch
8583
pip install numpy pillow $NEW_FILENAME
86-
84+
8785
# run smoke test
88-
python ./test/smoke_test/smoke_test.py --package=torchonly
86+
python ./test/smoke_test/smoke_test.py --package=torchonly

release/pypi/prep_binary_for_pypi.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,6 @@ for whl_file in "$@"; do
5252
(
5353
set -x
5454

55-
# Special build with pypi cudnn remove it from version
56-
if [[ $whl_file == *"with.pypi.cudnn"* ]]; then
57-
rm -rf "${whl_dir}/caffe2"
58-
rm -rf "${whl_dir}"/torch/lib/libnvrtc*
59-
60-
sed -i -e "s/-with-pypi-cudnn//g" "${whl_dir}/torch/version.py"
61-
fi
62-
6355
find "${dist_info_folder}" -type f -exec sed -i "s!${version_with_suffix}!${version_no_suffix}!" {} \;
6456
# Moves distinfo from one with a version suffix to one without
6557
# Example: torch-1.8.0+cpu.dist-info => torch-1.8.0.dist-info

release/pypi/promote_pypi_to_staging.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ upload_pypi_to_staging() {
2121
}
2222

2323
# Uncomment these to promote to pypi
24-
PYTORCH_LINUX_VERSION_SUFFIX="%2Bcu121.with.pypi.cudnn"
2524
LINUX_VERSION_SUFFIX="%2Bcu121"
2625
CPU_VERSION_SUFFIX="%2Bcpu"
2726
MACOS_X86_64="macosx_.*_x86_64"
2827
MACOS_ARM64="macosx_.*_arm64"
2928

30-
PLATFORM="linux_x86_64" VERSION_SUFFIX="${PYTORCH_LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
29+
PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
3130
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
3231
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
3332
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # intel mac

release/pypi/upload_pypi_to_staging.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ pushd "${output_tmp_dir}"
3333
# Dry run by default
3434
DRY_RUN=${DRY_RUN:-enabled}
3535
# On dry run just echo the commands that are meant to be run
36-
TWINE_UPLOAD="echo twine upload"
3736
DRY_RUN_FLAG="--dryrun"
3837
if [[ $DRY_RUN = "disabled" ]]; then
39-
TWINE_UPLOAD="twine upload"
4038
DRY_RUN_FLAG=""
4139
fi
4240

release/release_versions.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22

33
# Make sure to update these versions when doing a release first
4-
PYTORCH_VERSION=${PYTORCH_VERSION:-2.1.1}
5-
TORCHVISION_VERSION=${TORCHVISION_VERSION:-0.16.1}
6-
TORCHAUDIO_VERSION=${TORCHAUDIO_VERSION:-2.1.1}
7-
TORCHTEXT_VERSION=${TORCHTEXT_VERSION:-0.16.1}
4+
PYTORCH_VERSION=${PYTORCH_VERSION:-2.2.0}
5+
TORCHVISION_VERSION=${TORCHVISION_VERSION:-0.17.0}
6+
TORCHAUDIO_VERSION=${TORCHAUDIO_VERSION:-2.2.0}
7+
TORCHTEXT_VERSION=${TORCHTEXT_VERSION:-0.17.0}
88
TORCHDATA_VERSION=${TORCHDATA_VERSION:-0.7.1}
99
TORCHREC_VERSION=${TORCHREC_VERSION:-0.6.0}
1010
FBGEMMGPU_VERSION=${FBGEMMGPU_VERSION:-0.6.0}

0 commit comments

Comments
 (0)