-
Notifications
You must be signed in to change notification settings - Fork 612
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
[RFC] New versioning scheme for IREE Python packages #18938
Comments
Highlighting an important detail that could be missed: with these version changes, existing workflows that use
will need to be replaced with new packages
Simply switching the version scheme on the existing packages would require starting with a version greater than the existing calver ( After rolling out the initial releases for each package, we can also explore ergonomics improvements like functional or meta packages that themselves depend on both "base" packages, so users can install a single project or the individual packages if they want precise control. We can also publish tombstone package releases to the |
This implements the new versioning scheme proposed with iree-org#18938. For the compiler, the runtime, the TF compiler tools and the TFLite compiler tools, `version_info.json` files to allow to set the patch level individually for each package. Furthermore, a `version_info.json` is added at root level to have a common version for a (future) meta package, now mainly used to determine the tag when publishing release candidates. This file might be moved in future and additional, per-package tags might be added.
This implements the new versioning scheme proposed with iree-org#18938. For the compiler, the runtime, the TF compiler tools and the TFLite compiler tools, `version_info.json` files to allow to set the patch level individually for each package. Furthermore, a `version_info.json` is added at root level to have a common version for a (future) meta package, now mainly used to determine the tag when publishing release candidates. This file might be moved in future and additional, per-package tags might be added.
This implements the new versioning scheme proposed with iree-org#18938. For the compiler, the runtime, the TF compiler tools and the TFLite compiler tools, `version_info.json` files to allow to set the patch level individually for each package. Furthermore, a `version_info.json` is added at root level to have a common version for a (future) meta package, now mainly used to determine the tag when publishing release candidates. This file might be moved in future and additional, per-package tags might be added.
This implements the new versioning scheme proposed with iree-org#18938. For the compiler, the runtime, the TF compiler tools and the TFLite compiler tools, `version_info.json` files to allow to set the patch level individually for each package. Furthermore, a `version_info.json` is added at root level to have a common version for a (future) meta package, now mainly used to determine the tag when publishing release candidates. This file might be moved in future and additional, per-package tags might be added.
One open question is where we'll publish nightly releases to. We currently push a new release every night to https://github.com/iree-org/iree/releases and a release index to https://iree.dev/pip-release-links.html using this script: https://github.com/iree-org/iree/blob/main/build_tools/scripts/generate_release_index.py . We could switch to a single "dev-wheels" release like https://github.com/nod-ai/SHARK-Platform/releases/tag/dev-wheels with a release index generated for us by GitHub like https://github.com/nod-ai/SHARK-Platform/releases/expanded_assets/dev-wheels . Even if we rename the packages to Eventually we could also push nightly / pre-release versions of packages to pypi so users can just pass |
Whatever helps you get bootstrapped. These things usually require a cascade of changes. But it would be good to get off of the old way. It's long in the tooth and creates a ton of tag spam. If building a new index scraper, we probably want it to scrape all of the dev wheel locations across the projects and make one consolidated index file. |
This implements a new versioning scheme, similar to the one recently proposed with iree-org#18938 and applies it to `iree-compiler`, `iree-runtime` and the `iree-dist` tarball. The TF and TFLite compiler tools use the (legacy) versioning and need to be updated with a follow up commit. The common version number is determined based on the versions of the compiler and the runtime and the higher version is picked as the common on. In contrast to the proposed versioning scheme, version numbers of development releases are in the format `X.Y.Z.dev0+${gitcommithash}` as discussed in iree-org#19003 and not `X.Y.Z.dev` as originally proposed. Not yet addressed is the refactoring of the workflows thus that the `version-local.json` files get only written once (and not for every OS) and to provide then to subsequent steps as artifacts.
This release was just promoted to stable: https://github.com/iree-org/iree/releases/tag/candidate-20241104.1068. As we align the versions across projects (iree-org/iree#18938), we should aim to use stable versions or at least test nightly versions with care.
Oh, I just found / re-remembered that iree-turbine versioning is intended to be based on PyTorch versions. I presume we're departing from that now, but using the existing
I just pushed iree-turbine version 2.5.0 (https://github.com/iree-org/iree-turbine/releases/tag/v2.5.0), which I guess we could say coincides with PyTorch 2.5.0 (https://github.com/pytorch/pytorch/releases/tag/v2.5.0), but that's mostly a coincidence. We could also have iree-turbine keep tracking PyTorch versions and instead start the iree-base-compiler/iree-base-runtime versions at 1.0.0. I do like taking this opportunity to use a common version scheme across all of our packages, diverging from external projects like PyTorch. |
That quote is from https://github.com/iree-org/iree/blob/main/RELEASING.md , which also then has this section:
|
This adapts docs and samples to https://github.com/iree-org/iree-turbine/releases/tag/v2.5.0. * Switched from `import shark_turbine.aot as aot` to `import iree.turbine.aot as aot` (see also iree-org/iree-turbine#28). * Redirected notes from `/RELEASING.md` to https://github.com/iree-org/iree-turbine/blob/main/docs/releasing.md. The release process is changing now with #18938 and I'll want to fold the notes there in to https://iree.dev/developers/general/release-management/ instead. * Re-ran some Colab notebooks and adapted to the latest changes across projects. Note that the https://github.com/iree-org/iree/tree/main/samples/dynamic_shapes sample still has code using `@aot.jittable`, so I have re-opened #18564 to migrate it. I spent some time trying to update it but wasn't sure how to demonstrate dynamic shapes using the "modern canonical usage" effectively. * This fixes the recent test failures: https://github.com/iree-org/iree/actions/runs/11697207429/job/32575551934. Test run: https://github.com/ScottTodd/iree/actions/runs/11713816651/job/32627295562
This implements a new versioning scheme, similar to the one recently proposed with #18938 and applies it to `iree-compiler`, `iree-runtime` and the `iree-dist` tarball. The TF and TFLite compiler tools use the (legacy) versioning and need to be updated with a follow up commit. The common version number is determined based on the versions of the compiler and the runtime and the higher version is picked as the common on. In contrast to the proposed versioning scheme, version numbers of development releases are in the format `X.Y.Z.dev+${gitcommithash}` as discussed in #19003 and not `X.Y.Z.dev` as originally proposed.
We are starting to roll out the new versions and package names now. Hoping to have nightly releases of |
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`.
This adapts docs and samples to https://github.com/iree-org/iree-turbine/releases/tag/v2.5.0. * Switched from `import shark_turbine.aot as aot` to `import iree.turbine.aot as aot` (see also iree-org/iree-turbine#28). * Redirected notes from `/RELEASING.md` to https://github.com/iree-org/iree-turbine/blob/main/docs/releasing.md. The release process is changing now with iree-org#18938 and I'll want to fold the notes there in to https://iree.dev/developers/general/release-management/ instead. * Re-ran some Colab notebooks and adapted to the latest changes across projects. Note that the https://github.com/iree-org/iree/tree/main/samples/dynamic_shapes sample still has code using `@aot.jittable`, so I have re-opened iree-org#18564 to migrate it. I spent some time trying to update it but wasn't sure how to demonstrate dynamic shapes using the "modern canonical usage" effectively. * This fixes the recent test failures: https://github.com/iree-org/iree/actions/runs/11697207429/job/32575551934. Test run: https://github.com/ScottTodd/iree/actions/runs/11713816651/job/32627295562
IREE is renaming its Python packages from `iree-compiler` and `iree-runtime` to `iree-base-compiler` and `iree-base-runtime`, in order to switch to a new versioning scheme: iree-org/iree#18938. This switches to using the new package names and versions and cleans up some related documentation along the way.
This is part of rolling out the new versioning scheme proposed at #18938. During publishing to PyPI with the existing `build_tools/python_deploy/pypi_deploy.sh` script, this converts "nightly" packages with versions like `X.Y.ZrcYYYYMMDD` to "stable" packages with versions like `X.Y.Z`. * The version change is performed by https://pypi.org/project/change-wheel-version/ (source here: https://github.com/hauntsaninja/change_wheel_version/blob/master/change_wheel_version.py), which handles editing package versions and renaming files. * Note that binary tools like `iree-compile` still have versions stamped in them that this is **not** modifying. Test logs (on a draft release, with the upload step commented out): https://gist.github.com/ScottTodd/e7342a7be9c1c4eb093e6d31bd9cebef
IREE is renaming its Python packages from `iree-compiler` and `iree-runtime` to `iree-base-compiler` and `iree-base-runtime`, in order to switch to a new versioning scheme: iree-org/iree#18938. This switches to using the new package names and versions and cleans up some related documentation along the way. Note: the new packages are not yet built and published, hence this is a draft PR. Once packages are published we can rebase, test this, and then proceed.
A release was published today: * https://pypi.org/project/iree-base-compiler/2.9.0/ * https://pypi.org/project/iree-base-runtime/2.9.0/ * https://github.com/iree-org/iree/releases/tag/iree-2.9.0rc20241108 We're still figuring out the procedure for these new version updates, but #18938 does at least say: > After a release, either Y or Z MUST be increased to ensure precedence of nightly builds. We can decide next week if we want to start by updating the minor version instead of the patch version that I updated here.
This documents the versioning scheme proposed with iree-org#18938, refined as part of the discussion iree-org#19003 (first drafted patch) and iree-org#19034 (second drafted patch) and applied with commit 6d55a11.
This documents the versioning scheme proposed with iree-org#18938, refined as part of the discussion iree-org#19003 (first drafted patch) and iree-org#19034 (second drafted patch) and applied with commit 6d55a11.
Progress on #18938. Pip will only install "pre-release" versions if `--pre` is set or the version is set explicitly: https://pip.pypa.io/en/stable/cli/pip_install/#pre-release-versions. The `rc` part of our `rcYYYYMMDD` suffix used in the nightly packages is considered a "Pre-release segment" in the version string: https://packaging.python.org/en/latest/specifications/version-specifiers/#public-version-identifiers. Also switched sample Colab notebooks to use the new package names. I tested these lightly, but did not fully regenerate them, so the embedded logs still reference old versions of packages: * Manually ran a few notebooks from my branch like https://colab.research.google.com/github/ScottTodd/iree/blob/release-pre/samples/colab/tensorflow_edge_detection.ipynb * Ran the 'samples' workflow on my fork: https://github.com/ScottTodd/iree/actions/runs/11828250281
Summary
Our pre-compiled software is currently made publicly available using different versioning schemes. We're proposing a new versioning scheme to remedy this situation to which downstream packages depending on IREE can easily adopt.
This affects these packages:
20240828.999
)20240828.999
)2.4.1
)20240226.813
)20240226.813
)Here are examples of the new versions we propose:
X.Y.Z
3.0.0
schedule
)X.Y.ZrcYYYYMMDD
3.0.1rc20241029
pull_request
)X.Y.Z.devNN
3.0.1.dev50
X.Y.Z.dev
3.0.1.dev
Key
X
Y
Z
rc
main
branch)dev
YYYY
2024
MM
10
DD
29
NN
50
Background
Currently CalVer is used for releasing iree-compiler and iree-runtime whereas iree-turbine utilizes a version number in the format of
X.Y.Z
. Therefore, compatible versions cannot be derived from the version number. A common versioning scheme would be SemVer, but as the MAJOR version must be increased when incompatible API changes are introduced a cross-project version number (primarily a shared MAJOR version) cannot be guaranteed if APIs are not identical. Switching to a non-CalVer scheme requires a package rename as the first release segment would otherwise need to be set to a number larger than20240928
, e.g.30000000
, or to introduce anN!
epoch segment which however is not a convenient solution, see Python version epochs are broken.Detailed proposal
A shared version format is proposed for the packages
iree-base-compiler
(formally namediree-compiler
)iree-base-runtime
(formally namediree-runtime
)iree-turbine
Major or minor releases are published every 6 weeks for all packages uniformly. Based on logistics and/or practical engineering issues, releases may be delayed or deferred as needed. Patch versions for individual packages can be published outside of that cycle as needed.
A release number is in the format of
X.Y.Z
(MAJOR.MAJOR.PATCH).X
andY
are defined as shared version numbers between all packages.Z
MAY be incremented individually.Z
(x.y.Z
) MUST be incremented. A bug fix is an internal change that fixes incorrect behavior and MUST NOT introduce breaking changes.Development and nightly releases:
X.Y.Z.devN
, where N is a build number.X.Y.ZrcYYYYMMDD
.The following semantics apply:
X
(X.y.z
) is increased for one package, the version number change MUST be adopted by all (other) packages. The same applies for the versionY
(x.Y.Z
).X
orY
are changed,Z
MUST be set0
.Y
orZ
MUST be increased to ensure precedence of nightly builds.For example:
3.0.0
.3.0.1rc20241116
or3.1.0rc20241116
.3.0.1
or3.1.0
.Additional version information
With switching from CalVer to the proposed versioning scheme, the build date is not encoded in the version number any longer. However, additional information is provided by
--version
, e.g.iree-compile --version
gives:which can be extended by the build date.
Implementation plan
Each project will have a
version_info.json
file containing the latestX.Y.Z
version. Local, pull request, and nightly builds will read from this file and append their own suffixes to it. When a new release is promoted to PyPI from a nightly release, a script will be used to edit the embedded version, removing anyrcYYYYMMDD
suffix and then we will upgrade the version in eachversion_info.json
file so future builds will use new versions. The new releases will start at version3.0.0
, since iree-turbine is currently2.4.1
.Timeline
We would like to begin implementation work soon and have this completed within ~2 weeks.
The text was updated successfully, but these errors were encountered: