-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (51 loc) · 1.92 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
name: Build and Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
submodules_recursive: true
- name: Set up CMake
uses: jwlawson/actions-setup-cmake@v1
- name: Set up Ninja
uses: ashutoshvarma/setup-ninja@v1
- 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/ireekernelsbuild
cmake --build $GITHUB_WORKSPACE/ireekernelsbuild
- name: Build Main Project
run: |
cd $GITHUB_WORKSPACE
CXX=hipcc meson setup build --reconfigure
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
- name: Run RocBLAS Benchmarks
run: |
cd $GITHUB_WORKSPACE
source $GITHUB_WORKSPACE/venv/bin/activate
sudo $GITHUB_WORKSPACE/build/gemm-bench --device=0 &
./gb run --backends=rocblas --output=rocblas.hdf
sudo pkill -f gemm-bench
- name: Run IREE Benchmarks
run: |
cd $GITHUB_WORKSPACE
source $GITHUB_WORKSPACE/venv/bin/activate
sudo $GITHUB_WORKSPACE/build/gemm-bench --device=0 &
./gb run --backends=iree --output=iree.hdf
sudo pkill -f gemm-bench