diff --git a/.github/scripts/validate_binaries.sh b/.github/scripts/validate_binaries.sh index 0c01dbca2..acdcef5e5 100755 --- a/.github/scripts/validate_binaries.sh +++ b/.github/scripts/validate_binaries.sh @@ -12,6 +12,13 @@ else TEST_SUFFIX=" --package torchonly" fi + # if RELESE version is passed as parameter - install speific version + if [[ ! -z ${RELEASE_VERSION} ]]; then + INSTALLATION=${INSTALLATION/"torch "/"torch==${RELEASE_VERSION} "} + INSTALLATION=${INSTALLATION/"-y pytorch "/"-y pytorch==${RELEASE_VERSION} "} + INSTALLATION=${INSTALLATION/"::pytorch "/"::pytorch==${RELEASE_VERSION} "} + fi + export OLD_PATH=${PATH} # Workaround macos-arm64 runners. Issue: https://github.com/pytorch/test-infra/issues/4342 if [[ ${TARGET_OS} == 'macos-arm64' ]]; then diff --git a/.github/scripts/validate_poetry.sh b/.github/scripts/validate_poetry.sh index e147aab8f..6b7fe2412 100644 --- a/.github/scripts/validate_poetry.sh +++ b/.github/scripts/validate_poetry.sh @@ -19,7 +19,6 @@ if [[ ! -z ${RELEASE_VERSION} ]]; then RELEASE_SUFFIX="@${RELEASE_VERSION}" fi - if [[ ${TORCH_ONLY} == 'true' ]]; then poetry --quiet add torch${RELEASE_SUFFIX} else diff --git a/aarch64_linux/aarch64_ci_setup.sh b/aarch64_linux/aarch64_ci_setup.sh index 6d2d780fe..f10e49b40 100755 --- a/aarch64_linux/aarch64_ci_setup.sh +++ b/aarch64_linux/aarch64_ci_setup.sh @@ -19,7 +19,17 @@ curl -L -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/late chmod +x /mambaforge.sh /mambaforge.sh -b -p /opt/conda rm /mambaforge.sh -/opt/conda/bin/conda config --set ssl_verify False -/opt/conda/bin/conda install -y -c conda-forge python=${DESIRED_PYTHON} numpy pyyaml setuptools patchelf pygit2 openblas ninja scons +source /opt/conda/etc/profile.d/conda.sh +conda config --set ssl_verify False +conda create -y -c conda-forge -n aarch64_env python=${DESIRED_PYTHON} +conda activate aarch64_env + +if [[ "$DESIRED_PYTHON" == "3.8" ]]; then + NUMPY_VERSION="1.24.4" +else + NUMPY_VERSION="1.26.0" +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.24 ninja==1.11.1 scons==4.5.2 + python --version conda --version diff --git a/build_m1_domains.sh b/build_m1_domains.sh deleted file mode 100755 index e574cb005..000000000 --- a/build_m1_domains.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/zsh -# Script used to build domain libraries wheels for M1 -source ~/miniconda3/etc/profile.d/conda.sh -set -ex -TORCH_VERSION=1.11.0 -TORCHVISION_VERSION=0.12.0 -TORCHAUDIO_VERSION=0.11.0 -TORCHTEXT_VERSION=0.12.0 - -for PYTHON_VERSION in 3.8 3.9 3.10; do - PY_VERSION=${PYTHON_VERSION/.} - conda create -yn whl-py${PY_VERSION}-torch-${TORCH_VERSION} python=${PYTHON_VERSION} numpy libpng openjpeg wheel pkg-config - conda activate whl-py${PY_VERSION}-torch-${TORCH_VERSION} - python3 -mpip install torch --extra-index-url=https://download.pytorch.org/whl/test torch==${TORCH_VERSION} - python3 -mpip install delocate - - pushd ~/git/pytorch/vision - git checkout release/${TORCHVISION_VERSION%.*} - rm -rf build - BUILD_VERSION=${TORCHVISION_VERSION} python3 setup.py bdist_wheel - WHL_NAME=torchvision-${TORCHVISION_VERSION}-cp${PY_VERSION}-cp${PY_VERSION}-macosx_11_0_arm64.whl - DYLD_FALLBACK_LIBRARY_PATH="$(dirname $(dirname $(which python)))/lib" delocate-wheel -v --ignore-missing-dependencies dist/${WHL_NAME} - python3 -mpip install dist/${WHL_NAME} - popd - - pushd ~/git/pytorch/audio - git checkout release/${TORCHAUDIO_VERSION%.*} - rm -rf build - BUILD_VERSION=${TORCHAUDIO_VERSION} python3 setup.py bdist_wheel - WHL_NAME=torchaudio-${TORCHAUDIO_VERSION}-cp${PY_VERSION}-cp${PY_VERSION}-macosx_11_0_arm64.whl - python3 -mpip install dist/${WHL_NAME} - popd - - pushd ~/git/pytorch/text - git checkout release/${TORCHTEXT_VERSION%.*} - rm -rf build - BUILD_VERSION=${TORCHTEXT_VERSION} python3 setup.py bdist_wheel - WHL_NAME=torchtext-${TORCHTEXT_VERSION}-cp${PY_VERSION}-cp${PY_VERSION}-macosx_11_0_arm64.whl - python3 -mpip install dist/${WHL_NAME} - popd - - python -c "import torch;import torchvision;print('Is torchvision useable?', all(x is not None for x in [torch.ops.image.decode_png, torch.ops.torchvision.roi_align]))" - python -c "import torch;import torchaudio;torchaudio.set_audio_backend('sox_io')" -done - diff --git a/conda/pytorch-nightly/meta.yaml b/conda/pytorch-nightly/meta.yaml index 4a03c3d05..882f13da0 100644 --- a/conda/pytorch-nightly/meta.yaml +++ b/conda/pytorch-nightly/meta.yaml @@ -21,7 +21,8 @@ requirements: - pyyaml {% if cross_compile_arm64 == 0 %} - mkl-include # [x86_64] - - mkl=2020.2 # [x86_64 and not win] + - mkl=2020.2 # [py <= 311 and x86_64 and not win] + - mkl=2023.1 # [py >= 312 and x86_64 and not win] - mkl=2021.4 # [x86_64 and win] {% endif %} - typing_extensions @@ -29,9 +30,11 @@ requirements: - libuv # [win] - numpy=1.19 # [py <= 39] - numpy=1.21.5 # [py == 310] - - numpy=1.23.5 # [py >= 311] + - numpy=1.23.5 # [py == 311] + - numpy=1.26.1 # [py >= 312] - openssl=1.1.1l # [py >= 38 and py <= 310 and linux] - - openssl=1.1.1s # [py >= 311 and linux] + - openssl=1.1.1s # [py == 311 and linux] + - openssl=3.1.4 # [py >= 312 and linux] {{ environ.get('PYTORCH_LLVM_PACKAGE', ' - llvmdev=9') }} {{ environ.get('MAGMA_PACKAGE', '') }} diff --git a/conda/upload.sh b/conda/upload.sh deleted file mode 100755 index 404ee77e7..000000000 --- a/conda/upload.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -ex - -# Upload linux conda packages (from inside the docker) -echo "Trying to upload conda packages from $HOST_PACKAGE_DIR" -if [[ -n "$HOST_PACKAGE_DIR" && -d "$HOST_PACKAGE_DIR" ]]; then - ls "$HOST_PACKAGE_DIR" | xargs -I {} anaconda upload "$HOST_PACKAGE_DIR"/{} -u pytorch --label main -else - echo "Couldn't find $HOST_PACKAGE_DIR" -fi - -# Upload linux conda packages (from outside the docker) -# This env variable should only be populated if this was called by cron/upload.sh -echo "Trying to upload conda packages from ${today}/conda_pkgs" -if [[ -n "$today" && -d "${today}/conda_pkgs" ]]; then - ls "${today}/conda_pkgs" | xargs -I {} anaconda upload "${today}/conda_pkgs"/{} -u pytorch --label main -else - echo "Couldn't find ${today}/conda_pkgs" -fi - -# Upload mac conda packages -echo "Trying to upload conda packages from $MAC_CONDA_FINAL_FOLDER" -if [[ -n "$MAC_CONDA_FINAL_FOLDER" && -d "$MAC_CONDA_FINAL_FOLDER" ]]; then - ls "$MAC_CONDA_FINAL_FOLDER" | xargs -I {} anaconda upload "$MAC_CONDA_FINAL_FOLDER"/{} -u pytorch --label main -else - echo "Couldn't find $MAC_CONDA_FINAL_FOLDER" -fi diff --git a/manywheel/build_common.sh b/manywheel/build_common.sh index f4794b719..31f188d94 100644 --- a/manywheel/build_common.sh +++ b/manywheel/build_common.sh @@ -131,6 +131,9 @@ case ${DESIRED_PYTHON} in cp311*) retry pip install -q numpy==1.23.1 ;; + cp312*) + retry pip install -q numpy==1.26.1 + ;; # Should catch 3.9+ *) retry pip install -q numpy==1.19.4 diff --git a/manywheel/build_cuda.sh b/manywheel/build_cuda.sh index c59cbca16..768f19cee 100644 --- a/manywheel/build_cuda.sh +++ b/manywheel/build_cuda.sh @@ -47,7 +47,7 @@ if [[ -n "$DESIRED_CUDA" ]]; then # There really has to be a better way to do this - eli # Possibly limiting builds to specific cuda versions be delimiting images would be a choice if [[ "$OS_NAME" == *"Ubuntu"* ]]; then - echo "Switching to CUDA version $desired_cuda" + echo "Switching to CUDA version ${DESIRED_CUDA}" /builder/conda/switch_cuda_version.sh "${DESIRED_CUDA}" fi else @@ -263,7 +263,9 @@ else fi # TODO: Remove me when Triton has a proper release channel -if [[ $(uname) == "Linux" ]]; then +# No triton dependency for now on 3.12 since we don't have binaries for it +# and torch.compile doesn't work. +if [[ $(uname) == "Linux" && "$DESIRED_PYTHON" != "3.12" ]]; then TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.github/ci_commit_pins/triton.txt) if [[ -z "$PYTORCH_EXTRA_INSTALL_REQUIREMENTS" ]]; then diff --git a/manywheel/build_libtorch.sh b/manywheel/build_libtorch.sh index 43a3334db..1dfbad031 100644 --- a/manywheel/build_libtorch.sh +++ b/manywheel/build_libtorch.sh @@ -343,7 +343,7 @@ for pkg in /$LIBTORCH_HOUSE_DIR/libtorch*.zip; do fi # zip up the wheel back - zip -rq $(basename $pkg) $PREIX* + zip -rq $(basename $pkg) $PREFIX* # replace original wheel rm -f $pkg diff --git a/manywheel/build_rocm.sh b/manywheel/build_rocm.sh index 0fed5970b..4fbca7697 100755 --- a/manywheel/build_rocm.sh +++ b/manywheel/build_rocm.sh @@ -222,7 +222,9 @@ if [[ $ROCM_INT -ge 50600 ]]; then fi # Add triton install dependency -if [[ $(uname) == "Linux" ]]; then +# No triton dependency for now on 3.12 since we don't have binaries for it +# and torch.compile doesn't work. +if [[ $(uname) == "Linux" && "$DESIRED_PYTHON" != "3.12" ]]; then TRITON_SHORTHASH=$(cut -c1-10 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-rocm.txt) TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_version.txt) diff --git a/manywheel/upload.sh b/manywheel/upload.sh deleted file mode 100755 index a0c7b5b85..000000000 --- a/manywheel/upload.sh +++ /dev/null @@ -1,44 +0,0 @@ -set -ex - -# PIP_UPLOAD_FOLDER should end in a slash. This is to handle it being empty -# (when uploading to e.g. whl/cpu/) and also to handle nightlies (when -# uploading to e.g. /whl/nightly/cpu) - -if [[ -z "$PACKAGE_ROOT_DIR" ]]; then - PACKAGE_ROOT_DIR="$(pwd)" -fi - -# Upload for all CUDA/cpu versions if not given one to use -if [[ -z "$CUDA_VERSIONS" ]]; then - CUDA_VERSIONS=('cpu' 'cu90' 'cu100' 'cu101') -fi - -# Make sure the user specifically refers to an upload folder -if [[ -z "$PIP_UPLOAD_FOLDER" ]]; then - echo 'The upload folder is not set. We refuse to upload.' - echo 'Please set PIP_UPLOAD_FOLDER' - exit 1 -fi - -for cuda_ver in "${CUDA_VERSIONS[@]}"; do - s3_wheel_dir="s3://pytorch/whl/${PIP_UPLOAD_FOLDER}${cuda_ver}/" - s3_libtorch_dir="s3://pytorch/libtorch/${PIP_UPLOAD_FOLDER}${cuda_ver}/" - if [[ "$cuda_ver" == cpu ]]; then - wheel_dir="${PACKAGE_ROOT_DIR}/wheelhousecpu/" - libtorch_dir="${PACKAGE_ROOT_DIR}/libtorch_housecpu/" - else - wheel_dir="${PACKAGE_ROOT_DIR}/wheelhouse${cuda_ver:2:2}/" - libtorch_dir="${PACKAGE_ROOT_DIR}/libtorch_house${cuda_ver:2:2}/" - fi - - # Upload the wheels to s3 - if [[ -d "$wheel_dir" ]]; then - echo "Uploading all of: $(ls $wheel_dir) to $s3_wheel_dir" - ls "$wheel_dir" | xargs -I {} aws s3 cp "$wheel_dir"/{} "$s3_wheel_dir" --acl public-read - fi - - if [[ -d "$libtorch_dir" ]]; then - echo "Uploading all of: $(ls $libtorch_dir) to $s3_libtorch_dir" - ls "$libtorch_dir" | xargs -I {} aws s3 cp "$libtorch_dir"/{} "$s3_libtorch_dir" --acl public-read - fi -done diff --git a/release/pypi/promote_pypi_to_production.sh b/release/pypi/promote_pypi_to_production.sh index b517cbedb..a14fbb637 100644 --- a/release/pypi/promote_pypi_to_production.sh +++ b/release/pypi/promote_pypi_to_production.sh @@ -34,3 +34,4 @@ promote_staging_binaries torch "${PYTORCH_VERSION}" promote_staging_binaries torchvision "${TORCHVISION_VERSION}" promote_staging_binaries torchaudio "${TORCHAUDIO_VERSION}" promote_staging_binaries torchtext "${TORCHTEXT_VERSION}" +promote_staging_binaries torchdata "${TORCHDATA_VERSION}" diff --git a/release/pypi/promote_pypi_to_staging.sh b/release/pypi/promote_pypi_to_staging.sh index a9dbe535b..46cd958cd 100644 --- a/release/pypi/promote_pypi_to_staging.sh +++ b/release/pypi/promote_pypi_to_staging.sh @@ -23,26 +23,34 @@ upload_pypi_to_staging() { # Uncomment these to promote to pypi PYTORCH_LINUX_VERSION_SUFFIX="%2Bcu121.with.pypi.cudnn" LINUX_VERSION_SUFFIX="%2Bcu121" -WIN_VERSION_SUFFIX="%2Bcpu" +CPU_VERSION_SUFFIX="%2Bcpu" MACOS_X86_64="macosx_.*_x86_64" MACOS_ARM64="macosx_.*_arm64" PLATFORM="linux_x86_64" VERSION_SUFFIX="${PYTORCH_LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}" PLATFORM="manylinux2014_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" -PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}" +PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torch "${PYTORCH_VERSION}" PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # intel mac PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torch "${PYTORCH_VERSION}" # m1 mac PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}" PLATFORM="linux_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}" -PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}" +PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}" PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}" PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchvision "${TORCHVISION_VERSION}" PLATFORM="linux_x86_64" VERSION_SUFFIX="${LINUX_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}" PLATFORM="linux_aarch64" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}" -PLATFORM="win_amd64" VERSION_SUFFIX="${WIN_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}" +PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}" PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}" PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchaudio "${TORCHAUDIO_VERSION}" -upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}" +PLATFORM="linux_x86" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}" +PLATFORM="win_amd64" VERSION_SUFFIX="${CPU_VERSION_SUFFIX}" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}" +PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}" +PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchtext "${TORCHTEXT_VERSION}" + +PLATFORM="manylinux2014_x86_64" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}" +PLATFORM="win_amd64" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}" +PLATFORM="${MACOS_X86_64}" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}" +PLATFORM="${MACOS_ARM64}" VERSION_SUFFIX="" upload_pypi_to_staging torchdata "${TORCHDATA_VERSION}" diff --git a/release/pypi/upload_pypi_to_staging.sh b/release/pypi/upload_pypi_to_staging.sh index 250b231f9..b1a7ddf6d 100644 --- a/release/pypi/upload_pypi_to_staging.sh +++ b/release/pypi/upload_pypi_to_staging.sh @@ -43,7 +43,7 @@ fi for pkg in ${pkgs_to_promote}; do pkg_basename="$(basename "${pkg}")" - if [[ "${pkg}" != *aarch64* ]]; then + if [[ "${pkg}" != *aarch64* && "${pkg}" != *torchdata* ]]; then # sub out linux for manylinux1 pkg_basename="$(basename "${pkg//linux/manylinux1}")" elif [[ "${pkg}" == *manylinux_2_17_aarch64* ]]; then diff --git a/test/smoke_test/smoke_test.py b/test/smoke_test/smoke_test.py index 4cb7bac9b..a4cd6dff2 100644 --- a/test/smoke_test/smoke_test.py +++ b/test/smoke_test/smoke_test.py @@ -90,10 +90,12 @@ def check_version(package: str) -> None: module_version = imported_module.__version__ if not module_version.startswith(release_matrix[module["name"]]): raise RuntimeError( - f"{module['name']} version mismatch, expected {release_matrix[module['name']]} for channel {channel}. But its {module_version}" + f"{module['name']} version mismatch, expected: \ + {release_matrix[module['name']]} for channel {channel}. But its {module_version}" ) else: - print(f"{module['name']} version actual: {module_version} expected: {release_matrix[module['name']]} for channel {channel}.") + print(f"{module['name']} version actual: {module_version} expected: \ + {release_matrix[module['name']]} for channel {channel}.") else: print(f"Skip version check for channel {channel} as stable version is None") diff --git a/wheel/build_wheel.sh b/wheel/build_wheel.sh index c3c45cf42..1186bc56a 100755 --- a/wheel/build_wheel.sh +++ b/wheel/build_wheel.sh @@ -136,23 +136,33 @@ export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} SETUPTOOLS_PINNED_VERSION="=46.0.0" PYYAML_PINNED_VERSION="=5.3" EXTRA_CONDA_INSTALL_FLAGS="" -case ${desired_python} in +case $desired_python in + 3.12) + echo "Using 3.12 deps" + SETUPTOOLS_PINNED_VERSION=">=68.0.0" + PYYAML_PINNED_VERSION=">=6.0.1" + NUMPY_PINNED_VERSION="==1.26.0" + ;; 3.11) + echo "Using 3.11 deps" SETUPTOOLS_PINNED_VERSION=">=46.0.0" PYYAML_PINNED_VERSION=">=5.3" NUMPY_PINNED_VERSION="==1.23.5" ;; 3.10) + echo "Using 3.10 deps" SETUPTOOLS_PINNED_VERSION=">=46.0.0" PYYAML_PINNED_VERSION=">=5.3" NUMPY_PINNED_VERSION="=1.21.2" ;; 3.9) + echo "Using 3.9 deps" SETUPTOOLS_PINNED_VERSION=">=46.0.0" PYYAML_PINNED_VERSION=">=5.3" NUMPY_PINNED_VERSION="=1.19" ;; 3.8) + echo "Using 3.8 deps" if [[ "$(uname -m)" == "arm64" ]]; then SETUPTOOLS_PINNED_VERSION=">=46.0.0" PYYAML_PINNED_VERSION=">=5.3" @@ -162,6 +172,7 @@ case ${desired_python} in fi ;; *) + echo "Using default deps" NUMPY_PINNED_VERSION="=1.11.3" ;; esac diff --git a/windows/build_all.bat b/windows/build_all.bat deleted file mode 100755 index f60da8c76..000000000 --- a/windows/build_all.bat +++ /dev/null @@ -1,104 +0,0 @@ -@echo off - -if "%~1"=="" goto arg_error -if "%~2"=="" goto arg_error -if NOT "%~3"=="" goto arg_error -goto arg_end - -:arg_error - -echo Illegal number of parameters. Pass pytorch version, build number -exit /b 1 - -:arg_end - -set PYTORCH_BUILD_VERSION=%~1 -set PYTORCH_BUILD_NUMBER=%~2 - -REM Install Miniconda3 -set "CONDA_HOME=%CD%\conda" -set "tmp_conda=%CONDA_HOME%" -set "miniconda_exe=%CD%\miniconda.exe" -rmdir /s /q conda -del miniconda.exe -curl -k https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe -o "%miniconda_exe%" -call ..\conda\install_conda.bat - -set "PATH=%CONDA_HOME%;%CONDA_HOME%\scripts;%CONDA_HOME%\Library\bin;%PATH%" -set "ORIG_PATH=%PATH%" - -conda remove -n py36 --all -y || rmdir %CONDA_HOME%\envs\py36 /s -conda remove -n py37 --all -y || rmdir %CONDA_HOME%\envs\py37 /s - -conda create -n py36 -y -q numpy=1.11 mkl=2018 pyyaml boto3 cmake ninja typing_extensions python=3.6 -conda create -n py37 -y -q numpy=1.11 mkl=2018 pyyaml boto3 cmake ninja typing_extensions python=3.7 - -REM Install MKL -rmdir /s /q mkl -del mkl_2018.2.185.7z -curl https://s3.amazonaws.com/ossci-windows/mkl_2018.2.185.7z -k -O -7z x -aoa mkl_2018.2.185.7z -omkl -set CMAKE_INCLUDE_PATH=%cd%\\mkl\\include -set LIB=%cd%\\mkl\\lib;%LIB% - -REM Download MAGMA Files -for %%p in ( - cuda80 - cuda90 - cuda92 - ) do ( - rmdir /s /q magma_%%p_release - del magma_%%p_release.7z - curl -k https://s3.amazonaws.com/ossci-windows/magma_%%p_release_mkl_2018.2.185.7z -o magma_%%p_release.7z - 7z x -aoa magma_%%p_release.7z -omagma_%%p_release - ) - -REM Install sccache -mkdir %CD%\\tmp_bin -curl -k https://s3.amazonaws.com/ossci-windows/sccache.exe --output %CD%\\tmp_bin\\sccache.exe -copy %CD%\\tmp_bin\\sccache.exe %CD%\\tmp_bin\\nvcc.exe - -set CUDA_NVCC_EXECUTABLE=%CD%\\tmp_bin\\nvcc -set "PATH=%CD%\\tmp_bin;%PATH%" - -set PYTORCH_BINARY_BUILD=1 -set TH_BINARY_BUILD=1 - -@setlocal EnableDelayedExpansion -for %%v in ( - py35 - py36 - py37 - ) do ( - REM Activate Python Environment - set "CONDA_LIB_PATH=%CONDA_HOME%\envs\%%v\Library\bin" - set "PATH=%CONDA_HOME%\envs\%%v;%CONDA_HOME%\envs\%%v\scripts;%CONDA_HOME%\envs\%%v\Library\bin;%ORIG_PATH%" - pip install ninja - for %%c in ( - cpu - 80 - 90 - 92 - ) do ( - @setlocal - - REM Set Flags - if NOT "%%c"=="cpu" ( - if NOT "%%c"=="92" ( - set MAGMA_HOME=%cd%\\magma_!CUDA_PREFIX!_release - ) else ( - set MAGMA_HOME=%cd%\\magma_!CUDA_PREFIX!_release\magma_cuda92\magma\install - ) - set CUDA_VERSION=%%c - set CUDA_PREFIX=cuda!CUDA_VERSION! - ) else ( - set CUDA_PREFIX=cpu - ) - call !CUDA_PREFIX!.bat - @endlocal - ) - ) - -@endlocal - -set "PATH=%ORIG_PATH%" diff --git a/windows/build_pytorch.bat b/windows/build_pytorch.bat index 635138735..37e19f933 100644 --- a/windows/build_pytorch.bat +++ b/windows/build_pytorch.bat @@ -44,7 +44,7 @@ set "tmp_conda=%CONDA_HOME%" set "miniconda_exe=%CD%\miniconda.exe" rmdir /s /q conda del miniconda.exe -curl --retry 3 -k https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -o "%miniconda_exe%" +curl --retry 3 -k https://repo.anaconda.com/miniconda/Miniconda3-py311_23.9.0-0-Windows-x86_64.exe -o "%miniconda_exe%" call ..\conda\install_conda.bat if ERRORLEVEL 1 exit /b 1 set "ORIG_PATH=%PATH%" @@ -74,8 +74,6 @@ set LIB=%cd%\mkl\lib;%LIB% :: Download MAGMA Files on CUDA builds set MAGMA_VERSION=2.5.4 -if "%CUDA_VERSION%" == "92" set MAGMA_VERSION=2.5.2 -if "%CUDA_VERSION%" == "100" set MAGMA_VERSION=2.5.2 if "%DEBUG%" == "1" ( set BUILD_TYPE=debug diff --git a/windows/condaenv.bat b/windows/condaenv.bat index 464eeb01c..cf1b2c865 100644 --- a/windows/condaenv.bat +++ b/windows/condaenv.bat @@ -14,6 +14,7 @@ FOR %%v IN (%DESIRED_PYTHON%) DO ( 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 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 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 + 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 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 ) endlocal diff --git a/windows/internal/smoke_test.bat b/windows/internal/smoke_test.bat index ad276b992..1ade2cbda 100644 --- a/windows/internal/smoke_test.bat +++ b/windows/internal/smoke_test.bat @@ -30,6 +30,7 @@ exit /b 1 echo "install wheel package" set PYTHON_INSTALLER_URL= +if "%DESIRED_PYTHON%" == "3.12" set "PYTHON_INSTALLER_URL=https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe" if "%DESIRED_PYTHON%" == "3.11" set "PYTHON_INSTALLER_URL=https://www.python.org/ftp/python/3.11.0/python-3.11.0-amd64.exe" if "%DESIRED_PYTHON%" == "3.10" set "PYTHON_INSTALLER_URL=https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe" if "%DESIRED_PYTHON%" == "3.9" set "PYTHON_INSTALLER_URL=https://www.python.org/ftp/python/3.9.0/python-3.9.0-amd64.exe"