Skip to content

Performance

Performance #178

Workflow file for this run

name: Performance
on:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 9 * * *"
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
# queued and in-progress runs for the same PR (presubmit) or commit
# (postsubmit). The workflow name is prepended to avoid conflicts between
# different workflows.
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
jobs:
benchmark:
runs-on: mi300
steps:
- name: "Checkout Repo"
uses: actions/checkout@v4
- name: Setup venv
run: |
python3.11 -m venv bench_venv
source bench_venv/bin/activate
pip install --upgrade pip
pip install --pre --no-cache-dir --find-links https://iree.dev/pip-release-links.html iree-base-compiler iree-base-runtime --upgrade
pip install -r requirements.txt
pip install --no-compile --pre --upgrade -e common_tools
pip install iree-turbine@git+https://github.com/iree-org/iree-turbine.git@main
- name: Convolutions
run: |
source bench_venv/bin/activate
python convbench/conv_bench.py
- name: TK Convolutions
run: |
source bench_venv/bin/activate
python convbench/conv_bench.py --tk
- name: Attention
run: |
source bench_venv/bin/activate
python attentionbench/attention_bench.py
- name: TK GEMM
run: |
source bench_venv/bin/activate
python gemmbench/gemm_bench.py --tk
- name: GEMM
run: |
source bench_venv/bin/activate
python gemmbench/gemm_bench.py
- name: Roofline Plots
run: |
source bench_venv/bin/activate
python convbench/conv_bench.py --roofline results/iree_conv.csv --plot results/iree_conv_i8.png --dtype i8
python convbench/conv_bench.py --roofline results/iree_conv.csv --plot results/iree_conv_f16.png --dtype f16
python convbench/conv_bench.py --roofline results/iree_conv_tk.csv --plot results/iree_conv_tk_i8.png --dtype i8
python convbench/conv_bench.py --roofline results/iree_conv_tk.csv --plot results/iree_conv_tk_f16.png --dtype f16
python convbench/conv_bench.py --roofline results/iree_attention.csv --plot results/iree_attention_fp16.png --dtype f16
python convbench/conv_bench.py --roofline results/iree_attention.csv --plot results/iree_attention_fp8.png --dtype f8E4M3FNUZ
python convbench/conv_bench.py --roofline results/iree_gemm.csv --plot results/iree_gemm.png
python convbench/conv_bench.py --roofline results/iree_gemm_tk.csv --plot results/iree_gemm_tk.png
python convbench/conv_bench.py --roofline results/iree_gemm.csv,results/iree_gemm_tk.csv,results/iree_attention.csv,results/iree_conv.csv,results/iree_conv_tk.csv --plot results/combined.png
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: ./results/