Skip to content

Commit

Permalink
Rename base packages (#19061)
Browse files Browse the repository at this point in the history
As part of applying the new versioning scheme proposed with #18938, this
renames the Python packages `iree-compiler` to `iree-base-compiler` and
`iree-runtime` to `iree-base-runtime`.
  • Loading branch information
marbre authored Nov 7, 2024
1 parent 6d55a11 commit c651ba9
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 60 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Builds release packages on supported platforms:
# * main-dist-linux (CMake 'install')
# * py-compiler-pkg (`iree-compiler` Python package)
# * py-compiler-pkg (`iree-base-compiler` Python package)
# * Linux, macOS, Windows
# * All supported Python versions (e.g. 3.9, 3.10, 3.11)
# * py-runtime-pkg (`iree-runtime` Python package)
# * py-runtime-pkg (`iree-base-runtime` Python package)
# * Linux, macOS, Windows
# * All supported Python versions (e.g. 3.9, 3.10, 3.11)
# * py-tf-compiler-tools-pkg (`iree-tools-[tf, tflite]`, pure Python packages)
Expand Down Expand Up @@ -246,7 +246,7 @@ jobs:
##########################################################################
# py-runtime-pkg
# Builds the iree-runtime wheels.
# Builds the iree-base-runtime wheels.
# One step per OS.
##########################################################################

Expand All @@ -255,7 +255,7 @@ jobs:
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime"
packages: "iree-base-runtime"
output_dir: "${{ github.workspace }}/bindist"
run: |
[ -e ./bindist/* ] && rm ./bindist/*
Expand All @@ -266,7 +266,7 @@ jobs:
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime"
packages: "iree-base-runtime"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11 3.12 3.13"
run: |
Expand All @@ -278,7 +278,7 @@ jobs:
shell: powershell
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime"
packages: "iree-base-runtime"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11 3.12 3.13"
run: |
Expand All @@ -289,15 +289,15 @@ jobs:
##########################################################################
# py-compiler-pkg
# Builds the iree-compiler wheel.
# Builds the iree-base-compiler wheel.
# One step per OS.
##########################################################################
- name: Build compiler wheels (Linux, x86_64 and Arm64)
if: "matrix.build-package == 'py-compiler-pkg' && contains(matrix.build-family, 'linux')"
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-compiler"
packages: "iree-base-compiler"
output_dir: "${{ github.workspace }}/bindist"
run: |
[ -e ./bindist/* ] && rm ./bindist/*
Expand All @@ -308,7 +308,7 @@ jobs:
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-compiler"
packages: "iree-base-compiler"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11 3.12 3.13"
run: |
Expand All @@ -320,7 +320,7 @@ jobs:
shell: powershell
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-compiler"
packages: "iree-base-compiler"
output_dir: "${{ github.workspace }}/bindist"
override_python_versions: "3.11 3.12 3.13"
run: |
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 @@ -91,7 +91,7 @@ jobs:
export manylinux_docker_image="$MANYLINUX_DOCKER_IMAGE"
export package_suffix="$PACKAGE_SUFFIX"
# If just iterating locally, uncomment this to build a cheap wheel.
# export packages="iree-runtime"
# export packages="iree-base-runtime"
./build_tools/pkgci/build_linux_packages.sh
# Some things put stuff in cache with weird, root read-only
# permissions. Take them back.
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
# export manylinux_docker_image="$MANYLINUX_DOCKER_IMAGE"
# export package_suffix="$PACKAGE_SUFFIX"
# # If just iterating locally, uncomment this to build a cheap wheel.
# # export packages="iree-runtime"
# # export packages="iree-base-runtime"
# ./build_tools/pkgci/build_linux_packages.sh
# # Some things put stuff in cache with weird, root read-only
# # permissions. Take them back.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ jobs:
python3 -m pip install \
--find-links https://iree.dev/pip-release-links.html \
--upgrade \
iree-compiler \
iree-runtime
iree-base-compiler \
iree-base-runtime
- name: "Setup emsdk"
uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate_and_publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:
- name: Install python packages
id: install_python_packages
run: |
python -m pip install -f file://$PWD/wheels-linux-x86_64-py-compiler-pkg/ iree-compiler[onnx]
python -m pip install -f file://$PWD/wheels-linux-x86_64-py-runtime-pkg/ iree-runtime
python -m pip install -f file://$PWD/wheels-linux-x86_64-py-compiler-pkg/ iree-base-compiler[onnx]
python -m pip install -f file://$PWD/wheels-linux-x86_64-py-runtime-pkg/ iree-base-runtime
python -m pip install -f file://$PWD/wheels-linux-x86_64-py-tf-compiler-tools-pkg/ iree-tools-tflite iree-tools-tf
- name: Validate IREE Compiler Package
id: validate_compiler_package
Expand Down
3 changes: 1 addition & 2 deletions build_tools/github_actions/build_dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
This script runs as the CIBW_BEFORE_BUILD command within cibuildwheel:
- Main distribution .tar.bz2 file (the result of `ninja install`).
- The python_packages/iree_compiler wheel, which is python version
independent but platform specific.
- The python_packages/iree_base_compiler wheel.
- Installable tests.
It uses cibuildwheel for all of this as a convenience since it already knows
Expand Down
20 changes: 10 additions & 10 deletions build_tools/pkgci/build_linux_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# Build specific Python versions and packages to custom directory:
# override_python_versions="cp39-cp39 cp310-cp310" \
# packages="iree-runtime" \
# packages="iree-base-runtime" \
# output_dir="/tmp/wheelhouse" \
# ./build_tools/python_deploy/build_linux_packages.sh
#
Expand All @@ -26,8 +26,8 @@
# cp39-cp39 cp310-cp310
#
# Valid packages:
# iree-runtime
# iree-compiler
# iree-base-runtime
# iree-base-compiler
#
# Note that this script is meant to be run on CI and it will pollute both the
# output directory and in-tree build/ directories (under runtime/ and
Expand Down Expand Up @@ -68,7 +68,7 @@ manylinux_docker_image="${manylinux_docker_image:-$(uname -m | awk '{print ($1 =
python_versions="${override_python_versions:-cp311-cp311}"
output_dir="${output_dir:-${this_dir}/wheelhouse}"
cache_dir="${cache_dir:-}"
packages="${packages:-iree-runtime iree-compiler}"
packages="${packages:-iree-base-runtime iree-base-compiler}"
package_suffix="${package_suffix:-}"
toolchain_suffix="${toolchain_suffix:-release}"
# Return ON if we are on a supported platform for CUDA.
Expand Down Expand Up @@ -155,15 +155,15 @@ function run_in_docker() {
# replace dashes with underscores
package_suffix="${package_suffix//-/_}"
case "${package}" in
iree-runtime)
clean_wheels "iree_runtime${package_suffix}" "${python_version}"
iree-base-runtime)
clean_wheels "iree_base_runtime${package_suffix}" "${python_version}"
build_iree_runtime
run_audit_wheel "iree_runtime${package_suffix}" "${python_version}"
run_audit_wheel "iree_base_runtime${package_suffix}" "${python_version}"
;;
iree-compiler)
clean_wheels "iree_compiler${package_suffix}" "${python_version}"
iree-base-compiler)
clean_wheels "iree_base_compiler${package_suffix}" "${python_version}"
build_iree_compiler
run_audit_wheel "iree_compiler${package_suffix}" "${python_version}"
run_audit_wheel "iree_base_compiler${package_suffix}" "${python_version}"
;;
*)
echo "Unrecognized package '${package}'"
Expand Down
4 changes: 2 additions & 2 deletions build_tools/pkgci/setup_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def main(args):
artifact_prefix = f"{platform.system().lower()}_{platform.machine()}"
wheels = []
for package_stem, variant in [
("iree-compiler", args.compiler_variant),
("iree-runtime", args.runtime_variant),
("iree-base-compiler", args.compiler_variant),
("iree-base-runtime", args.runtime_variant),
]:
wheels.append(
find_wheel_for_variants(args, artifact_prefix, package_stem, variant)
Expand Down
24 changes: 12 additions & 12 deletions build_tools/python_deploy/build_linux_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#
# Build specific Python versions and packages to custom directory:
# override_python_versions="cp39-cp39 cp310-cp310" \
# packages="iree-runtime" \
# packages="iree-base-runtime" \
# output_dir="/tmp/wheelhouse" \
# ./build_tools/python_deploy/build_linux_packages.sh
#
Expand All @@ -26,8 +26,8 @@
# cp39-cp39 cp310-cp310
#
# Valid packages:
# iree-runtime
# iree-compiler
# iree-base-runtime
# iree-base-compiler
#
# Note that this script is meant to be run on CI and it will pollute both the
# output directory and in-tree build/ directories (under runtime/ and
Expand Down Expand Up @@ -67,7 +67,7 @@ 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: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}"
packages="${packages:-iree-base-runtime iree-base-compiler}"
package_suffix="${package_suffix:-}"
toolchain_suffix="${toolchain_suffix:-release}"
# Return ON if we are on a supported platform for CUDA.
Expand Down Expand Up @@ -130,17 +130,17 @@ function run_in_docker() {
# replace dashes with underscores
package_suffix="${package_suffix//-/_}"
case "${package}" in
iree-runtime)
clean_wheels "iree_runtime${package_suffix}" "${python_version}"
install_deps "iree_runtime${package_suffix}" "${python_version}"
iree-base-runtime)
clean_wheels "iree_base_runtime${package_suffix}" "${python_version}"
install_deps "iree_base_runtime${package_suffix}" "${python_version}"
build_iree_runtime
run_audit_wheel "iree_runtime${package_suffix}" "${python_version}"
run_audit_wheel "iree_base_runtime${package_suffix}" "${python_version}"
;;
iree-compiler)
clean_wheels "iree_compiler${package_suffix}" "${python_version}"
install_deps "iree_runtime${package_suffix}" "${python_version}"
iree-base-compiler)
clean_wheels "iree_base_compiler${package_suffix}" "${python_version}"
install_deps "iree_base_runtime${package_suffix}" "${python_version}"
build_iree_compiler
run_audit_wheel "iree_compiler${package_suffix}" "${python_version}"
run_audit_wheel "iree_base_compiler${package_suffix}" "${python_version}"
;;
*)
echo "Unrecognized package '${package}'"
Expand Down
14 changes: 7 additions & 7 deletions build_tools/python_deploy/build_macos_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
#
# MacOS convention is to refer to this as major.minor (i.e. "3.9", "3.10").
# Valid packages:
# iree-runtime
# iree-compiler
# iree-base-runtime
# iree-base-compiler

set -eu -o errtrace

this_dir="$(cd $(dirname $0) && pwd)"
repo_root="$(cd $this_dir/../../ && pwd)"
python_versions="${override_python_versions:-3.11}"
output_dir="${output_dir:-${this_dir}/wheelhouse}"
packages="${packages:-iree-runtime iree-compiler}"
packages="${packages:-iree-base-runtime iree-base-compiler}"

# Note that this typically is selected to match the version that the official
# Python distributed is built at.
Expand All @@ -50,12 +50,12 @@ function run() {
export PATH=$python_dir/bin:$orig_path
echo ":::: Python version $(python3 --version)"
case "$package" in
iree-runtime)
clean_wheels iree_runtime $python_version
iree-base-runtime)
clean_wheels iree_base_runtime $python_version
build_iree_runtime
;;
iree-compiler)
clean_wheels iree_compiler $python_version
iree-base-compiler)
clean_wheels iree_base_compiler $python_version
build_iree_compiler
;;
*)
Expand Down
10 changes: 5 additions & 5 deletions build_tools/python_deploy/build_windows_packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Configure settings with script parameters.
param(
[array]$python_versions=@("3.11"),
[array]$packages=@("iree-runtime", "iree-compiler"),
[array]$packages=@("iree-base-runtime", "iree-base-compiler"),
[System.String]$output_dir
)

Expand Down Expand Up @@ -47,12 +47,12 @@ function run() {

Write-Host ":::: Version: $(py -${python_version} --version)"
switch ($package) {
"iree-runtime" {
clean_wheels iree_runtime $python_version
"iree-base-runtime" {
clean_wheels iree_base_runtime $python_version
build_iree_runtime $python_version
}
"iree-compiler" {
clean_wheels iree_compiler $python_version
"iree-base-compiler" {
clean_wheels iree_base_compiler $python_version
build_iree_compiler $python_version
}
Default {
Expand Down
2 changes: 1 addition & 1 deletion compiler/bindings/python/iree/compiler/api/ctypes_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def _probe_iree_compiler_dylib() -> str:
if not paths:
paths = _mlir_libs.__path__

logging.debug("Found installed iree-compiler package %r", version_dict)
logging.debug("Found installed IREE compiler package %r", version_dict)
dylib_basename = "libIREECompiler.so"
system = platform.system()
if system == "Darwin":
Expand Down
4 changes: 2 additions & 2 deletions compiler/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Build/install the iree-compiler python package.
# Build/install the iree-base-compiler python package.
# Note that this includes a relatively large build of LLVM (~2400 C++ files)
# and can take a considerable amount of time, especially with defaults.
# To install:
Expand Down Expand Up @@ -418,7 +418,7 @@ def find_git_submodule_revision(submodule_path):
custom_package_prefix = os.getenv("IREE_COMPILER_CUSTOM_PACKAGE_PREFIX", "")

setup(
name=f"{custom_package_prefix}iree-compiler{custom_package_suffix}{PACKAGE_SUFFIX}",
name=f"{custom_package_prefix}iree-base-compiler{custom_package_suffix}{PACKAGE_SUFFIX}",
version=f"{PACKAGE_VERSION}",
author="IREE Authors",
author_email="[email protected]",
Expand Down
6 changes: 4 additions & 2 deletions docs/website/docs/developers/general/release-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ on GitHub. We also push the Python packages for this release to PyPI.
| -- | -- |
GitHub release (stable) | [![GitHub Release](https://img.shields.io/github/v/release/iree-org/iree)](https://github.com/iree-org/iree/releases/latest)
GitHub release (nightly) | [![GitHub Release](https://img.shields.io/github/v/release/iree-org/iree?include_prereleases)](https://github.com/iree-org/iree/releases)
Python iree-compiler | [![PyPI version](https://badge.fury.io/py/iree-compiler.svg)](https://badge.fury.io/py/iree-compiler)
Python iree-runtime | [![PyPI version](https://badge.fury.io/py/iree-runtime.svg)](https://badge.fury.io/py/iree-runtime)
Python iree-base-compiler | [![PyPI version](https://badge.fury.io/py/iree-base-compiler.svg)](https://badge.fury.io/py/iree-base-compiler)
Python iree-base-runtime | [![PyPI version](https://badge.fury.io/py/iree-base-runtime.svg)](https://badge.fury.io/py/iree-base-runtime)
Python iree-compiler (deprecated) | [![PyPI version](https://badge.fury.io/py/iree-compiler.svg)](https://badge.fury.io/py/iree-compiler)
Python iree-runtime (deprecated) | [![PyPI version](https://badge.fury.io/py/iree-runtime.svg)](https://badge.fury.io/py/iree-runtime)

## Running a release

Expand Down
2 changes: 1 addition & 1 deletion runtime/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def populate_built_package(abs_dir):
)

setup(
name=f"{custom_package_prefix}iree-runtime{custom_package_suffix}{PACKAGE_SUFFIX}",
name=f"{custom_package_prefix}iree-base-runtime{custom_package_suffix}{PACKAGE_SUFFIX}",
version=f"{PACKAGE_VERSION}",
author="IREE Authors",
author_email="[email protected]",
Expand Down

0 comments on commit c651ba9

Please sign in to comment.