Skip to content

Commit 65f8e7d

Browse files
authored
Update nightly wheel build numpy to 2.0 (#1747)
* Update wheel build numpy to 2.0 (#1746) * Update wheel build numpy to 2.0 * aarch64 * Update build_wheel.sh * Simplify
1 parent a522a56 commit 65f8e7d

File tree

4 files changed

+23
-18
lines changed

4 files changed

+23
-18
lines changed

aarch64_linux/aarch64_ci_setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ conda create -y -c conda-forge -n "${CONDA_ENV_NAME}" python=${DESIRED_PYTHON}
2626
conda activate "${CONDA_ENV_NAME}"
2727

2828
if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
29-
NUMPY_VERSION="1.24.4"
29+
pip install -q numpy==1.24.4
3030
else
31-
NUMPY_VERSION="1.26.2"
31+
pip install -q --pre numpy==2.0.0b1
3232
fi
33-
conda install -y -c conda-forge numpy==${NUMPY_VERSION} pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.25=*openmp* ninja==1.11.1 scons==4.5.2
33+
conda install -y -c conda-forge pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.25=*openmp* ninja==1.11.1 scons==4.5.2
3434

3535
python --version
3636
conda --version

manywheel/build_common.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,12 @@ case ${DESIRED_PYTHON} in
114114
cp38*)
115115
retry pip install -q numpy==1.15
116116
;;
117-
cp310*)
118-
retry pip install -q numpy==1.21.2
119-
;;
120-
cp311*)
121-
retry pip install -q numpy==1.23.1
122-
;;
123-
cp312*)
124-
retry pip install -q numpy==1.26.1
117+
cp31*)
118+
retry pip install -q --pre numpy==2.0.0b1
125119
;;
126120
# Should catch 3.9+
127121
*)
128-
retry pip install -q numpy==1.19.4
122+
retry pip install -q --pre numpy==2.0.0b1
129123
;;
130124
esac
131125

wheel/build_wheel.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,25 +136,25 @@ case $desired_python in
136136
echo "Using 3.12 deps"
137137
SETUPTOOLS_PINNED_VERSION=">=68.0.0"
138138
PYYAML_PINNED_VERSION=">=6.0.1"
139-
NUMPY_PINNED_VERSION="==1.26.0"
139+
NUMPY_PINNED_VERSION="=2.0.0b1"
140140
;;
141141
3.11)
142142
echo "Using 3.11 deps"
143143
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
144144
PYYAML_PINNED_VERSION=">=5.3"
145-
NUMPY_PINNED_VERSION="==1.23.5"
145+
NUMPY_PINNED_VERSION="=2.0.0b1"
146146
;;
147147
3.10)
148148
echo "Using 3.10 deps"
149149
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
150150
PYYAML_PINNED_VERSION=">=5.3"
151-
NUMPY_PINNED_VERSION="=1.21.2"
151+
NUMPY_PINNED_VERSION="=2.0.0b1"
152152
;;
153153
3.9)
154154
echo "Using 3.9 deps"
155155
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
156156
PYYAML_PINNED_VERSION=">=5.3"
157-
NUMPY_PINNED_VERSION="=1.19"
157+
NUMPY_PINNED_VERSION="=2.0.0b1"
158158
;;
159159
3.8)
160160
echo "Using 3.8 deps"
@@ -173,7 +173,12 @@ tmp_env_name="wheel_py$python_nodot"
173173
conda create ${EXTRA_CONDA_INSTALL_FLAGS} -yn "$tmp_env_name" python="$desired_python"
174174
source activate "$tmp_env_name"
175175

176-
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq "numpy${NUMPY_PINNED_VERSION}" nomkl cmake ninja "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests
176+
if [[ $desired_python != "3.8" ]]; then
177+
pip install -q --pre numpy=${NUMPY_PINNED_VERSION}
178+
else
179+
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq "numpy${NUMPY_PINNED_VERSION}"
180+
fi
181+
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq nomkl cmake ninja "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests
177182
retry pip install -qr "${pytorch_rootdir}/requirements.txt" || true
178183

179184
# For USE_DISTRIBUTED=1 on macOS, need libuv and pkg-config to find libuv.

windows/internal/smoke_test.bat

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ if errorlevel 1 exit /b 1
5252

5353
set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"
5454

55-
pip install -q numpy protobuf
55+
56+
if "%DESIRED_PYTHON%" == "3.12" pip install -q --pre numpy==2.0.0b1 protobuf
57+
if "%DESIRED_PYTHON%" == "3.11" pip install -q --pre numpy==2.0.0b1 protobuf
58+
if "%DESIRED_PYTHON%" == "3.10" pip install -q --pre numpy==2.0.0b1 protobuf
59+
if "%DESIRED_PYTHON%" == "3.9" pip install -q --pre numpy==2.0.0b1 protobuf
60+
if "%DESIRED_PYTHON%" == "3.8" pip install -q numpy protobuf
61+
5662
if errorlevel 1 exit /b 1
5763

5864
for /F "delims=" %%i in ('where /R "%PYTORCH_FINAL_PACKAGE_DIR:/=\%" *.whl') do pip install "%%i"

0 commit comments

Comments
 (0)