forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'src/tools/enzyme/' from commit '74122a358e6799f5f25c35e394697aea…
…ec0e432e' git-subtree-dir: src/tools/enzyme git-subtree-mainline: cbe696f git-subtree-split: 74122a3
- Loading branch information
Showing
1,440 changed files
with
2,204,067 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// available ubuntu versions: [18, 20, 22] | ||
// available llvm versions: [7, 8, 9, 10, 11, 12, 13, 14, 15] | ||
{ | ||
"name": "Enzyme", | ||
"image": "ghcr.io/enzymead/enzyme-dev-docker/ubuntu-20-llvm-12:latest", | ||
"mounts": [ | ||
"source=enzyme-bashhistory,target=/commandhistory,type=volume", | ||
"source=enzyme-extensions,target=/root/.vscode-server/extensions,type=volume", | ||
"source=enzyme-extensions-insiders,target=/root/.vscode-server-insiders/extensions,type=volume", | ||
"source=enzyme-build,target=${containerWorkspaceFolder}/enzyme/build,type=volume", | ||
], | ||
"postCreateCommand": "sudo chown vscode ./enzyme/build", | ||
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-vscode.cpptools-extension-pack" | ||
] | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/LICENSE export-ignore | ||
/Readme.md export-ignore | ||
/clang export-ignore | ||
/clang-tools-extra export-ignore | ||
/compiler-rt export-ignore | ||
/contrib export-ignore | ||
/debuginfo-tests export-ignore | ||
/libcxx export-ignore | ||
/libcxxabi export-ignore | ||
/libunwind export-ignore | ||
/lld export-ignore | ||
/lldb export-ignore | ||
/llvm export-ignore | ||
/openmp export-ignore | ||
/polly export-ignore | ||
/tests export-ignore | ||
/enzyme/benchmarks export-ignore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Bitcode loading CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Bitcode loading CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
llvm: ["7", "8", "9", "10", "11", "12", "13"] #, "14"] | ||
build: ["Release"] # "RelWithDebInfo" | ||
os: [ubuntu-20.04, ubuntu-18.04] | ||
|
||
exclude: | ||
# How to install FileCheck on ubuntu-18.04? | ||
- os: ubuntu-18.04 | ||
llvm: 8 | ||
|
||
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 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 | ||
sudo python3 -m pip install --upgrade pip setuptools | ||
sudo python3 -m pip install lit | ||
sudo touch /usr/lib/llvm-${{ matrix.llvm }}/bin/yaml-bench | ||
if [[ '${{ matrix.llvm }}' == '7' || '${{ matrix.llvm }}' == '8' || '${{ matrix.llvm }}' == '9' ]]; then | ||
sudo apt-get install -y llvm-${{ matrix.llvm }}-tools | ||
fi | ||
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: 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 check-bcpass | ||
run: cd enzyme/build && make check-bcpass -j`nproc` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Benchmarking | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
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: ["7", "8", "9", "10", "11", "12", "13"] #, "14"] | ||
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 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 pathlib | ||
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 | ||
- name: graph results | ||
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 | ||
if: github.event_name != 'pull_request' && matrix.build == 'Release' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: C/C++ CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Integration CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
llvm: ["7", "8", "9", "10", "11", "12", "13"] #, "14"] | ||
build: ["Release"] # "RelWithDebInfo" | ||
os: [ubuntu-20.04, ubuntu-18.04] | ||
|
||
timeout-minutes: 45 | ||
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 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 | ||
sudo python3 -m pip install --upgrade pip setuptools | ||
sudo python3 -m 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@v3 | ||
- 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 check-enzyme-integration | ||
run: cd enzyme/build && make check-enzyme-integration -j`nproc` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build and deploy Doxygen to Scripts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: mattnotmitt/doxygen-action@v1.9.2 | ||
with: | ||
working-directory: 'enzyme/' | ||
doxyfile-path: 'doxygen.cfg' | ||
|
||
- uses: wsmoses/action-deploy-scripts@main | ||
with: | ||
locker: 'enzyme-compiler' | ||
remote: doxygen | ||
privateKey: ${{ secrets.SCRIPTS_PRIVATE_KEY }} | ||
rmRemote: true | ||
local: enzyme/doxygen/html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: Enzyme CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build-linux: | ||
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
llvm: ["7", "8", "9", "10", "11", "12", "13", "14"] | ||
build: ["Release", "Debug"] # "RelWithDebInfo" | ||
os: [ubuntu-20.04, ubuntu-18.04] #self-hosted] | ||
|
||
exclude: | ||
- os: ubuntu-20.04 | ||
llvm: 7 | ||
- os: ubuntu-20.04 | ||
llvm: 8 | ||
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 autoconf cmake gcc g++ libtool gfortran llvm-${{ matrix.llvm }}-dev | ||
if [ ${{matrix.llvm}} -lt 9 ]; then | ||
sudo apt-get install -y llvm-7-tools; | ||
echo /usr/lib/llvm-7/bin >> $GITHUB_PATH; | ||
fi | ||
sudo python3 -m pip install --upgrade pip setuptools | ||
sudo python3 -m 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@v3 | ||
- name: mkdir | ||
run: cd enzyme && rm -rf build && mkdir build | ||
- name: cmake | ||
run: | | ||
cd enzyme/build | ||
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=/usr/lib/llvm-${{ matrix.llvm }}/lib/cmake/llvm | ||
- name: make | ||
run: cd enzyme/build && make -j`nproc` | ||
- name: make check-typeanalysis | ||
run: cd enzyme/build && make check-typeanalysis -j`nproc` | ||
- name: make check-activityanalysis | ||
run: cd enzyme/build && make check-activityanalysis -j`nproc` | ||
- name: make check-enzyme | ||
run: cd enzyme/build && make check-enzyme-bench -j`nproc` | ||
- name: graph results | ||
run: python3 enzyme/test/upload-results.py enzyme/build/test/Enzyme/results.json --url https://enzyme.mit.edu/cibench/api --token ${{ secrets.GRAPH_TOKEN }} | ||
if: github.event_name != 'pull_request' && matrix.build == 'Release' | ||
|
||
build-macos: | ||
name: Enzyme CI LLVM ${{ matrix.llvm }} ${{ matrix.build }} macOS | ||
runs-on: macos-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
llvm: ["8", "9", "11", "12", "13", "14", "15"] | ||
build: ["Release", "Debug"] # "RelWithDebInfo" | ||
|
||
timeout-minutes: 30 | ||
steps: | ||
- name: add llvm | ||
run: | | ||
brew update | ||
brew install llvm@${{ matrix.llvm }} autoconf make cmake gcc libtool | ||
sudo python3 -m pip install --upgrade pip setuptools | ||
sudo python3 -m pip install lit requests | ||
- uses: actions/checkout@v3 | ||
- name: mkdir | ||
run: cd enzyme && rm -rf build && mkdir build | ||
- name: cmake | ||
run: | | ||
llvm_prefix=`brew --prefix llvm@${{ matrix.llvm }}` | ||
cd enzyme/build | ||
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=${llvm_prefix}/lib/cmake/llvm | ||
- name: make | ||
run: cd enzyme/build && make -j 3 | ||
- name: make check-typeanalysis | ||
run: cd enzyme/build && make check-typeanalysis -j 3 | ||
- name: make check-activityanalysis | ||
run: cd enzyme/build && make check-activityanalysis -j 3 | ||
- name: make check-enzyme | ||
run: cd enzyme/build && make check-enzyme-bench -j 3 | ||
- name: graph results | ||
run: python3 enzyme/test/upload-results.py enzyme/build/test/Enzyme/results.json --url https://enzyme.mit.edu/cibench/api --token ${{ secrets.GRAPH_TOKEN }} | ||
if: github.event_name != 'pull_request' && matrix.build == 'Release' | ||
|
||
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 }} autoconf make cmake gcc libtool | ||
sudo python3 -m pip install --upgrade pip setuptools | ||
sudo python3 -m pip install lit | ||
- uses: actions/checkout@v3 | ||
- name: mkdir | ||
run: cd enzyme && rm -rf build && mkdir build | ||
- name: cmake | ||
run: | | ||
cd enzyme/build | ||
cmake .. -GXcode -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_EXTERNAL_LIT=`which lit` -DLLVM_DIR=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm |
Oops, something went wrong.