Document prebuilt wheel install path#1587
Merged
erwei-xilinx merged 6 commits intoMay 6, 2026
Merged
Conversation
Adds a wheel-first install section to docs/buildingRyzenLin.md so users can `pip install mlir_air` instead of building from source. The previous "Quick Start" was a source build using wheel dependencies — renamed to clarify. Also populates GitHub release descriptions for the latest-air-wheels and latest-air-wheels-no-rtti tags so the release page itself shows install instructions and explains the RTTI vs no-RTTI variants (the no-RTTI variant exists for downstream LLVM-no-RTTI integration). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the “wheel install” user path by documenting a wheel-first installation flow in the Ryzen Linux guide and by adding a populated GitHub Release description to the wheel publishing workflow so the latest-* release pages include install instructions.
Changes:
- Added an “Install Prebuilt Wheels (Recommended)” section to
docs/buildingRyzenLin.md, and renamed the prior “Quick Start” to clarify it’s a source build using prebuilt dependencies. - Added a Markdown
body:to the wheel release steps in.github/workflows/buildAIRWheels.ymlsolatest-air-wheels/latest-air-wheels-no-rttireleases include platform + install guidance and RTTI/no-RTTI notes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docs/buildingRyzenLin.md | Adds wheel-first install + environment setup instructions; clarifies source-build section naming. |
| .github/workflows/buildAIRWheels.yml | Populates release pages with install instructions and RTTI/no-RTTI guidance via body: on release steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- buildingRyzenLin.md: drop Windows from prerequisites; this guide is Linux-only and the install commands use bash/source/export. Add a note pointing Windows users to translate the commands themselves. - buildAIRWheels.yml: make the install snippet URLs in the release body conditional on matrix.ENABLE_RTTI so the no-RTTI release page links to the no-RTTI wheels. Vary the body header to match. - buildAIRWheels.yml: add omitBody on versioned tag pushes (v*.*.*) so those releases can carry human-written or auto-generated notes; only the rolling latest-* tags get the auto-populated body. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
MLIR-AIR is verified only against the mlir-aie commit pinned in utils/clone-mlir-aie.sh; installing latest mlir_aie can pick up an incompatible newer version. Reuse the same `--get-wheel-version` helper that build-mlir-air-using-wheels.sh already uses. - buildAIRWheels.yml: expose MLIR_AIE_VERSION as an output of the get-air-project-commit job (computed via clone-mlir-aie.sh --get-wheel-version), and pin the install line in the release body to that version. Also append the .no.rtti version suffix when on the no-RTTI tag. - buildingRyzenLin.md: restructure the install steps to clone the AIR repo first, then derive MLIR_AIE_VERSION from the script. Add a note that the three wheels are independent at install time (no required order) but must all be present at compile/run time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Following the same pattern Triton-XDNA uses, declare mlir_aie (pinned
to the version AIR was built against) and llvm-aie as Requires-Dist on
the mlir_air wheel itself. Pip then resolves the whole stack from the
provided --find-links pages — no need to clone the AIR repo or run a
helper script just to learn the matching mlir_aie version.
- setup.py: new get_install_requires() reads MLIR_AIE_VERSION from the
build environment and appends `mlir_aie==<version>{.no.rtti?}` plus
`llvm-aie` to install_requires. Falls back gracefully (no pin) if
the env var isn't set, so local dev builds still work.
- buildAIRWheels.yml: export MLIR_AIE_VERSION before pip wheel on both
the Linux and Windows jobs (Linux already had it in scope, just
needed `export`; Windows now reads it from the workflow output).
- buildAIRWheels.yml: simplify the release-page install snippet to a
single `pip install mlir_air -f ... -f ... -f ...` command. Surface
the pinned mlir_aie version as a header field for visibility.
- buildingRyzenLin.md: collapse install steps from clone-then-script-
then-three-pip-commands down to one pip install with three
--find-links. Add a separate one-liner for the no-RTTI variant.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AIR supports multiple backends (AIE, GPU, VCK5000); making mlir_aie a hard `Requires-Dist` would force it on users targeting other backends. Use the standard pip extras pattern instead — the AIE backend deps live under the `[aie]` extra and pip's METADATA records them via `Provides-Extra: aie` + `Requires-Dist: mlir_aie==X; extra == "aie"`. Same effect for AIE users (`pip install 'mlir_air[aie]' -f ... -f ...` resolves the pinned mlir_aie automatically) but `pip install mlir_air` on its own remains backend-agnostic. - setup.py: replace get_install_requires() with get_extras_require(); put mlir_aie + llvm-aie under extras["aie"]. - buildAIRWheels.yml + buildingRyzenLin.md: install command becomes `pip install 'mlir_air[aie]' ...`. Mention the extra explicitly so users know how to skip it for non-AIE backends. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit's [aie] extra never made it into the built wheel:
verified by inspecting the CI artifact for run 25460945722, whose
METADATA only listed Provides-Extra: dev (declared statically in
pyproject.toml). Per PEP 621, when a [project] field is declared
statically in pyproject.toml and not listed in `dynamic`, setuptools
ignores any value passed via setup.py — so our extras_require={"aie": …}
was being dropped.
Fix: add `optional-dependencies` to the `dynamic` list in pyproject.toml
and move the existing static `dev` extra into setup.py's
get_extras_require() alongside the build-time-injected `aie` extra.
A static + dynamic declaration of the same field is forbidden, so both
extras must live in one place.
Verified locally:
MLIR_AIE_VERSION=… ENABLE_RTTI=ON → aie: [mlir_aie==…, llvm-aie]
MLIR_AIE_VERSION=… ENABLE_RTTI=OFF → aie: [mlir_aie==….no.rtti, …]
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/buildingRyzenLin.mdso users canpip install mlir_airinstead of building MLIR-AIR from source. Renames the existing "Quick Start" section to "Build From Source Using Prebuilt Dependencies" — it was actually a source build that uses wheels only for LLVM/AIE/Peano dependencies, which was easy to confuse with a wheel install.latest-air-wheelsandlatest-air-wheels-no-rttitags via inlinebody:on the release action inbuildAIRWheels.yml. The release page currently shows just a list of.whlfiles with no usage instructions.Test plan
docs/buildingRyzenLin.mdrenders cleanly on the docs siteBuild mlir-air Wheelsworkflow (or wait for the next nightly cron) and verify the release body appears at https://github.com/Xilinx/mlir-air/releases/tag/latest-air-wheels and https://github.com/Xilinx/mlir-air/releases/tag/latest-air-wheels-no-rtti🤖 Generated with Claude Code