Skip to content

Bump mlir-air to dfa6d08, drop mlir-aie-hash.txt#63

Merged
erwei-xilinx merged 2 commits into
amd:mainfrom
erwei-xilinx:update-air-wheel-via-aie-extra
May 8, 2026
Merged

Bump mlir-air to dfa6d08, drop mlir-aie-hash.txt#63
erwei-xilinx merged 2 commits into
amd:mainfrom
erwei-xilinx:update-air-wheel-via-aie-extra

Conversation

@erwei-xilinx

Copy link
Copy Markdown
Collaborator

Summary

  • Bump utils/mlir-air-hash.txt to dfa6d08 / 2026050805 (latest mlir-air no-rtti wheel).
  • Delete utils/mlir-aie-hash.txt. The new mlir-air wheel exposes a [aie] extra that pins the matching mlir_aie commit and requires llvm-aie, so we no longer need to maintain a separate aie hash file by hand.
  • Collapse the two-step pip install mlir_aie==... && pip install mlir_air==... flow in env_setup.sh, env_setup.ps1, setup.py's get_install_requires, and .github/workflows/build.yml into a single pip install "mlir_air[aie]==<ver>".

The new air wheel's METADATA contains:

Provides-Extra: aie
Requires-Dist: mlir_aie==0.0.1.2026050723+52dd9bc.no.rtti; extra == "aie"
Requires-Dist: llvm-aie; extra == "aie"

So mlir-air[aie]==0.0.1.2026050805+dfa6d08.no.rtti resolves the whole MLIR-AIE/AIR/LLVM-AIE stack with a guaranteed-compatible mlir-aie. The mlir-aie commit can never drift out of sync with mlir-air anymore.

The .ps1 script also previously referenced mlir-aie-hash-windows.txt, llvm-aie-hash-windows.txt, and mlir-air-hash-windows.txt -- none of which exist in utils/. The new single-install path uses the existing mlir-air-hash.txt so it actually works.

Test plan

  • pip install "mlir_air[aie]==0.0.1.2026050805+dfa6d08.no.rtti" in a fresh venv resolved mlir-air dfa6d08, the air-pinned mlir-aie 52dd9bc, and llvm-aie 21.0.0.2026050801+783f8625 in one shot.
  • setup.py:get_install_requires() returns ['mlir-air[aie]==0.0.1.2026050805+dfa6d08.no.rtti'].
  • CI build (build.yml) passes on the bumped versions.
  • NPU hardware tests (small.yml) pass.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 8, 2026 05:45
The new mlir-air wheel exposes a [aie] extra that pins the matching mlir_aie
commit (Requires-Dist: mlir_aie==<pinned>; extra == "aie") and requires
llvm-aie. Installing mlir-air[aie]==<ver> now resolves the whole
MLIR-AIE/AIR/LLVM-AIE stack with a guaranteed-compatible mlir-aie, so we no
longer need to maintain a separate mlir-aie-hash.txt that has to be kept in
sync by hand.

