From 597a9dc4f20cf2dab3369d2cc92c442222067259 Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 3 Apr 2024 10:45:24 -0700 Subject: [PATCH 1/5] Add numpy 2.0.0rc1 support to conda and wheels --- aarch64_linux/aarch64_ci_setup.sh | 2 +- manywheel/build_common.sh | 4 ++-- wheel/build_wheel.sh | 8 ++++---- windows/internal/smoke_test.bat | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/aarch64_linux/aarch64_ci_setup.sh b/aarch64_linux/aarch64_ci_setup.sh index f6f07a6f3..87ed70a72 100755 --- a/aarch64_linux/aarch64_ci_setup.sh +++ b/aarch64_linux/aarch64_ci_setup.sh @@ -28,7 +28,7 @@ conda activate "${CONDA_ENV_NAME}" if [[ "$DESIRED_PYTHON" == "3.8" ]]; then pip install -q numpy==1.24.4 else - pip install -q --pre numpy==2.0.0b1 + pip install -q --pre numpy==2.0.0rc1 fi 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 diff --git a/manywheel/build_common.sh b/manywheel/build_common.sh index bd825dc63..0fc23a0c5 100644 --- a/manywheel/build_common.sh +++ b/manywheel/build_common.sh @@ -115,11 +115,11 @@ case ${DESIRED_PYTHON} in retry pip install -q numpy==1.15 ;; cp31*) - retry pip install -q --pre numpy==2.0.0b1 + retry pip install -q --pre numpy==2.0.0rc1 ;; # Should catch 3.9+ *) - retry pip install -q --pre numpy==2.0.0b1 + retry pip install -q --pre numpy==2.0.0rc1 ;; esac diff --git a/wheel/build_wheel.sh b/wheel/build_wheel.sh index 200fdc714..6db812e7d 100755 --- a/wheel/build_wheel.sh +++ b/wheel/build_wheel.sh @@ -135,25 +135,25 @@ case $desired_python in echo "Using 3.12 deps" SETUPTOOLS_PINNED_VERSION=">=68.0.0" PYYAML_PINNED_VERSION=">=6.0.1" - NUMPY_PINNED_VERSION="=2.0.0b1" + NUMPY_PINNED_VERSION="=2.0.0rc1" ;; 3.11) echo "Using 3.11 deps" SETUPTOOLS_PINNED_VERSION=">=46.0.0" PYYAML_PINNED_VERSION=">=5.3" - NUMPY_PINNED_VERSION="=2.0.0b1" + NUMPY_PINNED_VERSION="=2.0.0rc1" ;; 3.10) echo "Using 3.10 deps" SETUPTOOLS_PINNED_VERSION=">=46.0.0" PYYAML_PINNED_VERSION=">=5.3" - NUMPY_PINNED_VERSION="=2.0.0b1" + NUMPY_PINNED_VERSION="=2.0.0rc1" ;; 3.9) echo "Using 3.9 deps" SETUPTOOLS_PINNED_VERSION=">=46.0.0" PYYAML_PINNED_VERSION=">=5.3" - NUMPY_PINNED_VERSION="=2.0.0b1" + NUMPY_PINNED_VERSION="=2.0.0rc1" ;; 3.8) echo "Using 3.8 deps" diff --git a/windows/internal/smoke_test.bat b/windows/internal/smoke_test.bat index 1a5b9e02c..d8a0516b1 100644 --- a/windows/internal/smoke_test.bat +++ b/windows/internal/smoke_test.bat @@ -53,10 +53,10 @@ if errorlevel 1 exit /b 1 set "PATH=%CD%\Python%PYTHON_VERSION%\Scripts;%CD%\Python;%PATH%" -if "%DESIRED_PYTHON%" == "3.12" pip install -q --pre numpy==2.0.0b1 protobuf -if "%DESIRED_PYTHON%" == "3.11" pip install -q --pre numpy==2.0.0b1 protobuf -if "%DESIRED_PYTHON%" == "3.10" pip install -q --pre numpy==2.0.0b1 protobuf -if "%DESIRED_PYTHON%" == "3.9" pip install -q --pre numpy==2.0.0b1 protobuf +if "%DESIRED_PYTHON%" == "3.12" pip install -q --pre numpy==2.0.0rc1 protobuf +if "%DESIRED_PYTHON%" == "3.11" pip install -q --pre numpy==2.0.0rc1 protobuf +if "%DESIRED_PYTHON%" == "3.10" pip install -q --pre numpy==2.0.0rc1 protobuf +if "%DESIRED_PYTHON%" == "3.9" pip install -q --pre numpy==2.0.0rc1 protobuf if "%DESIRED_PYTHON%" == "3.8" pip install -q numpy protobuf if errorlevel 1 exit /b 1 From eda92d934c24a1e36f38e996dbaa0e8635a11dc9 Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 3 Apr 2024 10:46:29 -0700 Subject: [PATCH 2/5] conda --- conda/pytorch-nightly/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda/pytorch-nightly/meta.yaml b/conda/pytorch-nightly/meta.yaml index 3da1625c4..8daa33280 100644 --- a/conda/pytorch-nightly/meta.yaml +++ b/conda/pytorch-nightly/meta.yaml @@ -30,6 +30,7 @@ requirements: - ninja - libuv # [win] - numpy=1.19 # [py <= 39] + - numpy=2.0.0rc1 # [py >= 39] - numpy=1.21.5 # [py == 310] - numpy=1.23.5 # [py == 311] - numpy=1.26.0 # [py >= 312] From dd210230b4c0717f8b94c0a9b63c78d9fe008ba0 Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 3 Apr 2024 10:47:01 -0700 Subject: [PATCH 3/5] conda --- conda/pytorch-nightly/meta.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/conda/pytorch-nightly/meta.yaml b/conda/pytorch-nightly/meta.yaml index 8daa33280..977ba187f 100644 --- a/conda/pytorch-nightly/meta.yaml +++ b/conda/pytorch-nightly/meta.yaml @@ -31,9 +31,6 @@ requirements: - libuv # [win] - numpy=1.19 # [py <= 39] - numpy=2.0.0rc1 # [py >= 39] - - numpy=1.21.5 # [py == 310] - - numpy=1.23.5 # [py == 311] - - numpy=1.26.0 # [py >= 312] - openssl=1.1.1l # [py >= 38 and py <= 310 and linux] - openssl=1.1.1s # [py == 311 and linux] - openssl=3.0.12 # [py >= 312 and linux] From 58faeb1cff76d060eda99be27ef689c865e00522 Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 3 Apr 2024 11:12:00 -0700 Subject: [PATCH 4/5] test --- conda/build_pytorch.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conda/build_pytorch.sh b/conda/build_pytorch.sh index 1cc09db85..b1d6c7859 100755 --- a/conda/build_pytorch.sh +++ b/conda/build_pytorch.sh @@ -85,7 +85,7 @@ if [ -z "$ANACONDA_TOKEN" ]; then fi if [[ -z "$ANACONDA_USER" ]]; then # This is the channel that finished packages will be uploaded to - ANACONDA_USER=soumith + ANACONDA_USER='pytorch' fi if [[ -z "$GITHUB_ORG" ]]; then GITHUB_ORG='pytorch' @@ -360,12 +360,13 @@ for py_ver in "${DESIRED_PYTHON[@]}"; do fi echo "Calling conda-build at $(date)" + # TODO: Remove "-c pytorch-nightly" once pytorch channel is updated with latest numpy time CMAKE_ARGS=${CMAKE_ARGS[@]} \ EXTRA_CAFFE2_CMAKE_FLAGS=${EXTRA_CAFFE2_CMAKE_FLAGS[@]} \ PYTORCH_GITHUB_ROOT_DIR="$pytorch_rootdir" \ PYTORCH_BUILD_STRING="$build_string" \ PYTORCH_MAGMA_CUDA_VERSION="$cuda_nodot" \ - conda build -c "$ANACONDA_USER" \ + conda build -c "$ANACONDA_USER" -c pytorch-nightly \ ${NO_TEST:-} \ --no-anaconda-upload \ --python "$py_ver" \ From 4501f8fa68d776a87cab93dd39500617a49c5ad1 Mon Sep 17 00:00:00 2001 From: atalman Date: Wed, 3 Apr 2024 12:44:08 -0700 Subject: [PATCH 5/5] fix --- conda/build_pytorch.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conda/build_pytorch.sh b/conda/build_pytorch.sh index b1d6c7859..a0bb03d8a 100755 --- a/conda/build_pytorch.sh +++ b/conda/build_pytorch.sh @@ -360,13 +360,14 @@ for py_ver in "${DESIRED_PYTHON[@]}"; do fi echo "Calling conda-build at $(date)" - # TODO: Remove "-c pytorch-nightly" once pytorch channel is updated with latest numpy + # TODO: Remove atalman channel once we can wend numpy from + # anaconda or pytorch or pytorch nightly channel time CMAKE_ARGS=${CMAKE_ARGS[@]} \ EXTRA_CAFFE2_CMAKE_FLAGS=${EXTRA_CAFFE2_CMAKE_FLAGS[@]} \ PYTORCH_GITHUB_ROOT_DIR="$pytorch_rootdir" \ PYTORCH_BUILD_STRING="$build_string" \ PYTORCH_MAGMA_CUDA_VERSION="$cuda_nodot" \ - conda build -c "$ANACONDA_USER" -c pytorch-nightly \ + conda build -c "$ANACONDA_USER" -c atalman \ ${NO_TEST:-} \ --no-anaconda-upload \ --python "$py_ver" \