Skip to content

Commit 63eba0f

Browse files
committed
Merge commit '7cf183268d369ed113daabb344d87668005eb541' as 'src/tools/enzyme'
2 parents 1491e5c + 7cf1832 commit 63eba0f

File tree

1,229 files changed

+2159549
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,229 files changed

+2159549
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// available ubuntu versions: [18, 20]
2+
// available llvm versions: [7, 8, 9, 10, 11, 12, 13]
3+
{
4+
"name": "Enzyme",
5+
"image": "ghcr.io/enzymead/enzyme-dev-docker/ubuntu-20-llvm-12:latest",
6+
"mounts": [
7+
"source=enzyme-bashhistory,target=/commandhistory,type=volume",
8+
"source=enzyme-extensions,target=/root/.vscode-server/extensions,type=volume",
9+
"source=enzyme-extensions-insiders,target=/root/.vscode-server-insiders/extensions,type=volume",
10+
"source=enzyme-build,target=${containerWorkspaceFolder}/enzyme/build,type=volume",
11+
],
12+
"postCreateCommand": "sudo chown vscode ./enzyme/build"
13+
}

src/tools/enzyme/.gitattributes

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/LICENSE export-ignore
2+
/Readme.md export-ignore
3+
/clang export-ignore
4+
/clang-tools-extra export-ignore
5+
/compiler-rt export-ignore
6+
/contrib export-ignore
7+
/debuginfo-tests export-ignore
8+
/libcxx export-ignore
9+
/libcxxabi export-ignore
10+
/libunwind export-ignore
11+
/lld export-ignore
12+
/lldb export-ignore
13+
/llvm export-ignore
14+
/openmp export-ignore
15+
/polly export-ignore
16+
/tests export-ignore
17+
/enzyme/benchmarks export-ignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Bitcode loading CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Bitcode loading CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
llvm: ["7", "8", "9", "10", "11", "12", "13"] #, "14"]
14+
build: ["Release"] # "RelWithDebInfo"
15+
os: [ubuntu-20.04, ubuntu-18.04]
16+
17+
exclude:
18+
# How to install FileCheck on ubuntu-18.04?
19+
- os: ubuntu-18.04
20+
llvm: 8
21+
22+
timeout-minutes: 30
23+
steps:
24+
- name: add llvm
25+
run: |
26+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
27+
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
28+
sudo apt-get install -y autoconf cmake gcc g++ libtool gfortran llvm-${{ matrix.llvm }}-dev libomp-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }} libclang-${{ matrix.llvm }}-dev libeigen3-dev libboost-dev
29+
sudo python3 -m pip install --upgrade pip setuptools
30+
sudo python3 -m pip install lit
31+
sudo touch /usr/lib/llvm-${{ matrix.llvm }}/bin/yaml-bench
32+
if [[ '${{ matrix.llvm }}' == '7' || '${{ matrix.llvm }}' == '8' || '${{ matrix.llvm }}' == '9' ]]; then
33+
sudo apt-get install -y llvm-${{ matrix.llvm }}-tools
34+
fi
35+
if [[ '${{ matrix.llvm }}' == '13' ]]; then
36+
sudo sed -i 's/add_executable(llvm-omp-device-info IMPORTED)//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
37+
sudo sed -i 's/llvm-omp-device-info//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
38+
fi
39+
- uses: actions/checkout@v1
40+
with:
41+
fetch-depth: 1
42+
- name: mkdir
43+
run: cd enzyme && rm -rf build && mkdir build
44+
- name: cmake
45+
run: |
46+
cd enzyme/build
47+
cmake .. -DLLVM_EXTERNAL_LIT=`which lit` -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
48+
- name: make check-bcpass
49+
run: cd enzyme/build && make check-bcpass -j`nproc`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Benchmarking
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
name: Benchmark Test on os ${{ matrix.os }} and llvm ${{ matrix.llvm }} mode ${{ matrix.build }}
18+
runs-on: ${{ matrix.os }}
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
llvm: ["7", "8", "9", "10", "11", "12", "13"] #, "14"]
24+
build: ["Release", "Debug"] # "RelWithDebInfo"
25+
os: [self-hosted]
26+
timeout-minutes: 120
27+
steps:
28+
- name: add llvm
29+
run: |
30+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
31+
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
32+
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
33+
sudo pip install lit pathlib
34+
sudo touch /usr/lib/llvm-${{ matrix.llvm }}/bin/yaml-bench
35+
if [[ '${{ matrix.llvm }}' == '13' ]]; then
36+
sudo sed -i 's/add_executable(llvm-omp-device-info IMPORTED)//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
37+
sudo sed -i 's/llvm-omp-device-info//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
38+
fi
39+
- uses: actions/checkout@v1
40+
with:
41+
fetch-depth: 1
42+
- name: mkdir
43+
run: cd enzyme && rm -rf build && mkdir build
44+
- name: cmake
45+
run: |
46+
cd enzyme/build
47+
cmake .. -DLLVM_EXTERNAL_LIT=`which lit` -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
48+
- name: make
49+
run: cd enzyme/build && make -j`nproc` LLVMEnzyme-${{ matrix.llvm }}
50+
- name: make bench-enzyme
51+
run: cd enzyme/build && make bench-enzyme
52+
- name: results
53+
run: cat enzyme/benchmarks/*/*/results.txt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Integration CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
llvm: ["7", "8", "9", "10", "11", "12", "13"] #, "14"]
20+
build: ["Release"] # "RelWithDebInfo"
21+
os: [ubuntu-20.04, ubuntu-18.04]
22+
23+
timeout-minutes: 45
24+
steps:
25+
- name: add llvm
26+
run: |
27+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
28+
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
29+
sudo apt-get install -y autoconf cmake gcc g++ libtool gfortran llvm-${{ matrix.llvm }}-dev libomp-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }} libclang-${{ matrix.llvm }}-dev libeigen3-dev libboost-dev
30+
sudo python3 -m pip install --upgrade pip setuptools
31+
sudo python3 -m pip install lit
32+
sudo touch /usr/lib/llvm-${{ matrix.llvm }}/bin/yaml-bench
33+
if [[ '${{ matrix.llvm }}' == '13' ]]; then
34+
sudo sed -i 's/add_executable(llvm-omp-device-info IMPORTED)//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
35+
sudo sed -i 's/llvm-omp-device-info//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
36+
fi
37+
- uses: actions/checkout@v1
38+
with:
39+
fetch-depth: 1
40+
- name: mkdir
41+
run: cd enzyme && rm -rf build && mkdir build
42+
- name: cmake
43+
run: |
44+
cd enzyme/build
45+
cmake .. -DLLVM_EXTERNAL_LIT=`which lit` -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
46+
- name: make
47+
run: cd enzyme/build && make -j`nproc` LLVMEnzyme-${{ matrix.llvm }}
48+
- name: make check-enzyme-integration
49+
run: cd enzyme/build && make check-enzyme-integration -j`nproc`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build and deploy Doxygen to Scripts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: mattnotmitt/[email protected]
15+
with:
16+
working-directory: 'enzyme/'
17+
doxyfile-path: 'doxygen.cfg'
18+
19+
- uses: wsmoses/action-deploy-scripts@main
20+
with:
21+
locker: 'enzyme-compiler'
22+
remote: doxygen
23+
privateKey: ${{ secrets.SCRIPTS_PRIVATE_KEY }}
24+
rmRemote: true
25+
local: enzyme/doxygen/html
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Enzyme CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build-linux:
7+
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
llvm: ["7", "8", "9", "10", "11", "12", "13", "14"]
14+
build: ["Release", "Debug"] # "RelWithDebInfo"
15+
os: [ubuntu-20.04, ubuntu-18.04] #self-hosted]
16+
17+
exclude:
18+
- os: ubuntu-20.04
19+
llvm: 7
20+
- os: ubuntu-20.04
21+
llvm: 8
22+
timeout-minutes: 30
23+
steps:
24+
- name: add llvm
25+
run: |
26+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
27+
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
28+
sudo apt-get install -y autoconf cmake gcc g++ libtool gfortran llvm-${{ matrix.llvm }}-dev
29+
if [ ${{matrix.llvm}} -lt 9 ]; then
30+
sudo apt-get install -y llvm-7-tools;
31+
echo /usr/lib/llvm-7/bin >> $GITHUB_PATH;
32+
fi
33+
sudo python3 -m pip install --upgrade pip setuptools
34+
sudo python3 -m pip install lit
35+
sudo touch /usr/lib/llvm-${{ matrix.llvm }}/bin/yaml-bench
36+
if [[ '${{ matrix.llvm }}' == '13' ]]; then
37+
sudo sed -i 's/add_executable(llvm-omp-device-info IMPORTED)//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
38+
sudo sed -i 's/llvm-omp-device-info//g' /usr/lib/llvm-${{matrix.llvm}}/lib/cmake/llvm/LLVMExports*.cmake
39+
fi
40+
- uses: actions/checkout@v2
41+
- name: mkdir
42+
run: cd enzyme && rm -rf build && mkdir build
43+
- name: cmake
44+
run: |
45+
cd enzyme/build
46+
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm
47+
- name: make
48+
run: cd enzyme/build && make -j`nproc`
49+
- name: make check-typeanalysis
50+
run: cd enzyme/build && make check-typeanalysis -j`nproc`
51+
- name: make check-activityanalysis
52+
run: cd enzyme/build && make check-activityanalysis -j`nproc`
53+
- name: make check-enzyme
54+
run: cd enzyme/build && make check-enzyme -j`nproc`
55+
56+
build-macos:
57+
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS
58+
runs-on: macos-latest
59+
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
llvm: ["8", "9", "11", "12", "13"] #, "14"]
64+
build: ["Release", "Debug"] # "RelWithDebInfo"
65+
66+
timeout-minutes: 30
67+
steps:
68+
- name: add llvm
69+
run: |
70+
brew install llvm@${{ matrix.llvm }} autoconf make cmake gcc libtool
71+
sudo python3 -m pip install --upgrade pip setuptools
72+
sudo python3 -m pip install lit
73+
- uses: actions/checkout@v2
74+
- name: mkdir
75+
run: cd enzyme && rm -rf build && mkdir build
76+
- name: cmake
77+
run: |
78+
cd enzyme/build
79+
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm
80+
- name: make
81+
run: cd enzyme/build && make -j 3
82+
- name: make check-typeanalysis
83+
run: cd enzyme/build && make check-typeanalysis -j 3
84+
- name: make check-activityanalysis
85+
run: cd enzyme/build && make check-activityanalysis -j 3
86+
- name: make check-enzyme
87+
run: cd enzyme/build && make check-enzyme -j 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Julia Enzyme CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Enzyme CI Julia ${{ matrix.version }} ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
continue-on-error: ${{ matrix.version == 'nightly' }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
version:
20+
- '1.6'
21+
- '1.7'
22+
- 'nightly'
23+
os:
24+
- ubuntu-latest
25+
- macOS-latest
26+
arch:
27+
- x64
28+
timeout-minutes: 30
29+
steps:
30+
- uses: actions/checkout@v2
31+
with:
32+
fetch-depth: 1
33+
- uses: actions/checkout@v2
34+
with:
35+
repository: 'wsmoses/Enzyme.jl'
36+
path: ./jl
37+
ref: main
38+
- uses: julia-actions/setup-julia@v1
39+
with:
40+
version: ${{ matrix.version }}
41+
arch: ${{ matrix.arch }}
42+
- name: Build libEnzyme
43+
run: |
44+
julia --project=jl/deps -e 'using Pkg; Pkg.instantiate()'
45+
julia --project=jl/deps jl/deps/build_local.jl ./enzyme
46+
- uses: julia-actions/julia-buildpkg@v1
47+
with:
48+
project: jl
49+
- uses: julia-actions/julia-runtest@v1
50+
with:
51+
project: jl
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Clang-Format
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: Format
8+
runs-on: ubuntu-20.04
9+
10+
steps:
11+
- uses: actions/checkout@v1
12+
with:
13+
fetch-depth: 1
14+
- uses: DoozyX/[email protected]
15+
with:
16+
source: 'enzyme/Enzyme'
17+
exclude: './CMakeLists.txt enzyme/Enzyme/SCEV'
18+
style: 'llvm'
19+
clangFormatVersion: 11

0 commit comments

Comments
 (0)