Skip to content

Commit dc69e79

Browse files
erwei-xilinxclaude
andcommitted
Address PR feedback: force-upgrade llvm-aie, quote SCRIPT_PATH
- 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>
1 parent 7ddff34 commit dc69e79

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
-f https://github.com/Xilinx/mlir-air/releases/expanded_assets/latest-air-wheels-no-rtti \
5858
-f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels-no-rtti \
5959
-f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
60+
# The [aie] extra requires llvm-aie without a version pin. Force an
61+
# upgrade so we always test against the latest nightly wheel.
62+
python3 -m pip install --upgrade --force-reinstall llvm-aie -f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
6063
python3 -m pip show llvm-aie
6164
python3 -m pip show mlir_aie
6265
# Set environmental variable "MLIR_AIE_INSTALL_DIR"

utils/env_setup.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ python -m pip install "mlir_air[aie]==$MLIR_AIR_VERSION.$MLIR_AIR_TIMESTAMP+$SHO
4242
-f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels-no-rtti `
4343
-f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
4444

45+
# The [aie] extra requires llvm-aie without a version pin. To track the
46+
# nightly wheel, force-upgrade llvm-aie explicitly so an existing installation
47+
# doesn't silently satisfy the unpinned requirement.
48+
python -m pip install --upgrade llvm-aie `
49+
-f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
50+
4551
if (-not $env:MLIR_AIE_INSTALL_DIR) {
4652
$MLIR_AIE_INSTALL_DIR = (python -c "import importlib.util; spec = importlib.util.find_spec('mlir_aie'); print(spec.submodule_search_locations[0])")
4753
$env:MLIR_AIE_INSTALL_DIR = $MLIR_AIE_INSTALL_DIR

utils/env_setup.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
88
# Install mlir-air with the [aie] extra. The mlir-air wheel pins the matching
99
# mlir-aie commit and requires llvm-aie, so a single pip install resolves the
1010
# whole MLIR-AIE/AIR/LLVM-AIE stack with a guaranteed-compatible mlir-aie.
11-
MLIR_AIR_HASH_FILE="$(dirname ${SCRIPT_PATH})/mlir-air-hash.txt"
11+
MLIR_AIR_HASH_FILE="$(dirname "${SCRIPT_PATH}")/mlir-air-hash.txt"
1212
MLIR_AIR_COMMIT_HASH=$(awk -v kw="Commit:" '$0 ~ kw {for (i=1; i<NF; i++) if ($i == kw) print $(i+1)}' "$MLIR_AIR_HASH_FILE")
1313
SHORT_MLIR_AIR_COMMIT_HASH="${MLIR_AIR_COMMIT_HASH:0:7}"
1414
echo "Using mlir-air hash: $SHORT_MLIR_AIR_COMMIT_HASH"
@@ -21,10 +21,16 @@ python3 -m pip install "mlir_air[aie]==$MLIR_AIR_VERSION.$MLIR_AIR_TIMESTAMP+$SH
2121
-f https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels-no-rtti \
2222
-f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
2323

24-
if [[ $MLIR_AIE_INSTALL_DIR == "" ]]; then
24+
# The [aie] extra requires llvm-aie without a version pin. To track the
25+
# nightly wheel (matching the prior env_setup.sh behavior), force-upgrade
26+
# llvm-aie explicitly so an existing installation doesn't silently satisfy
27+
# the unpinned requirement.
28+
python3 -m pip install --upgrade llvm-aie -f https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
29+
30+
if [[ "$MLIR_AIE_INSTALL_DIR" == "" ]]; then
2531
export MLIR_AIE_INSTALL_DIR="$(python3 -m pip show mlir_aie | grep ^Location: | awk '{print $2}')/mlir_aie"
2632
fi
2733

28-
export PATH=${MLIR_AIE_INSTALL_DIR}/bin:${PATH}
29-
export PYTHONPATH=${MLIR_AIE_INSTALL_DIR}/python:${PYTHONPATH}
30-
export LD_LIBRARY_PATH=${MLIR_AIE_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}
34+
export PATH="${MLIR_AIE_INSTALL_DIR}/bin:${PATH}"
35+
export PYTHONPATH="${MLIR_AIE_INSTALL_DIR}/python:${PYTHONPATH}"
36+
export LD_LIBRARY_PATH="${MLIR_AIE_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}"

0 commit comments

Comments
 (0)