Skip to content

Commit cb0c4c7

Browse files
authored
Merge branch 'release_validations' into fix_validations
2 parents 4d985d7 + e6b3ac5 commit cb0c4c7

20 files changed

+70
-243
lines changed

.github/scripts/validate_binaries.sh

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ else
1212
TEST_SUFFIX=" --package torchonly"
1313
fi
1414

15+
# if RELESE version is passed as parameter - install speific version
16+
if [[ ! -z ${RELEASE_VERSION} ]]; then
17+
INSTALLATION=${INSTALLATION/"torch "/"torch==${RELEASE_VERSION} "}
18+
INSTALLATION=${INSTALLATION/"-y pytorch "/"-y pytorch==${RELEASE_VERSION} "}
19+
INSTALLATION=${INSTALLATION/"::pytorch "/"::pytorch==${RELEASE_VERSION} "}
20+
fi
21+
1522
export OLD_PATH=${PATH}
1623
# Workaround macos-arm64 runners. Issue: https://github.com/pytorch/test-infra/issues/4342
1724
if [[ ${TARGET_OS} == 'macos-arm64' ]]; then

.github/scripts/validate_poetry.sh

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ if [[ ! -z ${RELEASE_VERSION} ]]; then
1919
RELEASE_SUFFIX="@${RELEASE_VERSION}"
2020
fi
2121

22-
2322
if [[ ${TORCH_ONLY} == 'true' ]]; then
2423
poetry --quiet add torch${RELEASE_SUFFIX}
2524
else

aarch64_linux/aarch64_ci_setup.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,17 @@ curl -L -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/late
1919
chmod +x /mambaforge.sh
2020
/mambaforge.sh -b -p /opt/conda
2121
rm /mambaforge.sh
22-
/opt/conda/bin/conda config --set ssl_verify False
23-
/opt/conda/bin/conda install -y -c conda-forge python=${DESIRED_PYTHON} numpy pyyaml setuptools patchelf pygit2 openblas ninja scons
22+
source /opt/conda/etc/profile.d/conda.sh
23+
conda config --set ssl_verify False
24+
conda create -y -c conda-forge -n aarch64_env python=${DESIRED_PYTHON}
25+
conda activate aarch64_env
26+
27+
if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
28+
NUMPY_VERSION="1.24.4"
29+
else
30+
NUMPY_VERSION="1.26.0"
31+
fi
32+
conda install -y -c conda-forge numpy==${NUMPY_VERSION} pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.24 ninja==1.11.1 scons==4.5.2
33+
2434
python --version
2535
conda --version

build_m1_domains.sh

-45
This file was deleted.

conda/pytorch-nightly/meta.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,20 @@ requirements:
2121
- pyyaml
2222
{% if cross_compile_arm64 == 0 %}
2323
- mkl-include # [x86_64]
24-
- mkl=2020.2 # [x86_64 and not win]
24+
- mkl=2020.2 # [py <= 311 and x86_64 and not win]
25+
- mkl=2023.1 # [py >= 312 and x86_64 and not win]
2526
- mkl=2021.4 # [x86_64 and win]
2627
{% endif %}
2728
- typing_extensions
2829
- ninja
2930
- libuv # [win]
3031
- numpy=1.19 # [py <= 39]
3132
- numpy=1.21.5 # [py == 310]
32-
- numpy=1.23.5 # [py >= 311]
33+
- numpy=1.23.5 # [py == 311]
34+
- numpy=1.26.1 # [py >= 312]
3335
- openssl=1.1.1l # [py >= 38 and py <= 310 and linux]
34-
- openssl=1.1.1s # [py >= 311 and linux]
36+
- openssl=1.1.1s # [py == 311 and linux]
37+
- openssl=3.1.4 # [py >= 312 and linux]
3538
{{ environ.get('PYTORCH_LLVM_PACKAGE', ' - llvmdev=9') }}
3639
{{ environ.get('MAGMA_PACKAGE', '') }}
3740

conda/upload.sh

-28
This file was deleted.

manywheel/build_common.sh

+3
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ case ${DESIRED_PYTHON} in
131131
cp311*)
132132
retry pip install -q numpy==1.23.1
133133
;;
134+
cp312*)
135+
retry pip install -q numpy==1.26.1
136+
;;
134137
# Should catch 3.9+
135138
*)
136139
retry pip install -q numpy==1.19.4

manywheel/build_cuda.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if [[ -n "$DESIRED_CUDA" ]]; then
4747
# There really has to be a better way to do this - eli
4848
# Possibly limiting builds to specific cuda versions be delimiting images would be a choice
4949
if [[ "$OS_NAME" == *"Ubuntu"* ]]; then
50-
echo "Switching to CUDA version $desired_cuda"
50+
echo "Switching to CUDA version ${DESIRED_CUDA}"
5151
/builder/conda/switch_cuda_version.sh "${DESIRED_CUDA}"
5252
fi
5353
else
@@ -263,7 +263,9 @@ else
263263
fi
264264

265265
# TODO: Remove me when Triton has a proper release channel
266-
if [[ $(uname) == "Linux" ]]; then
266+
# No triton dependency for now on 3.12 since we don't have binaries for it
267+
# and torch.compile doesn't work.
268+
if [[ $(uname) == "Linux" && "$DESIRED_PYTHON" != "3.12" ]]; then
267269
TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.github/ci_commit_pins/triton.txt)
268270

269271
if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then

manywheel/build_libtorch.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ for pkg in /$LIBTORCH_HOUSE_DIR/libtorch*.zip; do
343343
fi
344344

345345
# zip up the wheel back
346-
zip -rq $(basename $pkg) $PREIX*
346+
zip -rq $(basename $pkg) $PREFIX*
347347

