Skip to content

Commit f39e60a

Browse files
authored
Merge 397cb43 into d9a64c5
2 parents d9a64c5 + 397cb43 commit f39e60a

3 files changed

Lines changed: 131 additions & 2 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SPDX-FileCopyrightText: Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Test mlir-aie wheels
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
wheels-version:
10+
description: 'mlir-aie version to test (e.g., 0.0.1.2025071717+c5b3be6). Use "latest" to install the newest version available.'
11+
required: true
12+
default: 'latest'
13+
14+
jobs:
15+
test:
16+
runs-on: [self-hosted, docker]
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
env:
21+
HOME: /workspace
22+
23+
- name: Prerequisites
24+
uses: ./.github/actions/prereqs
25+
with:
26+
env_name: ci_env
27+
28+
- name: Install wheels
29+
shell: bash
30+
env:
31+
HOME: /workspace
32+
run: |
33+
set -euxo pipefail
34+
source ci_env/bin/activate
35+
WHEELS_URL="https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels-2"
36+
if [[ "${{ github.event.inputs.wheels-version }}" == "latest" ]]; then
37+
pip install --upgrade mlir-aie --find-links ${WHEELS_URL}
38+
else
39+
pip install --upgrade mlir-aie==${{ github.event.inputs.wheels-version }} --find-links ${WHEELS_URL}
40+
fi
41+
42+
- name: Build
43+
uses: ./.github/actions/build
44+
with:
45+
env_name: ci_env
46+
cmake_extra_flags: "-DBUILD_APPLICATIONS=OFF -DBUILD_EXAMPLES=ON"
47+
48+
- name: Test
49+
id: test
50+
continue-on-error: true
51+
uses: ./.github/actions/test
52+
with:
53+
env_name: ci_env
54+
55+
- name: Mark workflow as failed if tests failed
56+
if: steps.test.outcome == 'failure'
57+
run: exit 1
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# SPDX-FileCopyrightText: Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
name: Check for new mlir-aie release
5+
6+
on:
7+
workflow_dispatch: # Allow manual triggering
8+
schedule:
9+
- cron: '0 10 * * *' # Run every day at 10 AM UTC (3 AM Mountain)
10+
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
jobs:
16+
check-and-update:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.x'
26+
27+
- name: Get current mlir-aie version
28+
id: current_version
29+
run: |
30+
version=$(grep 'mlir_aie==' requirements.txt | cut -d'=' -f3)
31+
echo "Current version: $version"
32+
echo "version=$version" >> $GITHUB_OUTPUT
33+
34+
- name: Get latest mlir-aie release
35+
id: latest_release
36+
run: |
37+
latest_tag_with_v=$(curl -s "https://api.github.com/repos/Xilinx/mlir-aie/releases/latest" | jq '.tag_name')
38+
latest_tag=${latest_tag_with_v#v}
39+
echo "Latest tag: $latest_tag"
40+
echo "tag=$latest_tag" >> $GITHUB_OUTPUT
41+
42+
- name: Compare versions and create PR
43+
if: steps.current_version.outputs.version != steps.latest_release.outputs.tag
44+
env:
45+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
run: |
47+
echo "New version found: ${{ steps.latest_release.outputs.tag }}. Current version is ${{ steps.current_version.outputs.version }}."
48+
49+
# Configure git
50+
git config --global user.name 'github-actions[bot]'
51+
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
52+
53+
# Create new branch
54+
new_branch="update-mlir-aie-to-v${{ steps.latest_release.outputs.tag }}"
55+
git checkout -b $new_branch
56+
57+
# Update requirements.txt
58+
sed -i "s|/v${{ steps.current_version.outputs.version }}/|/v${{ steps.latest_release.outputs.tag }}/|" requirements.txt
59+
60+
# Commit changes
61+
git add requirements.txt
62+
git commit -m "Update mlir-aie to version ${{ steps.latest_release.outputs.tag }}"
63+
64+
# Push changes
65+
git push --set-upstream origin $new_branch
66+
67+
# Create Pull Request
68+
gh pr create --base main --head $new_branch --title "Update mlir-aie to v${{ steps.latest_release.outputs.tag }}" --body "This PR updates the mlir-aie version to the latest release."
69+
70+
- name: No new version found
71+
if: steps.current_version.outputs.version == steps.latest_release.outputs.tag
72+
run: echo "mlir-aie is already at the latest version (${{ steps.current_version.outputs.version }})."

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
# version of torch (don't need CUDA), so we give this index precedence over the
77
# main PyPI. These indices are consulted in order of precedence by pip.
88
--index-url https://download.pytorch.org/whl/cpu
9-
--extra-index-url https://github.com/Xilinx/mlir-aie/releases/expanded_assets/latest-wheels-2
9+
--extra-index-url https://github.com/Xilinx/mlir-aie/releases/expanded_assets/v1.1.3-alpha2
1010
--extra-index-url https://github.com/Xilinx/llvm-aie/releases/expanded_assets/nightly
1111
--extra-index-url https://pypi.org/simple
1212

13-
mlir_aie
13+
mlir_aie==1.1.3-alpha2
1414
llvm-aie
1515

1616
black

0 commit comments

Comments
 (0)