Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a0eb6a1
fix PR template
andrej Nov 12, 2025
c144b5b
add CI
andrej Nov 12, 2025
164d3e6
only run extensive test suite on pushes to main
andrej Nov 12, 2025
d658884
add license to test docker script
andrej Nov 12, 2025
ae39df9
add missing build action
andrej Nov 12, 2025
86a04a3
fix env setup
andrej Nov 12, 2025
7745734
add missing scripts
andrej Nov 12, 2025
b74749b
update run_tests.py
andrej Nov 12, 2025
628f47e
acquire github runner registration token outside of runner
andrej Nov 12, 2025
0d26e9a
cleanup
andrej Nov 13, 2025
7f0d2ae
it's Docker, not chroot
andrej Nov 13, 2025
6e3931f
use absolute path for results directory
andrej Nov 13, 2025
cad513e
fix artifact upload path
andrej Nov 13, 2025
a7043cd
rename action
andrej Nov 13, 2025
970e381
only commit benchmark results on pushes to devel or main
andrej Nov 13, 2025
f08fb0a
fix the commit message
andrej Nov 13, 2025
cb03bfb
Rename `examples` to `operators`
andrej Nov 11, 2025
e2a6819
remove unused file
andrej Nov 12, 2025
f5ad011
rename examples to operators
andrej Nov 12, 2025
01e7736
add llama example
andrej Nov 12, 2025
6029581
add llama to CI
andrej Nov 12, 2025
8820283
use environment-variable-less config for llama
andrej Nov 12, 2025
fd59ea9
update llama test
andrej Nov 13, 2025
b0bb1a7
use absolute path for examples test
andrej Nov 13, 2025
c1ffc02
reformat
andrej Nov 13, 2025
02a98a6
add reuse spec
andrej Nov 13, 2025
56beda3
add CC0-1.0 license for shakespeare
andrej Nov 13, 2025
ed7c29b
add llama requirements
andrej Nov 13, 2025
acdb8d6
fix example permissions issue
andrej Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Describe the intent of your PR here.
## PR Merge Checklist

1. [ ] The PR is rebased on the latest `devel` commit and pointing to `devel`.
2. [ ] Your PR reviewed and approved.
2. [ ] Your PR has been reviewed and approved.
3. [ ] All checks are passing.
31 changes: 31 additions & 0 deletions .github/actions/build/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: "Build IRON"

inputs:
rebuild_flags:
required: false
default: ""
env_name:
required: false
default: "ci_env"
cmake_extra_flags:
required: false
default: ""

runs:
using: "composite"
steps:
- name: Build
env:
HOME: /workspace
shell: bash
run: |
source ${{ inputs.env_name }}/bin/activate
set -euxo pipefail
if [ -n "${{ inputs.cmake_extra_flags }}" ]; then
echo "Using extra CMake flags: ${{ inputs.cmake_extra_flags }}"
fi
cmake -B build -DCMAKE_BUILD_TYPE=Release -DIRONCLAD_AIE_TARGET=aie2p ${{ inputs.cmake_extra_flags }}
cmake --build build -- -j1 VERBOSE=1
118 changes: 118 additions & 0 deletions .github/actions/commit_results/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: "Commit Test Results to a Branch"

inputs:
pretty_flags:
required: false
default: "--metric='Latency (mean)' --metric='Bandwidth (mean)' --metric='GFLOP/s (mean)' -o pretty.md"
input_csv:
required: false
default: "tests_latest.csv"
branch:
required: false
default: "ci"
dir:
required: true

outputs:
results_dir:
description: "Absolute path to the directory containing generated test results"
value: ${{ steps.merge_results.outputs.results_dir }}

runs:
using: "composite"
steps:
- name: Format results and receive previous results from branch
id: merge_results
env:
HOME: /workspace
shell: bash
run: |
export DATE=$(printf '%(%Y_%m_%d_%H_%M_%S)T')
export COMMIT_SHA=$(git rev-parse --short HEAD)

./ci/scripts/pretty.py --date=${DATE} --commit=${COMMIT_SHA} ${{ inputs.pretty_flags }} ${{ inputs.input_csv }}

git fetch origin ${{ inputs.branch }}:${{ inputs.branch }}
git worktree add ../results ${{ inputs.branch }}

mkdir -p ../results/${{ inputs.dir }}
cp ${{ inputs.input_csv }} ../results/${{ inputs.dir }}/latest.csv
cp pretty.md ../results/${{ inputs.dir }}/readme.md
touch ../results/${{ inputs.dir }}/all.csv

RESULTS_DIR=$(realpath ../results/${{ inputs.dir }})

./ci/scripts/merge_all.py --all ${RESULTS_DIR}/all.csv --latest ${RESULTS_DIR}/latest.csv
./ci/scripts/pretty_trends.py ${RESULTS_DIR}/all.csv -o ${RESULTS_DIR}/trends.md

echo "commit_sha=${COMMIT_SHA}" >> $GITHUB_OUTPUT
echo "date=${DATE}" >> $GITHUB_OUTPUT
echo "results_dir=${RESULTS_DIR}" >> $GITHUB_OUTPUT

- name: Comment results on PR
if: ${{ startsWith(github.event_name, 'pull_request') }}
continue-on-error: true # This step will fail for PRs from forks because of permission issues; ignore
uses: actions/github-script@v7
with:
github-token: ${{ github.token }}
script: |
const fs = require('fs');
const commitSha = '${{ steps.merge_results.outputs.commit_sha }}';
const date = '${{ steps.merge_results.outputs.date }}';
const server = '${{ github.server_url }}';
const repo = '${{ github.repository }}';

