From 22856e0d041b77a376aa2459d5e458103f79ce4a Mon Sep 17 00:00:00 2001 From: Ivan Zaitsev Date: Wed, 14 Dec 2022 09:20:41 -0800 Subject: [PATCH] evaluate the fix from #1231 --- .../validate-repackaged-binary-sizes.yml | 18 ++++++++---------- release/pypi/prep_binary_for_pypi.sh | 10 +++++++++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/validate-repackaged-binary-sizes.yml b/.github/workflows/validate-repackaged-binary-sizes.yml index 29d1bdc53e..f014d7730e 100644 --- a/.github/workflows/validate-repackaged-binary-sizes.yml +++ b/.github/workflows/validate-repackaged-binary-sizes.yml @@ -21,20 +21,18 @@ jobs: 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" +# - 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" + # - 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" uses: pytorch/test-infra/.github/workflows/linux_job.yml@main with: runner: linux.4xlarge.nvidia.gpu - repository: "pytorch/builder" - ref: ${{ github.ref }} job-name: "Validate binary size" script: | set -ex diff --git a/release/pypi/prep_binary_for_pypi.sh b/release/pypi/prep_binary_for_pypi.sh index 7e09713f65..4eee400586 100755 --- a/release/pypi/prep_binary_for_pypi.sh +++ b/release/pypi/prep_binary_for_pypi.sh @@ -58,7 +58,7 @@ for whl_file in "$@"; do rm -rf "${whl_dir}"/torch/lib/libnvrtc* (find "${whl_dir}/torch/include/caffe2" -maxdepth 1 -mindepth 1 -type d|grep -v serialize|xargs rm -rf) || echo "caffe2 is empty already" sed -i -e "s/Requires-Dist: nvidia-cuda-runtime-cu11/Requires-Dist: nvidia-cuda-runtime-cu11 (==11.7.99)/" "${whl_dir}"/*/METADATA - sed -i -e "/^Requires-Dist: nvidia-cublas-cu11 (==11.10.3.66).*/a Requires-Dist: nvidia-cuda-nvrtc-cu11 (==11.7.99)" "${whl_dir}"/*/METADATA + sed -i -e "/^Requires-Dist: nvidia-cublas-cu11 (==11.10.3.66).*/a Requires-Dist: nvidia-cuda-nvrtc-cu11 (==11.7.99) ; platform_system == \"Linux\"" "${whl_dir}"/*/METADATA sed -i -e "s/-with-pypi-cudnn//g" "${whl_dir}/torch/version.py" find "${whl_dir}/torch/" -maxdepth 1 -type f -name "*.so*" | while read sofile; do @@ -78,7 +78,15 @@ for whl_file in "$@"; do find "${dist_info_folder}" -type f -exec sed -i "s!${version_with_suffix}!${version_no_suffix}!" {} \; # Moves distinfo from one with a version suffix to one without # Example: torch-1.8.0+cpu.dist-info => torch-1.8.0.dist-info + + echo "Before moving dist_info_folder" + ls -l + mv "${dist_info_folder}" "${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}" + + echo "After moving dist_info_folder" + ls -l + cd "${whl_dir}" (