Update Enzyme.cpp #4659
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Enzyme CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
jobs: | |
build-linux: | |
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
llvm: ["11", "12", "13", "14", "15", "16"] | |
build: ["Release", "Debug"] # "RelWithDebInfo" | |
os: [ubuntu-20.04] | |
timeout-minutes: 30 | |
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 cmake gcc g++ llvm-${{ matrix.llvm }}-dev libzstd-dev | |
sudo python3 -m pip install --upgrade pip lit | |
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@v3 | |
- name: mkdir | |
run: rm -rf build && mkdir build | |
- name: cmake | |
working-directory: build | |
run: cmake ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm | |
- name: make | |
working-directory: build | |
run: make -j `nproc` | |
- name: make check-typeanalysis | |
working-directory: build | |
run: make -j `nproc` check-typeanalysis | |
- name: make check-activityanalysis | |
working-directory: build | |
run: make -j `nproc` check-activityanalysis | |
- name: make check-enzyme | |
working-directory: build | |
run: make -j `nproc` check-enzyme-bench | |
- name: graph results | |
if: github.event_name != 'pull_request' && matrix.build == 'Release' | |
run: python3 enzyme/test/upload-results.py build/test/Enzyme/results.json --url https://enzyme.mit.edu/cibench/api --token ${{ secrets.GRAPH_TOKEN }} | |
build-macos: | |
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
llvm: ["11", "12", "13", "14", "15"] | |
build: ["Release", "Debug"] # "RelWithDebInfo" | |
timeout-minutes: 30 | |
steps: | |
- name: add llvm | |
run: | | |
brew update | |
brew install llvm@${{ matrix.llvm }} make cmake | |
sudo python3 -m pip install --upgrade pip lit requests | |
- uses: actions/checkout@v3 | |
- name: mkdir | |
run: rm -rf build && mkdir build | |
- name: cmake | |
working-directory: build | |
run: cmake ../enzyme -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm | |
- name: make | |
working-directory: build | |
run: make -j 3 | |
- name: make check-typeanalysis | |
working-directory: build | |
run: make -j 3 check-typeanalysis | |
- name: make check-activityanalysis | |
working-directory: build | |
run: make -j 3 check-activityanalysis | |
- name: make check-enzyme | |
working-directory: build | |
run: make -j3 check-enzyme-bench | |
- name: graph results | |
if: github.event_name != 'pull_request' && matrix.build == 'Release' | |
run: python3 enzyme/test/upload-results.py build/test/Enzyme/results.json --url https://enzyme.mit.edu/cibench/api --token ${{ secrets.GRAPH_TOKEN }} | |
build-xcode: | |
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS XCode | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
llvm: ["13"] #, "14"] | |
build: ["Release"] # "RelWithDebInfo" | |
timeout-minutes: 30 | |
steps: | |
- name: add llvm | |
run: | | |
brew install llvm@${{ matrix.llvm }} make cmake gcc | |
sudo python3 -m pip install --upgrade pip lit | |
- uses: actions/checkout@v3 | |
- name: mkdir | |
run: rm -rf build && mkdir build | |
- name: cmake | |
working-directory: build | |
run: | | |
cmake ../enzyme -GXcode -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm | |
cmake --build . --parallel 3 |