Skip to content

Document prebuilt wheel install path#1587

Merged
erwei-xilinx merged 6 commits into
Xilinx:mainfrom
erwei-xilinx:docs-wheel-install-instructions
May 6, 2026
Merged

Document prebuilt wheel install path#1587
erwei-xilinx merged 6 commits into
Xilinx:mainfrom
erwei-xilinx:docs-wheel-install-instructions

Conversation

@erwei-xilinx
Copy link
Copy Markdown
Collaborator

Summary

  • Add a wheel-first install section to docs/buildingRyzenLin.md so users can pip install mlir_air instead 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.
  • Populate the GitHub release description for both latest-air-wheels and latest-air-wheels-no-rtti tags via inline body: on the release action in buildAIRWheels.yml. The release page currently shows just a list of .whl files with no usage instructions.
  • Document the RTTI / no-RTTI choice — both variants are released so downstream projects can match their LLVM build configuration without rebuilding MLIR-AIR from source.

Test plan

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 6, 2026 20:17
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.yml so latest-air-wheels / latest-air-wheels-no-rtti releases 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.

Comment thread docs/buildingRyzenLin.md Outdated
Comment thread .github/workflows/buildAIRWheels.yml Outdated
Comment thread .github/workflows/buildAIRWheels.yml
Comment thread .github/workflows/buildAIRWheels.yml Outdated
erwei-xilinx and others added 5 commits May 6, 2026 13:33
- 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>
@erwei-xilinx erwei-xilinx added this pull request to the merge queue May 6, 2026
Merged via the queue into Xilinx:main with commit 9a01514 May 6, 2026
28 of 29 checks passed
@erwei-xilinx erwei-xilinx deleted the docs-wheel-install-instructions branch May 6, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants