-
Notifications
You must be signed in to change notification settings - Fork 109
55 lines (51 loc) · 2 KB
/
benchmark.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
name: Benchmarking
on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Benchmark Test on os ${{ matrix.os }} and llvm ${{ matrix.llvm }} mode ${{ matrix.build }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
llvm: ["16", "17", "18"]
build: ["Release", "Debug"] # "RelWithDebInfo"
os: [openstack18]
timeout-minutes: 120
steps:
- name: add llvm
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-${{ matrix.llvm }} main" || true
sudo apt-get install -y python3-pip autoconf cmake gcc g++ libtool gfortran libblas-dev llvm-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }} libeigen3-dev libboost-dev
sudo python3 -m pip install lit pathlib
sudo touch /usr/lib/llvm-${{ matrix.llvm }}/bin/yaml-bench
- uses: actions/checkout@v4
- name: mkdir
run: rm -rf build && mkdir build
- name: cmake
working-directory: build
run: cmake ../enzyme -DLLVM_EXTERNAL_LIT=`which lit` -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
- name: make
working-directory: build
run: make -j `nproc` LLVMEnzyme-${{ matrix.llvm }}
- name: make bench-enzyme
working-directory: build
run: make bench-enzyme
- name: results
run: cat enzyme/benchmarks/*/*/results.txt
- name: graph results
if: github.event_name != 'pull_request' && matrix.build == 'Release'
run: |
for p in enzyme/benchmarks/ReverseMode/*/results.json; do
python3 enzyme/benchmarks/upload-results.py $p --url https://enzyme.mit.edu/cibench/api --token ${{ secrets.GRAPH_TOKEN }}
done