Skip to content

Commit

Permalink
Update nightly wheel build numpy to 2.0 (pytorch#1747)
Browse files Browse the repository at this point in the history
* Update wheel build numpy to 2.0 (pytorch#1746)

* Update wheel build numpy to 2.0

* aarch64

* Update build_wheel.sh

* Simplify
  • Loading branch information
atalman committed Apr 4, 2024
1 parent b9122f1 commit 17c6661
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
6 changes: 3 additions & 3 deletions aarch64_linux/aarch64_ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ conda create -y -c conda-forge -n "${CONDA_ENV_NAME}" python=${DESIRED_PYTHON}
conda activate "${CONDA_ENV_NAME}"

if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
NUMPY_VERSION="1.24.4"
pip install -q numpy==1.24.4
else
NUMPY_VERSION="1.26.2"
pip install -q --pre numpy==2.0.0b1
fi
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
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

python --version
conda --version
12 changes: 3 additions & 9 deletions manywheel/build_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,12 @@ case ${DESIRED_PYTHON} in
cp38*)
retry pip install -q numpy==1.15
;;
cp310*)
retry pip install -q numpy==1.21.2
;;
cp311*)
retry pip install -q numpy==1.23.1
;;
cp312*)
retry pip install -q numpy==1.26.1
cp31*)
retry pip install -q --pre numpy==2.0.0b1
;;
# Should catch 3.9+
*)
retry pip install -q numpy==1.19.4
retry pip install -q --pre numpy==2.0.0b1
;;
esac

Expand Down
15 changes: 10 additions & 5 deletions wheel/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,25 +136,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="==1.26.0"
NUMPY_PINNED_VERSION="=2.0.0b1"
;;
3.11)
echo "Using 3.11 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="==1.23.5"
NUMPY_PINNED_VERSION="=2.0.0b1"
;;
3.10)
echo "Using 3.10 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="=1.21.2"
NUMPY_PINNED_VERSION="=2.0.0b1"
;;
3.9)
echo "Using 3.9 deps"
SETUPTOOLS_PINNED_VERSION=">=46.0.0"
PYYAML_PINNED_VERSION=">=5.3"
NUMPY_PINNED_VERSION="=1.19"
NUMPY_PINNED_VERSION="=2.0.0b1"
;;
3.8)
echo "Using 3.8 deps"
Expand All @@ -173,7 +173,12 @@ tmp_env_name="wheel_py$python_nodot"
conda create ${EXTRA_CONDA_INSTALL_FLAGS} -yn "$tmp_env_name" python="$desired_python"
source activate "$tmp_env_name"

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
if [[ $desired_python != "3.8" ]]; then
pip install -q --pre numpy=${NUMPY_PINNED_VERSION}
else
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq "numpy${NUMPY_PINNED_VERSION}"
fi
retry conda install ${EXTRA_CONDA_INSTALL_FLAGS} -yq nomkl cmake ninja "setuptools${SETUPTOOLS_PINNED_VERSION}" "pyyaml${PYYAML_PINNED_VERSION}" typing_extensions requests
retry pip install -qr "${pytorch_rootdir}/requirements.txt" || true

# For USE_DISTRIBUTED=1 on macOS, need libuv and pkg-config to find libuv.
Expand Down
8 changes: 7 additions & 1 deletion windows/internal/smoke_test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ if errorlevel 1 exit /b 1

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

pip install -q numpy protobuf

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.8" pip install -q numpy protobuf

if errorlevel 1 exit /b 1

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

0 comments on commit 17c6661

Please sign in to comment.