Skip to content

Commit dc2d6bf

Browse files
authored
Add numpy 2.0.0rc1 support to conda and wheels (#1768)
* Add numpy 2.0.0rc1 support to conda and wheels * conda * conda * test * fix
1 parent 47a8e4b commit dc2d6bf

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

aarch64_linux/aarch64_ci_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ conda activate "${CONDA_ENV_NAME}"
2828
if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
2929
pip install -q numpy==1.24.4
3030
else
31-
pip install -q --pre numpy==2.0.0b1
31+
pip install -q --pre numpy==2.0.0rc1
3232
fi
3333
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

conda/build_pytorch.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if [ -z "$ANACONDA_TOKEN" ]; then
8585
fi
8686
if [[ -z "$ANACONDA_USER" ]]; then
8787
# This is the channel that finished packages will be uploaded to
88-
ANACONDA_USER=soumith
88+
ANACONDA_USER='pytorch'
8989
fi
9090
if [[ -z "$GITHUB_ORG" ]]; then
9191
GITHUB_ORG='pytorch'
@@ -360,12 +360,14 @@ for py_ver in "${DESIRED_PYTHON[@]}"; do
360360
fi
361361

362362
echo "Calling conda-build at $(date)"
363+
# TODO: Remove atalman channel once we can wend numpy from
364+
# anaconda or pytorch or pytorch nightly channel
363365
time CMAKE_ARGS=${CMAKE_ARGS[@]} \
364366
EXTRA_CAFFE2_CMAKE_FLAGS=${EXTRA_CAFFE2_CMAKE_FLAGS[@]} \
365367
PYTORCH_GITHUB_ROOT_DIR="$pytorch_rootdir" \
366368
PYTORCH_BUILD_STRING="$build_string" \
367369
PYTORCH_MAGMA_CUDA_VERSION="$cuda_nodot" \
368-
conda build -c "$ANACONDA_USER" \
370+
conda build -c "$ANACONDA_USER" -c atalman \
369371
${NO_TEST:-} \
370372
--no-anaconda-upload \
371373
--python "$py_ver" \

conda/pytorch-nightly/meta.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ requirements:
3030
- ninja
3131
- libuv # [win]
3232
- numpy=1.19 # [py <= 39]
33-
- numpy=1.21.5 # [py == 310]
34-
- numpy=1.23.5 # [py == 311]
35-
- numpy=1.26.0 # [py >= 312]
33+
- numpy=2.0.0rc1 # [py >= 39]
3634
- openssl=1.1.1l # [py >= 38 and py <= 310 and linux]
3735
- openssl=1.1.1s # [py == 311 and linux]
3836
- openssl=3.0.12 # [py >= 312 and linux]

manywheel/build_common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ case ${DESIRED_PYTHON} in
115115
retry pip install -q numpy==1.15
116116
;;
117117
cp31*)
118-
retry pip install -q --pre numpy==2.0.0b1
118+
retry pip install -q --pre numpy==2.0.0rc1
119119
;;
120120
# Should catch 3.9+
121121
*)
122-
retry pip install -q --pre numpy==2.0.0b1
122+
retry pip install -q --pre numpy==2.0.0rc1
123123
;;
124124
esac
125125

wheel/build_wheel.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,25 +135,25 @@ case $desired_python in
135135
echo "Using 3.12 deps"
136136
SETUPTOOLS_PINNED_VERSION=">=68.0.0"
137137
PYYAML_PINNED_VERSION=">=6.0.1"
138-
NUMPY_PINNED_VERSION="=2.0.0b1"
138+
NUMPY_PINNED_VERSION="=2.0.0rc1"
139139
;;
140140
3.11)
141141
echo "Using 3.11 deps"
142142
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
143143
PYYAML_PINNED_VERSION=">=5.3"
144-
NUMPY_PINNED_VERSION="=2.0.0b1"
144+
NUMPY_PINNED_VERSION="=2.0.0rc1"
145145
;;
146146
3.10)
147147
echo "Using 3.10 deps"
148148
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
149149
PYYAML_PINNED_VERSION=">=5.3"
150-
NUMPY_PINNED_VERSION="=2.0.0b1"
150+
NUMPY_PINNED_VERSION="=2.0.0rc1"
151151
;;
152152
3.9)
153153
echo "Using 3.9 deps"
154154
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
155155
PYYAML_PINNED_VERSION=">=5.3"
156-
NUMPY_PINNED_VERSION="=2.0.0b1"
156+
NUMPY_PINNED_VERSION="=2.0.0rc1"
157157
;;
158158
3.8)
159159
echo "Using 3.8 deps"

windows/internal/smoke_test.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ if errorlevel 1 exit /b 1
5353
set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%"
5454

5555

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
56+
if "%DESIRED_PYTHON%" == "3.12" pip install -q --pre numpy==2.0.0rc1 protobuf
57+
if "%DESIRED_PYTHON%" == "3.11" pip install -q --pre numpy==2.0.0rc1 protobuf
58+
if "%DESIRED_PYTHON%" == "3.10" pip install -q --pre numpy==2.0.0rc1 protobuf
59+
if "%DESIRED_PYTHON%" == "3.9" pip install -q --pre numpy==2.0.0rc1 protobuf
6060
if "%DESIRED_PYTHON%" == "3.8" pip install -q numpy protobuf
6161

6262
if errorlevel 1 exit /b 1

0 commit comments

Comments
 (0)