From 97abda2da09f70ce4b7d87287809ab0d183b635f Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Tue, 14 Nov 2023 19:25:56 -0500 Subject: [PATCH] Release pypi prep change (#1587) * [aarch64] Release pypi prep script change for aarch64 builds * Release versions for testing Testing calling version (#1588) Upstream/release validations (#1589) * Testing calling version * add release matrix Upstream/release validations (#1590) * Testing calling version * add release matrix * test test (#1591) test (#1592) Release v1 (#1595) * test * test Release v1 (#1596) * test * test * test test (#1597) Test versions validations (#1598) * test * basedir Test versions validations (#1599) * test * basedir * test test (#1600) * test * test Add release versions everywhere (#1601) * test * test * test * test test (#1602) Test version validations (#1603) * test * test Test version validations (#1604) * test * test * test tests (#1605) More tests nov16 (#1606) * tests * test More tests nov16 (#1607) * tests * test * test More tests nov16 (#1608) * tests * test * test * test More tests nov16 (#1609) * tests * test * test * test * test test poetry_fix test test Changes needed for core enablement of 3.12 binary wheels (#1586) Fix aarch64 build on 3.8 (#1593) Add some more validation checks for torch.linalg.eigh and torch.compile (#1580) * Add some more validation checks for torch.linalg.eigh and torch.compile * Update test * Also update smoke_test.py * Fix lint Revert "Add some more validation checks for torch.linalg.eigh and torch.compile (#1580)" (#1594) This reverts commit 4c7fa069848aa32a24e47cae0e5996bc0eeeb70a. Release validations using release version matrix (#1611) * Release pypi prep change (#1587) * [aarch64] Release pypi prep script change for aarch64 builds * Release versions for testing Testing calling version (#1588) Upstream/release validations (#1589) * Testing calling version * add release matrix Upstream/release validations (#1590) * Testing calling version * add release matrix * test test (#1591) test (#1592) Release v1 (#1595) * test * test Release v1 (#1596) * test * test * test test (#1597) Test versions validations (#1598) * test * basedir Test versions validations (#1599) * test * basedir * test test (#1600) * test * test Add release versions everywhere (#1601) * test * test * test * test test (#1602) Test version validations (#1603) * test * test Test version validations (#1604) * test * test * test tests (#1605) More tests nov16 (#1606) * tests * test More tests nov16 (#1607) * tests * test * test More tests nov16 (#1608) * tests * test * test * test More tests nov16 (#1609) * tests * test * test * test * test * fix_lint fix: typo (#1581) desired_cuda -> DESIRED_CUDA (#1612) * desired_cuda -> DESIRED_CUDA Found with shellcheck * Update manywheel/build_cuda.sh Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com> --------- Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com> [BE] Cleanup build unused code (#1613) 1. Upload Scripts are not used anymore. We use Github Action upload workflows 2. M1 Builds are now automated 3. build_all.bat run git grep in pytorch and builder - No result Changes to pypi release promotion scripts introduced for 2.1.0 and 2.1.1 (#1614) * Changes topypi release promotion scripts introduced during 2.1.1 * typo Pin miniconda version for Windows To Miniconda3-py311_23.9.0-0-Windows-x86_64.exe --- .github/scripts/validate_pipy.sh | 12 +- .github/scripts/validate_poetry.sh | 26 ++--- .../validate-aarch64-linux-binaries.yml | 23 +++- .github/workflows/validate-binaries.yml | 27 ++++- .github/workflows/validate-linux-binaries.yml | 23 ++++ .../validate-macos-arm64-binaries.yml | 22 ++++ .github/workflows/validate-macos-binaries.yml | 22 ++++ .../workflows/validate-windows-binaries.yml | 24 +++- aarch64_linux/aarch64_ci_setup.sh | 14 ++- build_m1_domains.sh | 45 -------- conda/pytorch-nightly/meta.yaml | 9 +- conda/upload.sh | 28 ----- manywheel/build_common.sh | 3 + manywheel/build_cuda.sh | 6 +- manywheel/build_libtorch.sh | 2 +- manywheel/build_rocm.sh | 4 +- manywheel/upload.sh | 44 -------- release/pypi/promote_pypi_to_production.sh | 1 + release/pypi/promote_pypi_to_staging.sh | 18 ++- release/pypi/upload_pypi_to_staging.sh | 2 +- test/smoke_test/smoke_test.py | 38 ++++++- wheel/build_wheel.sh | 13 ++- windows/build_all.bat | 104 ------------------ windows/build_pytorch.bat | 4 +- windows/condaenv.bat | 1 + windows/internal/smoke_test.bat | 1 + 26 files changed, 251 insertions(+), 265 deletions(-) delete mode 100755 build_m1_domains.sh delete mode 100755 conda/upload.sh delete mode 100755 manywheel/upload.sh delete mode 100755 windows/build_all.bat diff --git a/.github/scripts/validate_pipy.sh b/.github/scripts/validate_pipy.sh index ed7915079..d7a930899 100644 --- a/.github/scripts/validate_pipy.sh +++ b/.github/scripts/validate_pipy.sh @@ -2,15 +2,21 @@ conda create -yn ${ENV_NAME}_pypi python=${MATRIX_PYTHON_VERSION} numpy ffmpeg conda activate ${ENV_NAME}_pypi TEST_SUFFIX="" +RELEASE_SUFFIX="" +# if RELESE version is passed as parameter - install speific version +if [[ ! -z ${RELEASE_VERSION} ]]; then + RELEASE_SUFFIX="==${RELEASE_VERSION}" +fi + if [[ ${TORCH_ONLY} == 'true' ]]; then TEST_SUFFIX=" --package torchonly" - pip3 install --pre torch --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" + pip3 install --pre torch${RELEASE_SUFFIX} --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" else if [[ ${MATRIX_CHANNEL} != "release" ]]; then - pip3 install --pre torch --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" + pip3 install --pre torch${RELEASE_SUFFIX} --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" pip3 install --pre torchvision torchaudio --extra-index-url "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}" else - pip3 install torch torchvision torchaudio + pip3 install torch${RELEASE_SUFFIX} torchvision torchaudio fi fi diff --git a/.github/scripts/validate_poetry.sh b/.github/scripts/validate_poetry.sh index 3c41d5b45..e147aab8f 100644 --- a/.github/scripts/validate_poetry.sh +++ b/.github/scripts/validate_poetry.sh @@ -13,25 +13,17 @@ if [[ ${TORCH_ONLY} == 'true' ]]; then TEST_SUFFIX=" --package torchonly" fi -if [[ ${MATRIX_CHANNEL} != "release" ]]; then - # Installing poetry from our custom repo. We need to configure it before use and disable authentication - export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring - poetry source add --priority=explicit domains "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}" - poetry source add --priority=supplemental pytorch-channel "https://download.pytorch.org/whl/${MATRIX_CHANNEL}" - poetry source add --priority=supplemental pytorch "https://download.pytorch.org/whl/${MATRIX_CHANNEL}/${MATRIX_DESIRED_CUDA}_pypi_cudnn" - poetry --quiet add --source pytorch torch +RELEASE_SUFFIX="" +# if RELESE version is passed as parameter - install speific version +if [[ ! -z ${RELEASE_VERSION} ]]; then + RELEASE_SUFFIX="@${RELEASE_VERSION}" +fi + - if [[ ${TORCH_ONLY} != 'true' ]]; then - poetry --quiet add --source domains torchvision torchaudio - fi +if [[ ${TORCH_ONLY} == 'true' ]]; then + poetry --quiet add torch${RELEASE_SUFFIX} else - export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring - poetry source add --priority=explicit pytorch "https://download.pytorch.org/whl/${MATRIX_DESIRED_CUDA}" - if [[ ${TORCH_ONLY} == 'true' ]]; then - poetry --quiet add torch - else - poetry --quiet add --source pytorch torch torchaudio torchvision - fi + poetry --quiet add torch${RELEASE_SUFFIX} torchaudio torchvision fi python ../test/smoke_test/smoke_test.py ${TEST_SUFFIX} --runtime-error-check disabled diff --git a/.github/workflows/validate-aarch64-linux-binaries.yml b/.github/workflows/validate-aarch64-linux-binaries.yml index d3e57fd5c..14b7b6395 100644 --- a/.github/workflows/validate-aarch64-linux-binaries.yml +++ b/.github/workflows/validate-aarch64-linux-binaries.yml @@ -17,6 +17,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string workflow_dispatch: inputs: channel: @@ -38,6 +48,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string jobs: generate-aarch64-linux-matrix: @@ -47,7 +67,6 @@ jobs: os: linux-aarch64 channel: ${{ inputs.channel }} with-cuda: disable - linux-aarch64: needs: generate-aarch64-linux-matrix strategy: @@ -72,6 +91,8 @@ jobs: export ENV_NAME="conda-env-${{ github.run_id }}" export TARGET_OS="linux-aarch64" export TORCH_ONLY=${{ inputs.torchonly }} + export RELEASE_VERSION=${{ inputs.version }} + printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json eval "$(conda shell.bash hook)" # Standart case: Validate binaries diff --git a/.github/workflows/validate-binaries.yml b/.github/workflows/validate-binaries.yml index 9c877f4ed..fee16dca9 100644 --- a/.github/workflows/validate-binaries.yml +++ b/.github/workflows/validate-binaries.yml @@ -60,44 +60,69 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate' + default: "" + required: false + type: string + jobs: + generate-release-matrix: + uses: pytorch/test-infra/.github/workflows/generate_release_matrix.yml@main + with: + version: ${{ inputs.version }} + win: if: inputs.os == 'windows' || inputs.os == 'all' + needs: generate-release-matrix uses: ./.github/workflows/validate-windows-binaries.yml with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} torchonly: ${{ inputs.torchonly }} + version: ${{ inputs.version }} + release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }} linux: if: inputs.os == 'linux' || inputs.os == 'all' + needs: generate-release-matrix uses: ./.github/workflows/validate-linux-binaries.yml with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} torchonly: ${{ inputs.torchonly }} + version: ${{ inputs.version }} + release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }} linux-aarch64: if: inputs.os == 'linux-aarch64' + needs: generate-release-matrix uses: ./.github/workflows/validate-aarch64-linux-binaries.yml with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} torchonly: ${{ inputs.torchonly }} - + version: ${{ inputs.version }} + release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }} mac: if: inputs.os == 'macos' || inputs.os == 'all' + needs: generate-release-matrix uses: ./.github/workflows/validate-macos-binaries.yml with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} torchonly: ${{ inputs.torchonly }} + version: ${{ inputs.version }} + release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }} mac-arm64: if: inputs.os == 'macos' || inputs.os == 'all' + needs: generate-release-matrix uses: ./.github/workflows/validate-macos-arm64-binaries.yml with: channel: ${{ inputs.channel }} ref: ${{ inputs.ref || github.ref }} torchonly: ${{ inputs.torchonly }} + version: ${{ inputs.version }} + release-matrix: ${{ needs.generate-release-matrix.outputs.matrix }} diff --git a/.github/workflows/validate-linux-binaries.yml b/.github/workflows/validate-linux-binaries.yml index 3c5aac2eb..dcbfc93a0 100644 --- a/.github/workflows/validate-linux-binaries.yml +++ b/.github/workflows/validate-linux-binaries.yml @@ -17,6 +17,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string workflow_dispatch: inputs: channel: @@ -38,6 +48,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string jobs: generate-linux-matrix: @@ -64,8 +84,11 @@ jobs: set -ex export ENV_NAME="conda-env-${{ github.run_id }}" export TORCH_ONLY=${{ inputs.torchonly }} + export RELEASE_VERSION=${{ inputs.version }} export TARGET_OS="linux" eval "$(conda shell.bash hook)" + printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json + cat release_matrix.json # Special case PyPi installation package. And Install of PyPi package via poetry if [[ ${MATRIX_PACKAGE_TYPE} == "manywheel" && ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then diff --git a/.github/workflows/validate-macos-arm64-binaries.yml b/.github/workflows/validate-macos-arm64-binaries.yml index f23dec3f6..541183b9a 100644 --- a/.github/workflows/validate-macos-arm64-binaries.yml +++ b/.github/workflows/validate-macos-arm64-binaries.yml @@ -17,6 +17,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string workflow_dispatch: inputs: channel: @@ -38,6 +48,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string jobs: generate-macos-arm64-matrix: @@ -64,4 +84,6 @@ jobs: export ENV_NAME="conda-env-${{ github.run_id }}" export TARGET_OS="macos-arm64" export TORCH_ONLY=${{ inputs.torchonly }} + export RELEASE_VERSION=${{ inputs.version }} + printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json source ./.github/scripts/validate_binaries.sh diff --git a/.github/workflows/validate-macos-binaries.yml b/.github/workflows/validate-macos-binaries.yml index 0926dbe93..9610b36f7 100644 --- a/.github/workflows/validate-macos-binaries.yml +++ b/.github/workflows/validate-macos-binaries.yml @@ -17,6 +17,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string workflow_dispatch: inputs: channel: @@ -38,6 +48,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string jobs: generate-macos-matrix: @@ -64,4 +84,6 @@ jobs: export ENV_NAME="conda-env-${{ github.run_id }}" export TARGET_OS="macos" export TORCH_ONLY=${{ inputs.torchonly }} + export RELEASE_VERSION=${{ inputs.version }} + printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json source ./.github/scripts/validate_binaries.sh diff --git a/.github/workflows/validate-windows-binaries.yml b/.github/workflows/validate-windows-binaries.yml index 96d2b281e..1c501cfb3 100644 --- a/.github/workflows/validate-windows-binaries.yml +++ b/.github/workflows/validate-windows-binaries.yml @@ -17,6 +17,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string workflow_dispatch: inputs: channel: @@ -38,6 +48,16 @@ on: default: false required: false type: boolean + version: + description: 'Version to validate - optional' + default: "" + required: false + type: string + release-matrix: + description: 'Release matrix - optional' + default: "" + required: false + type: string jobs: generate-windows-matrix: @@ -46,7 +66,6 @@ jobs: package-type: all os: windows channel: ${{ inputs.channel }} - win: needs: generate-windows-matrix strategy: @@ -66,9 +85,10 @@ jobs: export ENV_NAME="conda-env-${{ github.run_id }}" export TARGET_OS="windows" export TORCH_ONLY=${{ inputs.torchonly }} + export RELEASE_VERSION=${{ inputs.version }} + printf '%s\n' ${{ toJson(inputs.release-matrix) }} > release_matrix.json source /c/Jenkins/Miniconda3/etc/profile.d/conda.sh if [[ ${MATRIX_GPU_ARCH_VERSION} == "12.1" ]]; then ./windows/internal/driver_update.bat fi - source ./.github/scripts/validate_binaries.sh 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 3d1b6af64..a4cd6dff2 100644 --- a/test/smoke_test/smoke_test.py +++ b/test/smoke_test/smoke_test.py @@ -3,18 +3,20 @@ import sys import argparse import torch +import json import importlib import subprocess import torch._dynamo import torch.nn as nn import torch.nn.functional as F +from pathlib import Path gpu_arch_ver = os.getenv("MATRIX_GPU_ARCH_VERSION") gpu_arch_type = os.getenv("MATRIX_GPU_ARCH_TYPE") channel = os.getenv("MATRIX_CHANNEL") -stable_version = os.getenv("MATRIX_STABLE_VERSION") package_type = os.getenv("MATRIX_PACKAGE_TYPE") target_os = os.getenv("TARGET_OS") +BASE_DIR = Path(__file__).parent.parent.parent is_cuda_system = gpu_arch_type == "cuda" NIGHTLY_ALLOWED_DELTA = 3 @@ -52,8 +54,27 @@ def forward(self, x): output = self.fc1(x) return output +def load_json_from_basedir(filename: str): + try: + with open(BASE_DIR / filename) as fptr: + return json.load(fptr) + except FileNotFoundError as exc: + raise ImportError(f"File {filename} not found error: {exc.strerror}") from exc + except json.JSONDecodeError as exc: + raise ImportError(f"Invalid JSON {filename}") from exc + +def read_release_matrix(): + return load_json_from_basedir("release_matrix.json") def check_version(package: str) -> None: + release_version = os.getenv("RELEASE_VERSION") + # if release_version is specified, use it to validate the packages + if(release_version): + release_matrix = read_release_matrix() + stable_version = release_matrix["torch"] + else: + stable_version = os.getenv("MATRIX_STABLE_VERSION") + # only makes sense to check nightly package where dates are known if channel == "nightly": check_nightly_binaries_date(package) @@ -62,6 +83,20 @@ def check_version(package: str) -> None: raise RuntimeError( f"Torch version mismatch, expected {stable_version} for channel {channel}. But its {torch.__version__}" ) + + if release_version and package == "all": + for module in MODULES: + imported_module = importlib.import_module(module["name"]) + 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}" + ) + else: + 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") @@ -255,6 +290,7 @@ def main() -> None: ) options = parser.parse_args() print(f"torch: {torch.__version__}") + check_version(options.package) smoke_test_conv2d() smoke_test_linalg() 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"