348348
# replace original wheel
349349
rm -f $pkg

manywheel/build_rocm.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,9 @@ if [[ $ROCM_INT -ge 50600 ]]; then
222222
fi
223223

224224
# Add triton install dependency
225-
if [[ $(uname) == "Linux" ]]; then
225+
# No triton dependency for now on 3.12 since we don't have binaries for it
226+
# and torch.compile doesn't work.
227+
if [[ $(uname) == "Linux" && "$DESIRED_PYTHON" != "3.12" ]]; then
226228
TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-rocm.txt)
227229
TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_version.txt)
228230

manywheel/upload.sh

-44
This file was deleted.

release/pypi/promote_pypi_to_production.sh

+1
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ promote_staging_binaries torch "${PYTORCH_VERSION}"
3434
promote_staging_binaries torchvision "${TORCHVISION_VERSION}"
3535
promote_staging_binaries torchaudio "${TORCHAUDIO_VERSION}"
3636
promote_staging_binaries torchtext "${TORCHTEXT_VERSION}"
37+
promote_staging_binaries torchdata "${TORCHDATA_VERSION}"

release/pypi/promote_pypi_to_staging.sh

+13-5
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,34 @@ upload_pypi_to_staging() {
2323
# Uncomment these to promote to pypi
2424
PYTORCH_LINUX_VERSION_SUFFIX="%2Bcu121.with.pypi.cudnn"
2525
LINUX_VERSION_SUFFIX="%2Bcu121"
26-
WIN_VERSION_SUFFIX="%2Bcpu"
26+
CPU_VERSION_SUFFIX="%2Bcpu"
2727
MACOS_X86_64="macosx_.*_x86_64"
2828
MACOS_ARM64="macosx_.*_arm64"
2929

3030
PLATFORM="linux_x86_64" VERSION_SUFFIX="${PYTORCH_LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
3131
PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
32-
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
32+
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}"
3333
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # intel mac
3434
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # m1 mac
3535

3636
PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
3737
PLATFORM="linux_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
38-
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
38+
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
3939
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
4040
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}"
4141

4242
PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
4343
PLATFORM="linux_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
44-
PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
44+
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
4545
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
4646
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}"
4747

48-
upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
48+
PLATFORM="linux_x86" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
49+
PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
50+
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
51+
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}"
52+
53+
PLATFORM="manylinux2014_x86_64" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}"
54+
PLATFORM="win_amd64" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}"
55+
PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}"
56+
PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}"

release/pypi/upload_pypi_to_staging.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fi
4343
for pkg in ${pkgs_to_promote}; do
4444
pkg_basename="$(basename "${pkg}")"
4545

46-
if [[ "${pkg}" != *aarch64* ]]; then
46+
if [[ "${pkg}" != *aarch64* && "${pkg}" != *torchdata* ]]; then
4747
# sub out linux for manylinux1
4848
pkg_basename="$(basename "${pkg//linux/manylinux1}")"
4949
elif [[ "${pkg}" == *manylinux_2_17_aarch64* ]]; then

test/smoke_test/smoke_test.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@ def check_version(package: str) -> None:
9090
module_version = imported_module.__version__
9191
if not module_version.startswith(release_matrix[module["name"]]):
9292
raise RuntimeError(
93-
f"{module['name']} version mismatch, expected {release_matrix[module['name']]} for channel {channel}. But its {module_version}"
93+
f"{module['name']} version mismatch, expected: \
94+
{release_matrix[module['name']]} for channel {channel}. But its {module_version}"
9495
)
9596
else:
96-
print(f"{module['name']} version actual: {module_version} expected: {release_matrix[module['name']]} for channel {channel}.")
97+
print(f"{module['name']} version actual: {module_version} expected: \
98+
{release_matrix[module['name']]} for channel {channel}.")
9799

98100
else:
99101
print(f"Skip version check for channel {channel} as stable version is None")

wheel/build_wheel.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -136,23 +136,33 @@ export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
136136
SETUPTOOLS_PINNED_VERSION="=46.0.0"
137137
PYYAML_PINNED_VERSION="=5.3"
138138
EXTRA_CONDA_INSTALL_FLAGS=""
139-
case ${desired_python} in
139+
case $desired_python in
140+
3.12)
141+
echo "Using 3.12 deps"
142+
SETUPTOOLS_PINNED_VERSION=">=68.0.0"
143+
PYYAML_PINNED_VERSION=">=6.0.1"
144+
NUMPY_PINNED_VERSION="==1.26.0"
145+
;;
140146
3.11)
147+
echo "Using 3.11 deps"
141148
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
142149
PYYAML_PINNED_VERSION=">=5.3"
143150
NUMPY_PINNED_VERSION="==1.23.5"
144151
;;
145152
3.10)
153+
echo "Using 3.10 deps"
146154
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
147155
PYYAML_PINNED_VERSION=">=5.3"
148156
NUMPY_PINNED_VERSION="=1.21.2"
149157
;;
150158
3.9)
159+
echo "Using 3.9 deps"
151160
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
152161
PYYAML_PINNED_VERSION=">=5.3"
153162
NUMPY_PINNED_VERSION="=1.19"
154163
;;
155164
3.8)
165+
echo "Using 3.8 deps"
156166
if [[ "$(uname -m)" == "arm64" ]]; then
157167
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
158168
PYYAML_PINNED_VERSION=">=5.3"
@@ -162,6 +172,7 @@ case ${desired_python} in
162172
fi
163173
;;
164174
*)
175+
echo "Using default deps"
165176
NUMPY_PINNED_VERSION="=1.11.3"
166177
;;
167178
esac

0 commit comments

Comments
 (0)