blob: 63d6a418cab4944fe8bb18059956d9b1ade2efdc [file] [log] [blame] [edit]
name: Benchmarking
on:
push:
branches:
- main
pull_request:
branches:
- main
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: ["7", "8", "9", "10", "11", "12", "13"]
build: ["Release", "Debug"] # "RelWithDebInfo"
os: [self-hosted]
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/xenial/ llvm-toolchain-xenial-${{ matrix.llvm }} main" || true
sudo apt-get install -y python-pip autoconf cmake gcc g++ libtool gfortran libblas-dev llvm-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }} libeigen3-dev libboost-dev
sudo pip install lit
sudo touch /usr/lib/llvm-${{ matrix.llvm }}/bin/yaml-bench
if [[ '${{ matrix.llvm }}' == '13' ]]; then
sudo sed -i 's/add_executable(llvm-omp-device-info IMPORTED)//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
sudo sed -i 's/llvm-omp-device-info//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
fi
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: mkdir
run: cd enzyme && rm -rf build && mkdir build
- name: cmake
run: |
cd enzyme/build
cmake .. -DLLVM_EXTERNAL_LIT=`which lit` -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
- name: make
run: cd enzyme/build && make -j`nproc` LLVMEnzyme-${{ matrix.llvm }}
- name: make bench-enzyme
run: cd enzyme/build && make bench-enzyme
- name: results
run: cat enzyme/benchmarks/*/results.txt