Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version to 2.5.0 and document release process. #256

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v3

- name: Build Release Wheels
run: ./build_tools/build_release.py --core-version 2.3.0
run: ./build_tools/build_release.py --package-version 2.5.0.dev

- name: Validate Release Build
if: ${{ !cancelled() }}
Expand Down
44 changes: 27 additions & 17 deletions build_tools/build_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,27 @@
# a specific wheel".
IREE_PLATFORM_ARGS = [
# Linux aarch64
["--platform", "manylinux_2_28_aarch64", "--python-version", "3.9"],
# ["--platform", "manylinux_2_28_aarch64", "--python-version", "3.9"],
["--platform", "manylinux_2_28_aarch64", "--python-version", "3.10"],
["--platform", "manylinux_2_28_aarch64", "--python-version", "3.11"],
["--platform", "manylinux_2_28_aarch64", "--python-version", "3.12"],
["--platform", "manylinux_2_28_aarch64", "--python-version", "3.13"],
# ["--platform", "manylinux_2_28_aarch64", "--python-version", "3.13t"],
# Linux x86_64
["--platform", "manylinux_2_28_x86_64", "--python-version", "3.9"],
# ["--platform", "manylinux_2_28_x86_64", "--python-version", "3.9"],
["--platform", "manylinux_2_28_x86_64", "--python-version", "3.10"],
["--platform", "manylinux_2_28_x86_64", "--python-version", "3.11"],
["--platform", "manylinux_2_28_x86_64", "--python-version", "3.12"],
["--platform", "manylinux_2_28_x86_64", "--python-version", "3.13"],
# ["--platform", "manylinux_2_28_x86_64", "--python-version", "3.13t"],
# MacOS
["--platform", "macosx_13_0_universal2", "--python-version", "3.11"],
["--platform", "macosx_13_0_universal2", "--python-version", "3.12"],
["--platform", "macosx_13_0_universal2", "--python-version", "3.13"],
# Windows
["--platform", "win_amd64", "--python-version", "3.11"],
["--platform", "win_amd64", "--python-version", "3.12"],
["--platform", "win_amd64", "--python-version", "3.13"],
]


Expand All @@ -55,13 +63,13 @@ def write_version_info(args):
with open(VERSION_INFO_FILE, "rt") as f:
info_dict = json.load(f)

# Compute core-version.
core_version = eval_version(args.core_version)
if args.core_pre_version:
core_version += eval_version(args.core_pre_version)
if args.core_post_version:
core_version += f".{eval_version(args.core_post_version)}"
info_dict["core-version"] = core_version
# Compute package-version.
package_version = eval_version(args.package_version)
if args.package_pre_version:
package_version += eval_version(args.package_pre_version)
if args.package_post_version:
package_version += f".{eval_version(args.package_post_version)}"
info_dict["package-version"] = package_version
Comment on lines +66 to +72
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yet another way to compute / parse the version numbers. I assume we want to harmonize this over the projects when switching iree-turbine to the new versioning scheme? Nothing for this PR, just considerations.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, yeah. I'm not sure how I feel about the explicit version specification in commands like ./build_tools/build_release.py --package-version 2.5.0 --package-pre-version=rcYYYYMMDD is. In the other projects we pull that from the version file.


with open(VERSION_INFO_FILE, "wt") as f:
json.dump(info_dict, f)
Expand Down Expand Up @@ -112,12 +120,16 @@ def download_iree_binaries():
]
args.extend(platform_args)
args += [
"-f",
"https://iree.dev/pip-release-links.html",
# Uncomment to allow nightly releases (if not pinned in the file)
# "-f",
# "https://iree.dev/pip-release-links.html",
"-f",
WHEEL_DIR,
# Note: could also drop `-ci` here, if coordinating a release
# across projects and new stable versions of the IREE packages
# haven't yet been pushed.
"-r",
REPO_ROOT / "iree-requirements.txt",
REPO_ROOT / "iree-requirements-ci.txt",
]
exec(args)

Expand All @@ -130,16 +142,14 @@ def build_wheel(path, env=None):

def main():
parser = argparse.ArgumentParser()
parser.add_argument("--package-version", help="Version to use", required=True)
parser.add_argument(
"--core-version", help="Version for the core component", required=True
)
parser.add_argument(
"--core-pre-version",
"--package-pre-version",
help="Pre-release version segment or (YYYYMMDD)",
default="",
)
parser.add_argument(
"--core-post-version",
"--package-post-version",
help="Post-release version segment or (YYYYMMDD)",
default="",
)
Expand Down
69 changes: 69 additions & 0 deletions docs/releasing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Releasing iree-turbine

This project hosts the https://pypi.org/project/iree-turbine/ package, which
depends on the https://pypi.org/project/iree-compiler/ and
https://pypi.org/project/iree-runtime/ packages. Releases can either be
conducted independently, or they can be coordinated across projects by
initiating a release here.

## Building Artifacts

Build a pre-release:

```bash
./build_tools/build_release.py --package-version 2.5.0 --package-pre-version=rcYYYYMMDD
```

Build an official release:

```bash
./build_tools/build_release.py --package-version 2.5.0
```

This will download all deps, including wheels for all supported platforms and
Python versions for iree-compiler and iree-runtime. All wheels will be placed
in the `wheelhouse/` directory.

## Testing

```bash
./build_tools/post_build_release_test.sh
```

This will

1. Set up a python virtual environment using your default `python` version
2. Install wheels from the `wheelhouse/` directory
3. Run `pytest` tests

## Push

From the testing venv, verify that everything is sane:

```bash
pip freeze
```

Push IREE deps (if needed/updated):

```bash
twine upload wheelhouse/iree_compiler-* wheelhouse/iree_runtime-*
```

Push built wheels:

```bash
twine upload wheelhouse/iree_turbine-*
```

## Install from PyPI and Sanity Check

TODO: Script this

From the testing venv:

```bash
pip uninstall -y iree-turbine iree-compiler iree-runtime
pip install iree-turbine
pytest .
```
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def load_version_info():


version_info = load_version_info()
PACKAGE_VERSION = version_info["core-version"]
PACKAGE_VERSION = version_info["package-version"]

packages = find_namespace_packages(
include=[
Expand Down
4 changes: 3 additions & 1 deletion version_info.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{"core-version": "2.3.0rc20240621", "package-version": "0.9.7.dev1"}
{
"package-version": "2.5.0"
}
Loading