Skip to content

Commit

Permalink
Produce releases for Python 3.13. (#18799)
Browse files Browse the repository at this point in the history
Progress on #18652. This builds
release packages for:

| | 3.13 | 3.13t |
| -- | -- | -- |
| Linux | Yes | Yes |
| macOS | Yes | No |
| Windows | Yes | No |

Actually using the free-threading features in Python 3.13t may need
changes like #18770.

Tested at https://github.com/iree-org/iree/actions/runs/11371528748
(Windows build will be fixed with a more recent commit and a few
patches). Assets were uploaded to
https://github.com/iree-org/iree/releases/tag/candidate-20241016.21.
  • Loading branch information
ScottTodd authored Oct 16, 2024
1 parent 65385bd commit c7213de
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 15 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

env:
# These are also set in: build_tools/python_deploy/build_linux_packages.sh
MANYLINUX_X86_64_IMAGE: ghcr.io/iree-org/manylinux_x86_64@sha256:facedb71df670016e74e646d71e869e6fff70d4cdbaa6634d4d0a10d6e174399
MANYLINUX_X86_64_IMAGE: ghcr.io/iree-org/manylinux_x86_64@sha256:2e0246137819cf10ed84240a971f9dd75cc3eb62dc6907dfd2080ee966b3c9f4
MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64

steps:
Expand All @@ -119,6 +119,9 @@ jobs:
- name: "Configure MSVC (Windows)"
if: "matrix.build-family == 'windows'"
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Install dependencies (macOS)
if: "matrix.build-family == 'macos'"
run: sudo ./c/build_tools/python_deploy/install_macos_deps.sh

##########################################################################
# Write version_info.json
Expand Down Expand Up @@ -206,7 +209,7 @@ jobs:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11 3.12"
override_python_versions: "3.11 3.12 3.13"
run: |
[ -e ./bindist/* ] && rm ./bindist/*
./c/build_tools/python_deploy/build_macos_packages.sh
Expand All @@ -218,7 +221,7 @@ jobs:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11 3.12"
override_python_versions: "3.11 3.12 3.13"
run: |
if (Test-Path -Path "${{ github.workspace }}/bindist") {
Remove-Item -Path "${{ github.workspace }}/bindist" -Recurse -Force
Expand Down Expand Up @@ -248,7 +251,7 @@ jobs:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-compiler"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11 3.12"
override_python_versions: "3.11 3.12 3.13"
run: |
[ -e ./bindist/* ] && rm ./bindist/*
./c/build_tools/python_deploy/build_macos_packages.sh
Expand All @@ -260,7 +263,7 @@ jobs:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-compiler"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11 3.12"
override_python_versions: "3.11 3.12 3.13"
run: |
if (Test-Path -Path "${{ github.workspace }}/bindist") {
Remove-Item -Path "${{ github.workspace }}/bindist" -Recurse -Force
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pkgci_build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
env:
CACHE_DIR: ${{ github.workspace }}/.iree-container-cache
MANYLINUX_DOCKER_IMAGE: ghcr.io/iree-org/manylinux_x86_64@sha256:facedb71df670016e74e646d71e869e6fff70d4cdbaa6634d4d0a10d6e174399
MANYLINUX_DOCKER_IMAGE: ghcr.io/iree-org/manylinux_x86_64@sha256:2e0246137819cf10ed84240a971f9dd75cc3eb62dc6907dfd2080ee966b3c9f4
PACKAGE_SUFFIX: ""
steps:
- name: Prefetch Docker
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
# fail-fast: false
# env:
# CACHE_DIR: ${{ github.workspace }}/.iree-container-cache
# MANYLINUX_DOCKER_IMAGE: ghcr.io/iree-org/manylinux_x86_64@sha256:facedb71df670016e74e646d71e869e6fff70d4cdbaa6634d4d0a10d6e174399
# MANYLINUX_DOCKER_IMAGE: ghcr.io/iree-org/manylinux_x86_64@sha256:2e0246137819cf10ed84240a971f9dd75cc3eb62dc6907dfd2080ee966b3c9f4
# PACKAGE_SUFFIX: "-asserts"
# steps:
# - name: Prefetch Docker
Expand Down
2 changes: 1 addition & 1 deletion build_tools/pkgci/build_linux_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function find_git_dir_parent() {
this_dir="$(cd $(dirname $0) && pwd)"
script_name="$(basename $0)"
repo_root=$(cd "${this_dir}" && find_git_dir_parent)
manylinux_docker_image="${manylinux_docker_image:-$(uname -m | awk '{print ($1 == "aarch64") ? "quay.io/pypa/manylinux_2_28_aarch64" : "ghcr.io/iree-org/manylinux_x86_64@sha256:facedb71df670016e74e646d71e869e6fff70d4cdbaa6634d4d0a10d6e174399" }')}"
manylinux_docker_image="${manylinux_docker_image:-$(uname -m | awk '{print ($1 == "aarch64") ? "quay.io/pypa/manylinux_2_28_aarch64" : "ghcr.io/iree-org/manylinux_x86_64@sha256:2e0246137819cf10ed84240a971f9dd75cc3eb62dc6907dfd2080ee966b3c9f4" }')}"
python_versions="${override_python_versions:-cp311-cp311}"
output_dir="${output_dir:-${this_dir}/wheelhouse}"
cache_dir="${cache_dir:-}"
Expand Down
6 changes: 3 additions & 3 deletions build_tools/python_deploy/build_linux_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# ./build_tools/python_deploy/build_linux_packages.sh
#
# Build specific Python versions and packages to custom directory:
# override_python_versions="cp39-cp39 cp310-310" \
# override_python_versions="cp39-cp39 cp310-cp310" \
# packages="iree-runtime" \
# output_dir="/tmp/wheelhouse" \
# ./build_tools/python_deploy/build_linux_packages.sh
Expand Down Expand Up @@ -64,8 +64,8 @@ function find_git_dir_parent() {
this_dir="$(cd $(dirname $0) && pwd)"
script_name="$(basename $0)"
repo_root=$(cd "${this_dir}" && find_git_dir_parent)
manylinux_docker_image="${manylinux_docker_image:-$(uname -m | awk '{print ($1 == "aarch64") ? "quay.io/pypa/manylinux_2_28_aarch64" : "ghcr.io/iree-org/manylinux_x86_64@sha256:facedb71df670016e74e646d71e869e6fff70d4cdbaa6634d4d0a10d6e174399" }')}"
python_versions="${override_python_versions:-cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312}"
manylinux_docker_image="${manylinux_docker_image:-$(uname -m | awk '{print ($1 == "aarch64") ? "quay.io/pypa/manylinux_2_28_aarch64" : "ghcr.io/iree-org/manylinux_x86_64@sha256:2e0246137819cf10ed84240a971f9dd75cc3eb62dc6907dfd2080ee966b3c9f4" }')}"
python_versions="${override_python_versions:-cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313 cp313-cp313t}"
output_dir="${output_dir:-${this_dir}/wheelhouse}"
packages="${packages:-iree-runtime iree-compiler}"
package_suffix="${package_suffix:-}"
Expand Down
9 changes: 6 additions & 3 deletions build_tools/python_deploy/install_macos_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ if [[ "$(whoami)" != "root" ]]; then
exit 1
fi

# These can be discovered at https://www.python.org/downloads/macos/
PYTHON_SPECS=(
3.11@https://www.python.org/ftp/python/3.11.2/python-3.11.2-macos11.pkg
3.10@https://www.python.org/ftp/python/3.10.5/python-3.10.5-macos11.pkg
3.9@https://www.python.org/ftp/python/3.9.13/python-3.9.13-macos11.pkg
3.13@https://www.python.org/ftp/python/3.13.0/python-3.13.0-macos11.pkg
3.12@https://www.python.org/ftp/python/3.12.6/python-3.12.6-macos11.pkg
3.11@https://www.python.org/ftp/python/3.11.9/python-3.11.9-macos11.pkg
# 3.10@https://www.python.org/ftp/python/3.10.5/python-3.10.5-macos11.pkg
# 3.9@https://www.python.org/ftp/python/3.9.13/python-3.9.13-macos11.pkg
)

for python_spec in "${PYTHON_SPECS[@]}"; do
Expand Down
9 changes: 8 additions & 1 deletion build_tools/python_deploy/install_windows_deps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,26 @@
# Installs dependencies on Windows necessary to build IREE Python wheels.

$PYTHON_VERSIONS = @(
"3.13" #,
"3.12" #,
"3.11" #,
# "3.10",
# "3.9"
)

$PYTHON_VERSIONS_NO_DOT = @(
"313" #,
"312" #,
"311" #,
# "310",
# "39"
)

# These can be discovered at https://www.python.org/downloads/windows/
$PYTHON_INSTALLER_URLS = @(
"https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe" #,
"https://www.python.org/ftp/python/3.13.0/python-3.13.0-amd64.exe" #,
"https://www.python.org/ftp/python/3.12.6/python-3.12.6-amd64.exe" #,
"https://www.python.org/ftp/python/3.11.9/python-3.11.9-amd64.exe" #,
# "https://www.python.org/ftp/python/3.10.5/python-3.10.5-amd64.exe",
# "https://www.python.org/ftp/python/3.9.13/python-3.9.13-amd64.exe"
)
Expand Down

0 comments on commit c7213de

Please sign in to comment.