Skip to content

Commit 9957f01

Browse files
committed
evaluate the fix from #1231
1 parent c88dbb3 commit 9957f01

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,20 @@ jobs:
2121
whl:
2222
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp310-cp310-linux_x86_64.whl
2323
python: "3.10"
24-
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp311-cp311-linux_x86_64.whl
25-
# python: "3.11"
26-
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp37-cp37m-linux_x86_64.whl
27-
python: "3.7"
28-
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp38-cp38-linux_x86_64.whl
29-
python: "3.8"
30-
- url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp39-cp39-linux_x86_64.whl
31-
python: "3.9"
24+
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp37-cp37m-linux_x86_64.whl
25+
# python: "3.7"
26+
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp38-cp38-linux_x86_64.whl
27+
# python: "3.8"
28+
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp39-cp39-linux_x86_64.whl
29+
# python: "3.9"
30+
# - url: https://download.pytorch.org/whl/test/cu117_pypi_cudnn/torch-1.13.1%2Bcu117.with.pypi.cudnn-cp311-cp311-linux_x86_64.whl
31+
# python: "3.11"
3232

3333
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
3434
with:
3535
runner: linux.4xlarge.nvidia.gpu
36-
repository: "pytorch/builder"
37-
ref: ${{ github.ref }}
3836
job-name: "Validate binary size"
37+
upload-artifact: pipy_wheel
3938
script: |
4039
set -ex
4140
export ENV_NAME="conda-env-${{ github.run_id }}"
@@ -66,6 +65,9 @@ jobs:
6665
NEW_FILENAME=$(ls -1 *.whl | head -n 1)
6766
echo "::notice:: $FILENAME before: $SIZE_BEFORE after: $(du -h $NEW_FILENAME | cut -f1)"
6867
68+
# cp to ${RUNNER_ARTIFACT_DIR}
69+
cp $NEW_FILENAME ${RUNNER_ARTIFACT_DIR}/
70+
6971
# create conda env
7072
conda create -y -n $ENV_NAME python=$DESIRED_PYTHON
7173
conda activate $ENV_NAME

release/pypi/prep_binary_for_pypi.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ for whl_file in "$@"; do
5858
rm -rf "${whl_dir}"/torch/lib/libnvrtc*
5959
(find "${whl_dir}/torch/include/caffe2" -maxdepth 1 -mindepth 1 -type d|grep -v serialize|xargs rm -rf) || echo "caffe2 is empty already"
6060
sed -i -e "s/Requires-Dist: nvidia-cuda-runtime-cu11/Requires-Dist: nvidia-cuda-runtime-cu11 (==11.7.99)/" "${whl_dir}"/*/METADATA
61-
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
61+
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
6262

6363
sed -i -e "s/-with-pypi-cudnn//g" "${whl_dir}/torch/version.py"
6464
find "${whl_dir}/torch/" -maxdepth 1 -type f -name "*.so*" | while read sofile; do
@@ -78,7 +78,15 @@ for whl_file in "$@"; do
7878
find "${dist_info_folder}" -type f -exec sed -i "s!${version_with_suffix}!${version_no_suffix}!" {} \;
7979
# Moves distinfo from one with a version suffix to one without
8080
# Example: torch-1.8.0+cpu.dist-info => torch-1.8.0.dist-info
81+
82+
echo "Before moving dist_info_folder"
83+
ls -l "${whl_dir}"
84+
8185
mv "${dist_info_folder}" "${dirname_dist_info_folder}/${basename_dist_info_folder/${version_with_suffix}/${version_no_suffix}}"
86+
87+
echo "After moving dist_info_folder"
88+
ls -l "${whl_dir}"
89+
8290
cd "${whl_dir}"
8391

8492
(

0 commit comments

Comments
 (0)