- utils/mlir-air-hash.txt: bump to dfa6d08 / 2026050805 (latest)
- utils/mlir-aie-hash.txt: deleted (resolved transitively via air's [aie] extra)
- utils/env_setup.sh, utils/env_setup.ps1: collapse two installs into one
  mlir_air[aie]==<ver> install. The .ps1 also previously read
  mlir-aie-hash-windows.txt / llvm-aie-hash-windows.txt /
  mlir-air-hash-windows.txt, none of which exist in utils/.
- setup.py: get_install_requires() now returns ['mlir-air[aie]==<ver>'].
- .github/workflows/build.yml: single install step using the extra.
- README.md / CLAUDE.md: documentation updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates Triton-XDNA’s MLIR dependency management by bumping the pinned mlir-air wheel version and switching to mlir_air[aie] so that mlir-aie and llvm-aie are resolved transitively, eliminating the need to maintain a separate mlir-aie hash file.

Changes:

  • Bump utils/mlir-air-hash.txt to commit dfa6d08 / timestamp 2026050805.
  • Delete utils/mlir-aie-hash.txt and collapse installs to a single pip install "mlir_air[aie]==..." flow.
  • Update setup scripts and CI to use the [aie] extra and adjust documentation accordingly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
utils/mlir-air-hash.txt Updates pinned mlir-air commit/timestamp used for installs.
utils/mlir-aie-hash.txt Removes now-unneeded separate mlir-aie pin file.
utils/env_setup.sh Switches to single-shot install via mlir_air[aie] and derives MLIR_AIE_INSTALL_DIR from the installed wheel.
utils/env_setup.ps1 Same as bash setup: single-shot [aie] install and working hash file reference.
setup.py Updates install_requires to depend on mlir-air[aie] only.
README.md Documents new pinning approach and transitive resolution behavior.
.github/workflows/build.yml Updates CI install step to use mlir_air[aie] instead of separate installs.
Comments suppressed due to low confidence (1)

.github/workflows/build.yml:68

  • In this step you compute MLIR_AIE_INSTALL_DIR_STR and write MLIR_AIE_INSTALL_DIR=... to $GITHUB_ENV, but the subsequent path exports use ${MLIR_AIE_INSTALL_DIR} (not set in the current shell), which will expand to empty and add incorrect /bin, PYTHONPATH, and LD_LIBRARY_PATH entries. Assign MLIR_AIE_INSTALL_DIR="$MLIR_AIE_INSTALL_DIR_STR" before using it (or consistently use *_STR for the path writes).
      # Set environmental variable "MLIR_AIE_INSTALL_DIR"
      MLIR_AIE_INSTALL_DIR_STR="$(python3 -m pip show mlir_aie | grep ^Location: | awk '{print $2}')/mlir_aie"
      echo "MLIR_AIE_INSTALL_DIR=$MLIR_AIE_INSTALL_DIR_STR" >> $GITHUB_ENV
      # Update paths in environmental variables
      echo "${MLIR_AIE_INSTALL_DIR}/bin" >> $GITHUB_PATH
      echo "PYTHONPATH=${MLIR_AIE_INSTALL_DIR}/python:$PYTHONPATH" >> $GITHUB_ENV
      echo "LD_LIBRARY_PATH=${MLIR_AIE_INSTALL_DIR}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread utils/env_setup.sh
Comment thread utils/env_setup.ps1
Comment thread utils/env_setup.sh Outdated
@erwei-xilinx

Copy link
Copy Markdown
Collaborator Author

Addressed Copilot review comments in dc69e79:

  • llvm-aie not upgraded (comment 1, comment 2): the [aie] extra requires llvm-aie without a version pin, so an existing installation silently satisfies it. Added an explicit pip install --upgrade llvm-aie -f .../nightly step in env_setup.sh, env_setup.ps1, and .github/workflows/build.yml (in CI also --force-reinstall). This matches the prior script behavior of always tracking the nightly llvm-aie wheel.
  • Unquoted ${SCRIPT_PATH} in dirname (comment 3): quoted it, plus also quoted the PATH/PYTHONPATH/LD_LIBRARY_PATH exports for consistency.

- env_setup.sh / env_setup.ps1 / build.yml: the mlir-air [aie] extra requires
  llvm-aie without a version pin, so an existing installation will silently
  satisfy the requirement and pip won't bump it to the nightly wheel. Add an
  explicit `pip install --upgrade llvm-aie` step (matching the prior script
  behavior) so llvm-aie always tracks nightly.
- env_setup.sh: quote ${SCRIPT_PATH} inside dirname and the PATH/PYTHONPATH/
  LD_LIBRARY_PATH exports so paths with spaces don't word-split.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erwei-xilinx erwei-xilinx merged commit 22c5a5a into amd:main May 8, 2026
2 of 3 checks passed
@erwei-xilinx erwei-xilinx deleted the update-air-wheel-via-aie-extra branch May 8, 2026 06:40
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