-
Notifications
You must be signed in to change notification settings - Fork 11
70 lines (59 loc) · 2.62 KB
/
run_bench.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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-kernel
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 --find-links https://iree.dev/pip-release-links.html iree-compiler iree-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/shark_conv.py
- 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/shark_conv.py --roofline results/iree_conv.csv --plot results/iree_conv_i8.png --dtype i8
python convbench/shark_conv.py --roofline results/iree_conv.csv --plot results/iree_conv_f32.png --dtype f32
python convbench/shark_conv.py --roofline results/iree_attention.csv --plot results/iree_attention_fp16.png --dtype f16
python convbench/shark_conv.py --roofline results/iree_attention.csv --plot results/iree_attention_fp8.png --dtype f8E4M3FNUZ
python convbench/shark_conv.py --roofline results/iree_gemm.csv --plot results/iree_gemm.png
python convbench/shark_conv.py --roofline results/iree_gemm_tk.csv --plot results/iree_gemm_tk.png
python convbench/shark_conv.py --roofline results/iree_gemm.csv,results/iree_gemm_tk.csv,results/iree_attention.csv,results/iree_conv.csv --plot results/combined.png
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: ./results/