-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (73 loc) · 2.61 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Build and Test
on:
pull_request:
schedule:
- cron: '0 8 * * *'
jobs:
build:
runs-on: mi300
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Update IREE
run: |
cd $GITHUB_WORKSPACE/third_party/iree
git submodule update --init
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1
- name: Set up Ninja
uses: ashutoshvarma/setup-ninja@v1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: Build LLVM Project
run: |
cd $GITHUB_WORKSPACE/third_party/llvm-project
cmake -G Ninja -B $GITHUB_WORKSPACE/third_party/llvm-project/build/ -S llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="mlir;clang"
cmake --build $GITHUB_WORKSPACE/third_party/llvm-project/build/
- name: Build IREE Kernels
run: |
cd $GITHUB_WORKSPACE/src/ireekernels
cmake -G Ninja -B $GITHUB_WORKSPACE/src/ireekernelsbuild
cmake --build $GITHUB_WORKSPACE/src/ireekernelsbuild
- name: Build Main Project
run: |
cd $GITHUB_WORKSPACE
CXX=hipcc meson setup build
cd $GITHUB_WORKSPACE/build
sudo ninja
cd $GITHUB_WORKSPACE
- name: Set up Python environment
run: |
python3 -m venv $GITHUB_WORKSPACE/venv
source $GITHUB_WORKSPACE/venv/bin/activate
pip install -r $GITHUB_WORKSPACE/gemmbench/requirements.txt
deactivate
- name: Run RocBLAS Benchmarks
run: |
sudo pkill -f gemm-bench
cd $GITHUB_WORKSPACE
source $GITHUB_WORKSPACE/venv/bin/activate
for device in $(seq 3 7); do (sudo $GITHUB_WORKSPACE/build/gemm-bench --device=$device &); done
./gb run --backends=rocblas --output=rocblas.hdf
sudo pkill -f gemm-bench
deactivate
- name: Run IREE Benchmarks
run: |
cd $GITHUB_WORKSPACE
source $GITHUB_WORKSPACE/venv/bin/activate
for device in $(seq 3 7); do (sudo $GITHUB_WORKSPACE/build/gemm-bench --device=$device &); done
./gb run --backends=iree --output=iree.hdf
sudo pkill -f gemm-bench
deactivate
- name: Upload IREE benchmark results
uses: actions/upload-artifact@v4
with:
name: iree-benchmark-results
path: iree.hdf
- name: Upload RocBLAS benchmark results
uses: actions/upload-artifact@v4
with:
name: rocblas-benchmark-results
path: rocblas.hdf