Skip to content

Commit 14df2e1

Browse files
erwei-xilinxclaude
andcommitted
Document prebuilt wheel install path
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>
1 parent fd62d7c commit 14df2e1

2 files changed

Lines changed: 131 additions & 1 deletion

File tree

.github/workflows/buildAIRWheels.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,35 @@ jobs:
263263
allowUpdates: true
264264
replacesArtifacts: true
265265
makeLatest: ${{ github.event_name == 'push' }}
266+
body: |
267+
## MLIR-AIR Wheels
268+
269+
**Latest commit:** `${{ needs.get-air-project-commit.outputs.AIR_PROJECT_COMMIT }}`
270+
**Platforms:** Linux x86_64 (Python 3.10–3.14), Windows AMD64 (Python 3.10–3.12)
271+
272+
### Installation
273+
274+
```bash
275+
# MLIR-AIR (default: RTTI enabled)
276+
pip install mlir_air -f https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-air-wheels
277+
278+
# MLIR-AIE
279+
pip install mlir_aie -f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels-3
280+
281+
# Peano (llvm-aie) — AIE backend compiler
282+
pip install llvm-aie -f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
283+
```
284+
285+
### RTTI / no-RTTI Variants
286+
287+
Both RTTI-enabled and RTTI-disabled wheels are released for downstream integration convenience:
288+
289+
- [`latest-air-wheels`](https://github.com/Xilinx/mlir-air/releases/tag/latest-air-wheels) — RTTI **on**. Default; use this for standalone development.
290+
- [`latest-air-wheels-no-rtti`](https://github.com/Xilinx/mlir-air/releases/tag/latest-air-wheels-no-rtti) — RTTI **off**. For integrating MLIR-AIR into a downstream project whose LLVM is built with `-DLLVM_ENABLE_RTTI=OFF`. Pair with `mlir_aie` from [`latest-wheels-no-rtti`](https://github.com/Xilinx/mlir-aie/releases/tag/latest-wheels-no-rtti).
291+
292+
When mixing wheels into a downstream build, all three of `mlir`, `mlir_aie`, and `mlir_air` must agree on RTTI.
293+
294+
Full setup guide: [docs/buildingRyzenLin.md](https://github.com/Xilinx/mlir-air/blob/main/docs/buildingRyzenLin.md#install-prebuilt-wheels-recommended)
266295
267296
build-windows:
268297
name: Build and upload mlir_air wheels (Windows)
@@ -419,3 +448,32 @@ jobs:
419448
allowUpdates: true
420449
replacesArtifacts: true
421450
makeLatest: ${{ github.event_name == 'push' }}
451+
body: |
452+
## MLIR-AIR Wheels
453+
454+
**Latest commit:** `${{ needs.get-air-project-commit.outputs.AIR_PROJECT_COMMIT }}`
455+
**Platforms:** Linux x86_64 (Python 3.10–3.14), Windows AMD64 (Python 3.10–3.12)
456+
457+
### Installation
458+
459+
```bash
460+
# MLIR-AIR (default: RTTI enabled)
461+
pip install mlir_air -f https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-air-wheels
462+
463+
# MLIR-AIE
464+
pip install mlir_aie -f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels-3
465+
466+
# Peano (llvm-aie) — AIE backend compiler
467+
pip install llvm-aie -f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
468+
```
469+
470+
### RTTI / no-RTTI Variants
471+
472+
Both RTTI-enabled and RTTI-disabled wheels are released for downstream integration convenience:
473+
474+
- [`latest-air-wheels`](https://github.com/Xilinx/mlir-air/releases/tag/latest-air-wheels) — RTTI **on**. Default; use this for standalone development.
475+
- [`latest-air-wheels-no-rtti`](https://github.com/Xilinx/mlir-air/releases/tag/latest-air-wheels-no-rtti) — RTTI **off**. For integrating MLIR-AIR into a downstream project whose LLVM is built with `-DLLVM_ENABLE_RTTI=OFF`. Pair with `mlir_aie` from [`latest-wheels-no-rtti`](https://github.com/Xilinx/mlir-aie/releases/tag/latest-wheels-no-rtti).
476+
477+
When mixing wheels into a downstream build, all three of `mlir`, `mlir_aie`, and `mlir_air` must agree on RTTI.
478+
479+
Full setup guide: [docs/buildingRyzenLin.md](https://github.com/Xilinx/mlir-air/blob/main/docs/buildingRyzenLin.md#install-prebuilt-wheels-recommended)

docs/buildingRyzenLin.md

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,78 @@
11
# Getting Started and Running on Linux Ryzen™ AI
22

3-
## Quick Start: Build with Prebuilt Wheels
3+
## Install Prebuilt Wheels (Recommended)
4+
5+
The fastest way to get MLIR-AIR is to install the prebuilt wheel — no source build, no CMake, no LLVM clone. Use this path unless you need to modify MLIR-AIR itself or run on an unsupported Python/platform.
6+
7+
### Prerequisites
8+
9+
- **Python 3.10–3.14** on Linux x86_64, or **Python 3.10–3.12** on Windows AMD64
10+
- **pip**
11+
- **XRT** (optional, required only for running on hardware) — see [mlir-aie's XRT install instructions](https://github.com/Xilinx/mlir-aie#install-the-xdna-driver-and-xrt)
12+
13+
### Steps
14+
15+
1. **Create a virtual environment:**
16+
```bash
17+
python3 -m venv airenv
18+
source airenv/bin/activate
19+
pip install --upgrade pip
20+
```
21+
22+
2. **Install MLIR-AIR and its companion wheels:**
23+
```bash
24+
# MLIR-AIR (default: RTTI-enabled)
25+
pip install mlir_air -f https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-air-wheels
26+
27+
# MLIR-AIE
28+
pip install mlir_aie -f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels-3
29+
30+
# Peano (llvm-aie) — AIE backend compiler
31+
pip install llvm-aie -f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
32+
```
33+
34+
3. **Set up environment variables** (paths derived from `pip show`):
35+
```bash
36+
export MLIR_AIR_INSTALL_DIR=$(python3 -m pip show mlir_air | grep ^Location: | awk '{print $2}')/mlir_air
37+
export MLIR_AIE_INSTALL_DIR=$(python3 -m pip show mlir_aie | grep ^Location: | awk '{print $2}')/mlir_aie
38+
export PEANO_INSTALL_DIR=$(python3 -m pip show llvm-aie | grep ^Location: | awk '{print $2}')/llvm-aie
39+
40+
export PATH=$MLIR_AIR_INSTALL_DIR/bin:$MLIR_AIE_INSTALL_DIR/bin:$PATH
41+
export PYTHONPATH=$MLIR_AIR_INSTALL_DIR/python:$MLIR_AIE_INSTALL_DIR/python:$PYTHONPATH
42+
export LD_LIBRARY_PATH=$MLIR_AIR_INSTALL_DIR/lib:$MLIR_AIE_INSTALL_DIR/lib:$LD_LIBRARY_PATH
43+
44+
# Only if you have XRT installed:
45+
source /opt/xilinx/xrt/setup.sh
46+
```
47+
48+
4. **Verify the install:**
49+
```bash
50+
air-opt --help
51+
```
52+
53+
You can now jump to [Running a Quick Example](#running-a-quick-example) below.
54+
55+
### Choosing a Wheel Release
56+
57+
| Tag | When to use |
58+
|-----|-------------|
59+
| [`latest-air-wheels`](https://github.com/Xilinx/mlir-air/releases/tag/latest-air-wheels) | Default. RTTI enabled. Use this for standalone development. |
60+
| [`latest-air-wheels-no-rtti`](https://github.com/Xilinx/mlir-air/releases/tag/latest-air-wheels-no-rtti) | For integrating MLIR-AIR into a downstream project whose LLVM is built with `-DLLVM_ENABLE_RTTI=OFF`. Pair with `mlir_aie` from `latest-wheels-no-rtti`. |
61+
| [`v*.*.*`](https://github.com/Xilinx/mlir-air/releases) (e.g. `v1.0.0`) | Pinned tagged release, for reproducible builds: `pip install mlir_air==<ver> -f https://github.com/Xilinx/mlir-air/releases/expanded_assets/v<ver>` |
62+
63+
We release **both RTTI and no-RTTI variants** so downstream projects can match their LLVM build configuration without having to rebuild MLIR-AIR from source. When mixing wheels into a downstream build, all three (`mlir`, `mlir_aie`, `mlir_air`) must agree on RTTI.
64+
65+
### Running Examples Against a Wheel Install
66+
67+
When checking out the MLIR-AIR repo to run programming examples, sync to the commit hash embedded in the wheel filename (`mlir_air-0.0.1.{DATETIME}+{HASH}-...`) so the example sources match the installed compiler.
68+
69+
If the wheel install path doesn't fit your needs, see the source-build instructions below.
70+
71+
---
72+
73+
## Build From Source Using Prebuilt Dependencies
74+
75+
This path builds MLIR-AIR from source but installs LLVM, MLIR-AIE, and Peano from prebuilt wheels — useful when you're hacking on MLIR-AIR itself but don't want to also rebuild its dependencies.
476

577
### Prerequisites
678

0 commit comments

Comments
 (0)