let prettyContent = '';
try {
prettyContent = fs.readFileSync(`${{ steps.merge_results.outputs.results_dir }}/readme.md`, 'utf8');
} catch (error) {
prettyContent = 'Pretty output not available.';
}

// Read the trends.md content
let trendsContent = '';
try {
trendsContent = fs.readFileSync(`${{ steps.merge_results.outputs.results_dir }}/trends.md`, 'utf8');
} catch (error) {
trendsContent = 'Trends not available.';
}

const body = `<details>
<summary>📊 Test Results for ${process.env.GITHUB_WORKFLOW}</summary>

[${commitSha}](${server}/${repo}/commit/${commitSha}) (${date})

${prettyContent}

</details>

<details>
<summary>📈 Trends (vs main branch) for ${process.env.GITHUB_WORKFLOW}</summary>

[${commitSha}](${server}/${repo}/commit/${commitSha}) (${date})

${trendsContent}

</details>`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});

- name: Push new test results to branch
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/devel') }}
continue-on-error: true # This step will fail for PRs from forks because of permission issues; ignore
shell: bash
run: |
cd ../results
git add ${{ inputs.dir }}/all.csv ${{ inputs.dir }}/latest.csv ${{ inputs.dir }}/readme.md ${{ inputs.dir }}/trends.md
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -m "Add test results testing commit \`${{ steps.merge_results.outputs.commit_sha }}\` at ${{ steps.merge_results.outputs.date }}" || echo "No changes to commit"
git push origin ${{ inputs.branch }}
24 changes: 24 additions & 0 deletions .github/actions/prereqs/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: "Install IRONCLAD Prerequisites"

inputs:
env_name:
required: false
default: "ci_env"

runs:
using: "composite"
steps:
- name: Install Prerequisites
env:
HOME: /workspace
shell: bash
run: |
set -euxo pipefail
python3 -m venv ${{ inputs.env_name }}
source ${{ inputs.env_name }}/bin/activate
pip install --upgrade pip
env MLIR_PYTHON_EXTRAS_SET_VERSION="0.0.8.3" HOST_MLIR_PYTHON_PACKAGE_PREFIX="aie" pip install -r requirements.txt
echo "Prerequisites installed into ${{ inputs.env_name }}"
26 changes: 26 additions & 0 deletions .github/actions/test/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: "Run test suite"

inputs:
test_flags:
required: false
default: "--log tests.log --csv-latest tests_latest.csv"
env_name:
required: false
default: "ci_env"
build_dir:
required: false
default: "build"

runs:
using: "composite"
steps:
- name: Test
env:
HOME: /workspace
shell: "bash"
run: |
source ${{ inputs.env_name }}/bin/activate
./scripts/run_tests.py ${{ inputs.test_flags }} ${{ inputs.build_dir }}
1 change: 1 addition & 0 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
if: success() || failure()
shell: bash
run: |
reuse download --all
reuse lint

- name: Format Python
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/extensive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: Extensive Benchmark/Test Suite

on:
workflow_dispatch:
schedule:
- cron: '0 9 * * *' # 2 AM MT
push:
branches:
- main
- devel

# VJUNG: Introduce concurrency groups named with branch refs.
# VJUNG: If one pushes 5 times on its branch only the most recent commit will trigger CI.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Test:
runs-on: [self-hosted, docker]
steps:
- name: Pull
uses: actions/checkout@v4
env:
HOME: /workspace

- name: Prerequisites
uses: ./.github/actions/prereqs
with:
env_name: ci_env

- name: Build
uses: ./.github/actions/build
with:
env_name: ci_env
cmake_extra_flags: "-DEXTENSIVE_TESTING=ON"

- name: Test
id: test
continue-on-error: true
uses: ./.github/actions/test
with:
env_name: ci_env

- name: Commit test results
id: commit_results
env:
HOME: /workspace
uses: ./.github/actions/commit_results
with:
dir: extensive

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: results-extensive
path: ${{ steps.commit_results.outputs.results_dir }}
retention-days: 7

- name: Mark workflow as failed if tests failed
if: steps.test.outcome == 'failure'
run: exit 1
64 changes: 64 additions & 0 deletions .github/workflows/small.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-FileCopyrightText: Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: Small Benchmark/Test Suite

on:
pull_request:
workflow_dispatch:
push:
branches:
- main
- devel

# VJUNG: Introduce concurrency groups named with branch refs.
# VJUNG: If one pushes 5 times on its branch only the most recent commit will trigger CI.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Test:
runs-on: [self-hosted, docker]
steps:
- name: Pull
uses: actions/checkout@v4
env:
HOME: /workspace

- name: Prerequisites
uses: ./.github/actions/prereqs
with:
env_name: ci_env

- name: Build
uses: ./.github/actions/build
with:
env_name: ci_env

- name: Test
id: test
continue-on-error: true
uses: ./.github/actions/test
with:
env_name: ci_env

- name: Commit test results
id: commit_results
env:
HOME: /workspace
uses: ./.github/actions/commit_results
with:
dir: small

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: results-small
path: ${{ steps.commit_results.outputs.results_dir }}
retention-days: 7

- name: Mark workflow as failed if tests failed
if: steps.test.outcome == 'failure'
run: exit 1

Loading
Loading