Open marbre opened 3 days ago
Highlighting an important detail that could be missed: with these version changes, existing workflows that use
python -m pip install iree-compiler iree-runtime
will need to be replaced with new packages
python -m pip install iree-base-compiler iree-base-runtime
Simply switching the version scheme on the existing packages would require starting with a version greater than the existing calver (20240828
), or using Python version epochs, which are broken.
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 iree-compiler
and iree-runtime
projects that warn about the name change and maybe eventually (after years?) remove the old names/packages entirely.
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.