Skip to content

Commit 8aa71bd

Browse files
authored
Changes needed for core enablement of 3.12 binary wheels (#1586)
1 parent 75a8770 commit 8aa71bd

File tree

8 files changed

+34
-8
lines changed

8 files changed

+34
-8
lines changed

aarch64_linux/aarch64_ci_setup.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ 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+
conda install -y -c conda-forge numpy==1.26.0 pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.24 ninja==1.11.1 scons==4.5.2
2427
python --version
2528
conda --version

conda/pytorch-nightly/meta.yaml

Lines changed: 6 additions & 3 deletions
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

manywheel/build_common.sh

Lines changed: 3 additions & 0 deletions
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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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_rocm.sh

Lines changed: 3 additions & 1 deletion
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

wheel/build_wheel.sh

Lines changed: 12 additions & 1 deletion
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

windows/condaenv.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ FOR %%v IN (%DESIRED_PYTHON%) DO (
1414
if "%%v" == "3.9" call conda create -n py!PYTHON_VERSION_STR! -y -q numpy>=1.11 "mkl=2020.2" pyyaml boto3 cmake ninja typing_extensions python=%%v
1515
if "%%v" == "3.10" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.21.3 "mkl=2020.2" pyyaml boto3 "cmake=3.19.6" ninja typing_extensions python=%%v
1616
if "%%v" == "3.11" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.23.4 "mkl=2020.2" pyyaml boto3 "cmake=3.19.6" ninja typing_extensions python=%%v
17+
if "%%v" == "3.12" call conda create -n py!PYTHON_VERSION_STR! -y -q -c=conda-forge numpy=1.26.0 "mkl=2023.1" pyyaml boto3 "cmake=3.19.6" ninja typing_extensions python=%%v
1718
if "%%v" == "3" call conda create -n py!PYTHON_VERSION_STR! -y -q numpy=1.11 "mkl=2020.2" pyyaml boto3 cmake ninja typing_extensions python=%%v
1819
)
1920
endlocal

windows/internal/smoke_test.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ exit /b 1
3030
echo "install wheel package"
3131

3232
set PYTHON_INSTALLER_URL=
33+
if "%DESIRED_PYTHON%" == "3.12" set "PYTHON_INSTALLER_URL=https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe"
3334
if "%DESIRED_PYTHON%" == "3.11" set "PYTHON_INSTALLER_URL=https://www.python.org/ftp/python/3.11.0/python-3.11.0-amd64.exe"
3435
if "%DESIRED_PYTHON%" == "3.10" set "PYTHON_INSTALLER_URL=https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe"
3536
if "%DESIRED_PYTHON%" == "3.9" set "PYTHON_INSTALLER_URL=https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe"

0 commit comments

Comments
 (0)