Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enzyme rust #12

Merged
merged 1,344 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1344 commits
Select commit Hold shift + click to select a range
feed0ce
fix constexpr handling (#659)
ZuseZ4 May 28, 2022
e95c410
Fix custom fwd reverse gradient utility (#671)
wsmoses May 28, 2022
1fa0a99
Add no type error (#672)
wsmoses May 28, 2022
bb70046
Add get type analyzer method to C API (#673)
wsmoses May 29, 2022
f0f64db
Add forward mode fadd and free debug (#674)
wsmoses May 29, 2022
3fd233c
Move TypeResults into GradientUtils (#660)
tgymnich May 30, 2022
85524a3
Improve debug handler (#675)
wsmoses Jun 1, 2022
dfadccf
Primal activity analysis fix (#678)
wsmoses Jun 1, 2022
6a99de4
std::vector to SmallVector (#625)
tgymnich Jun 5, 2022
55e050e
Fix fwd fmuladd (#679)
wsmoses Jun 6, 2022
2f01442
Fix constant instruction binop in forward mode (#680)
wsmoses Jun 6, 2022
a1a91db
Update ActivityAnalysis.cpp (#681)
ZuseZ4 Jun 7, 2022
c297c6a
Work around julia invariant load (#682)
wsmoses Jun 7, 2022
c0c6fe5
Fix atomic add case (#685)
wsmoses Jun 10, 2022
711df5e
move inactive fn-matching to demangled names (#683)
ZuseZ4 Jun 13, 2022
93a8735
Add rosenbrock test (#688)
ZuseZ4 Jun 13, 2022
47ac42b
Revert "move inactive fn-matching to demangled names (#683)"
wsmoses Jun 15, 2022
c68257e
cmake fix for enzyme+opt (#691)
ZuseZ4 Jun 16, 2022
4eaa5ef
Handle maxpd (#690)
wsmoses Jun 16, 2022
67ba729
Create shadows for constant, non internal globals (#693)
wsmoses Jun 16, 2022
441d197
Inactive typeinfo (#694)
wsmoses Jun 16, 2022
a89cec3
handle optional __cxx11 prefix (#695)
ZuseZ4 Jun 17, 2022
04ca979
Run clang-format (#699)
tgymnich Jun 20, 2022
c16cec9
Remove unused variable (#698)
tgymnich Jun 20, 2022
47f6b83
More global typeinfo (#696)
wsmoses Jun 23, 2022
8e87377
Remove function hacky activity (#701)
wsmoses Jun 23, 2022
ca6fe58
Sample Tablegen for non-memory math-like, non-calling code (#608)
wsmoses Jun 24, 2022
3d28f83
Fix recursive global (#704)
wsmoses Jun 24, 2022
fb22d2f
Fix fmuladd fwd inactive (#705)
wsmoses Jun 24, 2022
1f7356c
Fix tablegen
wsmoses Jun 24, 2022
f6fed13
Fix fwd bug
wsmoses Jun 24, 2022
68db988
Better sret (#708)
wsmoses Jun 24, 2022
9cf2b8c
Remove cmake cmp hack (#707)
wsmoses Jun 25, 2022
1bbfc35
Improve DifferentialUseAnalysis (#709)
tgymnich Jun 25, 2022
582b7af
Use scalar type instead of vector type for the GlobalVariable initial…
tgymnich Jun 25, 2022
21bd55e
Fix global init
wsmoses Jun 25, 2022
3316e62
Fix unwrap (#647)
tgymnich Jun 25, 2022
5d5ee10
mark strcmp as inactive2 (#716)
ZuseZ4 Jun 26, 2022
590eec5
add __vmi_class_type_info (#718)
ZuseZ4 Jun 26, 2022
74bb4c6
Improve activity analysis (#717)
wsmoses Jun 26, 2022
67781b5
Batch mode [2] (#655)
tgymnich Jun 27, 2022
42419dc
fix build for llvm-14 (#722)
ZuseZ4 Jun 28, 2022
a16c616
handle old cmake with newer llvm (#719)
ZuseZ4 Jun 28, 2022
00d79e6
Add loose type fallback for atomics (#723)
wsmoses Jun 29, 2022
2f14e86
Introduce an explicit byref parameter to enforce structs to be passed…
wsmoses Jul 5, 2022
95a6666
Update CMakeLists.txt
wsmoses Jul 5, 2022
969ddce
Cast gutils to correct subclass for applyChainRule (#733)
tgymnich Jul 12, 2022
8b8cd30
Fix wrapped value used in chain rule (#732)
tgymnich Jul 16, 2022
0894dea
Fix batch bug (#731)
tgymnich Jul 16, 2022
6e628b2
Handle type size specific pattern (#739)
wsmoses Jul 17, 2022
cf4ac20
Add urem type support (#738)
wsmoses Jul 17, 2022
3dfdabc
Add nvvm fabs (#740)
wsmoses Jul 18, 2022
e496dfa
Expose function replacement (#741)
wsmoses Jul 18, 2022
84e7fe5
Simplify store type handling (#742)
wsmoses Jul 19, 2022
e8ed87c
Bootstrap enzyme tblgen (#730)
vchuravy Jul 19, 2022
4eb8421
fix ConstantExpr handling in CreateAugmentedPrimal (#743)
ZuseZ4 Jul 21, 2022
9aff64d
Enable debuggers inside dev containers (#746)
tgymnich Jul 26, 2022
974f4b7
Add runtime activity for fwd mode loads (#744)
wsmoses Jul 27, 2022
4356a4e
Fix tests for llvm 14 (#750)
tgymnich Jul 28, 2022
1d9d047
Enable CI for macOS LLVM 14 (#711)
tgymnich Jul 28, 2022
8abdb9f
Cabs calling convention (#749)
tgymnich Jul 28, 2022
f10b38d
handle indirect enzyme_const loads (#753)
ZuseZ4 Jul 29, 2022
86ffa75
Julia malloc handling (#754)
wsmoses Jul 29, 2022
8836427
Fix previdx calculation (#755)
wsmoses Jul 29, 2022
05f1c8b
Make activity analysis more aggressive re gep (#761)
wsmoses Jul 29, 2022
a959be9
Enable PHI node improvements in strict aliasing (#760)
wsmoses Jul 29, 2022
146643f
Handle non-strict select / phi (#763)
wsmoses Jul 30, 2022
c832e60
Enable custom allocation (#767)
wsmoses Aug 1, 2022
0d1c595
Fix memset for floats (#765)
wsmoses Aug 2, 2022
0c38d8d
Handle other address spaces on stack2heap (#772)
wsmoses Aug 5, 2022
4cedb70
Add exp10 (#774)
wsmoses Aug 5, 2022
ea28428
Custom function-like registration (#769)
wsmoses Aug 6, 2022
43b737e
Expm1 (#775)
wsmoses Aug 6, 2022
f853557
Add fromstack utility (#776)
wsmoses Aug 6, 2022
ac65eea
Custom runtime inactive error (#778)
wsmoses Aug 7, 2022
e1468ad
Increase aggressiveness of AA (#779)
wsmoses Aug 8, 2022
563c88f
Fix infinite recursion on allstore
wsmoses Aug 8, 2022
54263c2
Fix meta store via load (#781)
wsmoses Aug 8, 2022
ca49313
Julia custom alloc fixups (#780)
wsmoses Aug 8, 2022
f9c7b63
Fix typeanalysis recusion bug and noarg gep (#784)
wsmoses Aug 9, 2022
f5dd9f0
other rb_tree mangleing (#764)
ZuseZ4 Aug 9, 2022
8f50895
Fix activity analysis loop (#785)
wsmoses Aug 9, 2022
64891e8
Fast loop affine integer calculation (#787)
wsmoses Aug 10, 2022
35be55c
fix blas-dot bug
ZuseZ4 Aug 15, 2022
faa1c45
Rules for tan (#793)
sriharikrishna Aug 23, 2022
23306ab
Fix recursive map inversion (#795)
wsmoses Aug 25, 2022
a56ad33
Update ActivityAnalysis.cpp (#796)
ZuseZ4 Aug 25, 2022
47f454e
Improve inactive error message (#794)
wsmoses Aug 26, 2022
04caf58
Filehandling inactive (#801); loose-types fallback for or, and
ZuseZ4 Aug 26, 2022
f92c0eb
Simplify differential argument code (#803)
wsmoses Aug 29, 2022
e56eb6a
Add c api inverted bundle (#806)
wsmoses Aug 29, 2022
a87164c
mark virtual IO inactive (#805)
ZuseZ4 Aug 30, 2022
87d59f9
Intrinsics (#807)
ZuseZ4 Aug 30, 2022
01dc20b
Simplify function detection API (#809)
wsmoses Aug 31, 2022
185a576
Fix handle out of sync error (#812)
wsmoses Sep 1, 2022
2c667ea
Inactive memcpy src, but active dst diffeuse (#811)
wsmoses Sep 1, 2022
034b9b4
Fix sinc related bugs (#814)
wsmoses Sep 1, 2022
1304397
Correct load of struct behavior (#815)
wsmoses Sep 2, 2022
1033668
Add option for split phi nodes (#816)
tgymnich Sep 3, 2022
609abf3
Encourage devirtualization (#790)
tgymnich Sep 3, 2022
21fb654
Fix LLVM 15+ build (#818)
wsmoses Sep 3, 2022
73cba8d
Fix shuffle canonicalization (#819)
wsmoses Sep 3, 2022
d345907
Fix call segfault (#821)
wsmoses Sep 4, 2022
c453098
Fix trunc i1 (#822)
wsmoses Sep 4, 2022
1bd0e82
Vectorize write barrier (#823)
wsmoses Sep 5, 2022
bf2b112
Fix inverted pointer use (#824)
wsmoses Sep 5, 2022
78145b6
Export erasure of preprocessed functions (#825)
wsmoses Sep 5, 2022
5a6e056
Fix recursive cache reverse (#826)
wsmoses Sep 5, 2022
cf7b24e
Loose Type Analysis for Floating Point Add (#828)
wsmoses Sep 5, 2022
5d967a5
Permit inactive register arguments on an indirect call (#830)
wsmoses Sep 6, 2022
fd0d928
Add sinc normalized (#834)
wsmoses Sep 6, 2022
72b7ad0
Correct behavior of tablegen cmake linking on llvm shared builds (#833)
wsmoses Sep 6, 2022
3dab78c
Fix struct float virtual fn (#842)
wsmoses Sep 13, 2022
6096b3a
Bump BCLoad gsl to not use short circuiting blas (#841)
wsmoses Sep 13, 2022
0665cc8
Fix omp cache case (#845)
wsmoses Sep 14, 2022
ad0af85
Add atomic fadd for reverse mode (#849)
wsmoses Sep 19, 2022
1e82cd6
Add acos (#851)
wsmoses Sep 22, 2022
9516320
Enable custom handler post cache write (#853)
wsmoses Sep 26, 2022
052cd89
Fix benchmark CI
wsmoses Sep 26, 2022
a32a0b7
Consider gc alloc typed (#855)
wsmoses Sep 27, 2022
5cfe075
Update CMakeLists.txt
wsmoses Sep 27, 2022
a6a92b4
Add custom anonymous type for tape (#859)
wsmoses Sep 28, 2022
ab357c2
Improve sret style memory handling (#860)
wsmoses Sep 29, 2022
ae3e1e3
Fix CI build for Homebrew LLVM 15 (#858)
carlocab Sep 29, 2022
aac3fb2
Remove some calls to `getPointerElementType` in `TypeAnalysis.cpp` (#…
thewilsonator Sep 29, 2022
f24be11
Remove some calls to `getPointerElementType` in `EnzymeLogic.cpp` (#864)
thewilsonator Sep 29, 2022
47c445b
Only eliminate nocapture if not replacing forward pass (#865)
wsmoses Sep 30, 2022
20593ca
Update enzyme-julia.yml
wsmoses Sep 30, 2022
40be3b2
Fix tests for LLVM15 and some more opaque pointers (#866)
wsmoses Sep 30, 2022
2f750b3
Fix sinc (#867)
wsmoses Sep 30, 2022
81d225a
Update enzyme-julia.yml
wsmoses Oct 1, 2022
a86e08a
Improve remat of mem (#868)
wsmoses Oct 2, 2022
2207f7d
Simplify and speed up warning/error API (#846)
wsmoses Oct 2, 2022
9dbdde3
Support diffuse print and fix insertval (#870)
wsmoses Oct 2, 2022
c76e6ae
Add better firstpointer error handling (#872)
wsmoses Oct 2, 2022
e6f005b
Internal error handling (#873)
wsmoses Oct 3, 2022
dfa4088
Handle variable post cache size (#874)
wsmoses Oct 3, 2022
24774ad
Custom sret (#875)
wsmoses Oct 3, 2022
ed3fbb5
Add copy metadata helper (#877)
wsmoses Oct 3, 2022
fb64f4d
Update EnzymeLogic.cpp (#878)
swilliamson7 Oct 4, 2022
a49ef5e
Custom alloc zeroing (#880)
wsmoses Oct 4, 2022
34e85a2
Add addr replacement handling of memtransfer (#879)
wsmoses Oct 4, 2022
e8fdb86
Set formemset (#881)
wsmoses Oct 4, 2022
4671621
Add MLIR build infra (#852)
wsmoses Oct 5, 2022
6d95df2
Consider even atomic loads as non-active writing (#882)
wsmoses Oct 5, 2022
a13be17
Consider jlcall activity (#884)
wsmoses Oct 6, 2022
c4f5c17
Remove `CMAKE_EXE_LINKER_FLAGS` from macOS CI (#883)
carlocab Oct 6, 2022
8ce640e
Fix fblas declaration error (#886)
wsmoses Oct 8, 2022
bc85675
update NoFree list (#888)
ZuseZ4 Oct 9, 2022
e3c7867
Fix gamma special case bug (#892)
wsmoses Oct 12, 2022
b359e2c
Fix mincut remat bug (#893)
wsmoses Oct 12, 2022
2826972
Add 64 abi without underscore (#895)
wsmoses Oct 12, 2022
7d33211
Lookup for reverse of atomic add (#896)
wsmoses Oct 12, 2022
680ed95
More fine grained bundle preservation (#897)
wsmoses Oct 12, 2022
736092f
Print source line location where type depth reached. (#871)
wsmoses Oct 13, 2022
1efa420
Actually fix 64bit cblas (#898)
wsmoses Oct 13, 2022
4d7f77a
Fix vector atomic gep (#899)
wsmoses Oct 13, 2022
07eabda
Cleanup and fix macos (#900)
wsmoses Oct 13, 2022
30e0525
Fix format and bump patch
wsmoses Oct 13, 2022
6ac8edb
Handle multilevel dupnoneed (#902)
wsmoses Oct 16, 2022
17b83da
Preserve noalias metadata on unwrap (#901)
wsmoses Oct 16, 2022
65150b8
Fix illegal invariant group on unwrap (#905)
wsmoses Oct 18, 2022
c81bf98
Fix test on AArch64 (#907)
tgymnich Oct 19, 2022
c1a1f22
Custom alloc zeroing (#908)
wsmoses Oct 20, 2022
952a4f5
Fixup
wsmoses Oct 20, 2022
5980f31
Custom return fixup (#912)
wsmoses Oct 22, 2022
2a8ba2d
Custom forward zero (#913)
wsmoses Oct 23, 2022
235fc1d
Keep integer extract (#914)
wsmoses Oct 24, 2022
d5510e3
Make single version of primal stack lowering handler (#915)
wsmoses Oct 24, 2022
7da8126
Cleanup allocation and remat (#916)
wsmoses Oct 24, 2022
d52cb9c
Add memref/llvm.ptr handling for fwd mode (#910)
wsmoses Oct 24, 2022
b5d4fb1
With zero (#917)
wsmoses Oct 25, 2022
442f31d
Add forward bundle for allocations (#918)
wsmoses Oct 27, 2022
21274aa
Add cbrtf (#919)
wsmoses Oct 30, 2022
011b361
Add julia rem2pi (#921)
wsmoses Oct 30, 2022
9f102eb
Add frem (#920)
wsmoses Oct 30, 2022
60aa782
Add fence inst handling (#922)
wsmoses Oct 31, 2022
633dcd1
Add constantexpr shadow (#928)
wsmoses Nov 9, 2022
1b5f1f1
Addition of SC'22 citation to Readme (#932)
ludgerpaehler Nov 24, 2022
dddf6c6
Fix renaming of getModRefBehavior to getMemoryEffects (#936)
tgymnich Nov 30, 2022
ccfb103
Rename ForwardModeAdjoint to ForwardModeTangent to stay in line with …
ludgerpaehler Dec 1, 2022
b14088f
Support declaring a custom allocation / free function. (#937)
wsmoses Dec 2, 2022
9013de3
Add inactive global specifier (#938)
wsmoses Dec 2, 2022
4c301eb
Improve global metadata handling wrt llvm.used (#939)
wsmoses Dec 4, 2022
6351440
Add a citation.bib file which is automatically being picked up by Git…
ludgerpaehler Dec 9, 2022
c600eb3
Simplify out TLI from entry (#942)
wsmoses Dec 11, 2022
ce1113f
Graph ADBench benchmarks (#770)
tgymnich Dec 12, 2022
10dfcf9
Update benchmark.yml (#944)
tgymnich Dec 12, 2022
2b21c28
Add fneg handling to type analysis (#947)
wsmoses Dec 13, 2022
d580a8d
Fix recursive read problem (#945)
wsmoses Dec 14, 2022
9f04b23
Ensure custom allocation free has debug info set
wsmoses Dec 15, 2022
6465118
Preserve deallocation function via linkage (#948)
wsmoses Dec 15, 2022
64dbe2c
Bench unit test compile time (#943)
tgymnich Dec 18, 2022
0ecf682
fix llvm version parsed from json (#952)
tgymnich Dec 18, 2022
bef75d6
install requests on macOS (#953)
tgymnich Dec 20, 2022
7f615b3
Implement frexp (#955)
wsmoses Dec 20, 2022
e08703f
Improve atomicxcg type analysis (#949)
wsmoses Dec 20, 2022
9eefd84
Handle non analyzed blocks in loop rematerialization (#957)
wsmoses Dec 23, 2022
11c6c14
Fix LCSSA lookup scope bug (#951)
wsmoses Dec 23, 2022
ed65775
Update CMakeLists.txt
wsmoses Dec 23, 2022
997e8df
Fix adj (#958)
wsmoses Dec 24, 2022
4cc3434
Update github actions (#956)
tgymnich Dec 25, 2022
e0bb22c
Fix shadow remat bug (#959)
wsmoses Dec 25, 2022
d54daa7
New PM and Opaque pointer progress (#960)
wsmoses Dec 28, 2022
9d58f89
Add symlink for FlangEnzyme, when ClangEnzyme is present and FlangEnz…
ludgerpaehler Jan 12, 2023
fe550b5
Move rust bindings into rustc (#964)
ZuseZ4 Jan 13, 2023
35d9f98
Add atan2f (#971)
wsmoses Jan 29, 2023
ae31fac
Handle compiler.used (#970)
wsmoses Jan 29, 2023
28004af
strengthen test for macos ordering (#974)
wsmoses Jan 30, 2023
4658ed0
Add Faddeeva_erfcx_re (#973)
wsmoses Jan 30, 2023
1e6f717
Multi typed activity (#972)
wsmoses Feb 1, 2023
282feae
Fix Macos condswload
wsmoses Feb 1, 2023
ecd10f0
Add fmod (#976)
wsmoses Feb 2, 2023
da74db0
Update CMakeLists.txt
wsmoses Feb 2, 2023
038f63c
install c++ extension pack inside dev container (#975)
tgymnich Feb 2, 2023
82d04cc
Add probabilistic programming capabilities (#909)
tgymnich Feb 2, 2023
5d1e000
Fix pgcstack bug (#977)
wsmoses Feb 3, 2023
0c3425d
fix llvm 15 (#979)
tgymnich Feb 3, 2023
3e460d3
More opaque pointer support (#978)
wsmoses Feb 4, 2023
49a8bf8
Change overwritten map to index on opnum not argument (#982)
wsmoses Feb 10, 2023
b2f9d57
Mark memchr as inactive (#984)
wsmoses Feb 10, 2023
af1b3ab
Fix overwritten print bug (#985)
wsmoses Feb 10, 2023
897b084
nil the target triple prior to merge (#986)
wsmoses Feb 10, 2023
3aac5a4
Fix MLIR build (#983)
wsmoses Feb 11, 2023
ce11d52
handle mangled names (#989)
tgymnich Feb 12, 2023
23d6ecc
Use getCalledFunction (#991)
tgymnich Feb 12, 2023
248dbbb
Fix insert choice (#988)
tgymnich Feb 12, 2023
1843339
Trace interface improvements (#990)
tgymnich Feb 14, 2023
5894561
pass trace as argument (#992)
tgymnich Feb 14, 2023
00dca5d
add v15 to Enzyme_jll (#997)
vchuravy Feb 15, 2023
4905734
Fix bug
wsmoses Feb 15, 2023
2595aba
Preserve invariant group properties on unwrap (#996)
wsmoses Feb 15, 2023
f550600
Zero inner always (#998)
wsmoses Feb 16, 2023
d6e548e
Don't build musl (#999)
vchuravy Feb 16, 2023
7d85a87
Upgrade to OSX 10.14 for jll (#1000)
vchuravy Feb 16, 2023
7e60cef
extract populate_overwritten_args (#994)
tgymnich Feb 22, 2023
87a6b6c
extract handleArguments (#993)
tgymnich Feb 22, 2023
a118643
remove orig (aliasing call reference) (#1001)
tgymnich Feb 22, 2023
7265291
fix debug message (#1002)
tgymnich Feb 23, 2023
3e1e2d0
fix llvm 14/15 build (#1004)
tgymnich Feb 23, 2023
34e3965
update README links to Julia and Rust (#1007)
vtjnash Feb 24, 2023
a2045bd
remove using namespace llvm (#1008)
tgymnich Feb 25, 2023
dc45462
Move custom handler to preserve nvvm (#1005)
wsmoses Mar 5, 2023
113c6f6
Simplify intrinsic activity (#1011)
wsmoses Mar 5, 2023
3a08b74
Ensure activity analysis doesn't drop hypothesis re-eval (#1012)
wsmoses Mar 6, 2023
86ff6d7
Update CMakeLists.txt
wsmoses Mar 6, 2023
7e930d7
Fix vector fmuladd (#1013)
wsmoses Mar 6, 2023
74122a3
Remove std optional and rewrite to use llvm/std compliant apis (#1014)
wsmoses Mar 6, 2023
cbe696f
subtrees are working great, deleting old one
ZuseZ4 Mar 7, 2023
e6842be
Add 'src/tools/enzyme/' from commit '74122a358e6799f5f25c35e394697aea…
ZuseZ4 Mar 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 11 additions & 3 deletions src/tools/enzyme/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// available ubuntu versions: [18, 20]
// available llvm versions: [7, 8, 9, 10, 11, 12, 13]
// 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",
Expand All @@ -9,5 +9,13 @@
"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"
"postCreateCommand": "sudo chown vscode ./enzyme/build",
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack"
]
}
}
}
4 changes: 1 addition & 3 deletions src/tools/enzyme/.github/workflows/bcload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ jobs:
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
- uses: actions/checkout@v3
- name: mkdir
run: cd enzyme && rm -rf build && mkdir build
- name: cmake
Expand Down
8 changes: 7 additions & 1 deletion src/tools/enzyme/.github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
matrix:
llvm: ["7", "8", "9", "10", "11", "12", "13"] #, "14"]
build: ["Release", "Debug"] # "RelWithDebInfo"
os: [self-hosted]
os: [openstack18]
timeout-minutes: 120
steps:
- name: add llvm
Expand Down Expand Up @@ -51,3 +51,9 @@ jobs:
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'
4 changes: 1 addition & 3 deletions src/tools/enzyme/.github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ jobs:
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
- uses: actions/checkout@v3
- name: mkdir
run: cd enzyme && rm -rf build && mkdir build
- name: cmake
Expand Down
2 changes: 1 addition & 1 deletion src/tools/enzyme/.github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: mattnotmitt/doxygen-action@v1.9.2
with:
Expand Down
55 changes: 46 additions & 9 deletions src/tools/enzyme/.github/workflows/enzyme-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Enzyme CI

on: [push]
on:
push:
branches:
- main
pull_request:

jobs:
build-linux:
Expand Down Expand Up @@ -37,7 +41,7 @@ jobs:
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@v2
- uses: actions/checkout@v3
- name: mkdir
run: cd enzyme && rm -rf build && mkdir build
- name: cmake
Expand All @@ -51,7 +55,10 @@ jobs:
- name: make check-activityanalysis
run: cd enzyme/build && make check-activityanalysis -j`nproc`
- name: make check-enzyme
run: cd enzyme/build && make check-enzyme -j`nproc`
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
Expand All @@ -60,28 +67,58 @@ jobs:
strategy:
fail-fast: false
matrix:
llvm: ["8", "9", "11", "12", "13"] #, "14"]
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
- uses: actions/checkout@v2
sudo python3 -m pip install lit requests
- 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=`brew --prefix llvm@${{ matrix.llvm }}`/lib/cmake/llvm
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 -j 3
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
10 changes: 4 additions & 6 deletions src/tools/enzyme/.github/workflows/enzyme-julia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,16 @@ jobs:
version:
- '1.6'
- '1.7'
- 'nightly'
- '1.8'
os:
- ubuntu-latest
- macOS-latest
arch:
- x64
timeout-minutes: 30
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: 'wsmoses/Enzyme.jl'
path: ./jl
Expand Down
76 changes: 76 additions & 0 deletions src/tools/enzyme/.github/workflows/enzyme-mlir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: MLIR

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-linux:
name: MLIR ${{ matrix.build }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
build: ["Release", "Debug"] # "RelWithDebInfo"
llbuild: ["Release"]
os: [openstack22]

timeout-minutes: 500
steps:
- name: add llvm
run: |
sudo rm -f /etc/apt/sources.list.d/*llvm*.list
sudo apt-get update
sudo apt-get install -y ninja-build git autoconf cmake gcc g++ libtool gfortran python3 python3-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: 'llvm/Polygeist'
path: 'Polygeist'
submodules: true

- name: Cache MLIR
id: cache-mlir
uses: actions/cache@v2
with:
path: mlir-build
key: ${{ matrix.llbuild }}-${{ matrix.os }}-mlir-${{ hashFiles('Polygeist/.git/modules/llvm-project/HEAD') }}

- name: MLIR build
if: steps.cache-mlir.outputs.cache-hit != 'true'
run: |
mkdir mlir-build
cd mlir-build
cmake ../Polygeist/llvm-project/llvm -GNinja -DLLVM_ENABLE_PROJECTS="llvm;clang;mlir;openmp" -DCMAKE_BUILD_TYPE=${{ matrix.llbuild }} -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_PARALLEL_LINK_JOBS=2
ninja -j2

- name: Cache Polygeist
id: cache-polygeist
uses: actions/cache@v2
with:
path: polygeist-build
key: ${{ matrix.llbuild }}-${{ matrix.os }}-polygeist-${{ hashFiles('Polygeist/.git/modules/llvm-project/HEAD') }}-${{ hashFiles('Polygeist/.git/refs/heads/main') }}

- name: Polygeist build
if: steps.cache-polygeist.outputs.cache-hit != 'true'
run: |
mkdir polygeist-build
cd polygeist-build
cmake ../Polygeist/ -GNinja -DMLIR_DIR=`pwd`/../mlir-build/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=`pwd`/../mlir-build/bin/llvm-lit -DClang_DIR=`pwd`/../mlir-build/lib/cmake/clang -DCMAKE_BUILD_TYPE=${{ matrix.llbuild }}
ninja

- name: cmake
run: |
cd enzyme && mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DLLVM_DIR=`pwd`/../../mlir-build -DENZYME_MLIR=ON
- name: make
run: cd enzyme/build && ninja
- name: make check-enzymemlir
run: cd enzyme/build && ninja check-enzymemlir

6 changes: 2 additions & 4 deletions src/tools/enzyme/.github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.11
with:
source: 'enzyme/Enzyme'
exclude: './CMakeLists.txt enzyme/Enzyme/SCEV'
style: 'llvm'
clangFormatVersion: 11
clangFormatVersion: 11
8 changes: 3 additions & 5 deletions src/tools/enzyme/.github/workflows/tagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ jobs:
private_key: ${{ secrets.APP_PRIVATE_KEY }}
repository: JuliaPackaging/Yggdrasil

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: 'JuliaPackaging/Yggdrasil'
fetch-depth: 1
path: ygg

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1
path: enz
path: enz
- name: replace
run: |
cd ygg
Expand Down
12 changes: 6 additions & 6 deletions src/tools/enzyme/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*.out
build
.vscode


# Added by cargo

/target
Cargo.lock
enzyme/benchmarks/ReverseMode/*/*.ll
enzyme/benchmarks/ReverseMode/*/*.bc
enzyme/benchmarks/ReverseMode/*/*.o
enzyme/benchmarks/ReverseMode/*/*.exe
enzyme/benchmarks/ReverseMode/*/results.txt
enzyme/benchmarks/ReverseMode/*/results.json
28 changes: 24 additions & 4 deletions src/tools/enzyme/.packaging/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ repo = "https://github.com/EnzymeAD/Enzyme.git"
auto_version = "%ENZYME_VERSION%"
version = VersionNumber(split(auto_version, "/")[end])

llvm_versions = [v"11.0.1", v"12.0.1", v"13.0.1", v"14.0.2"]
llvm_versions = [v"11.0.1", v"12.0.1", v"13.0.1", v"14.0.2", v"15.0.7"]

# Collection of sources required to build attr
sources = [GitSource(repo, "%ENZYME_HASH%")]
sources = [
GitSource(repo, "%ENZYME_HASH%"),
ArchiveSource("https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.14.sdk.tar.xz",
"0f03869f72df8705b832910517b47dd5b79eb4e160512602f593ed243b28715f"),
]

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
Expand All @@ -24,6 +28,16 @@ platforms = expand_cxxstring_abis(supported_platforms(; experimental=true))
script = raw"""
cd Enzyme

if [[ "${bb_full_target}" == x86_64-apple-darwin*llvm_version+15.asserts* ]]; then
# LLVM 15 requires macOS SDK 10.14.
pushd $WORKSPACE/srcdir/MacOSX10.*.sdk
rm -rf /opt/${target}/${target}/sys-root/System
cp -ra usr/* "/opt/${target}/${target}/sys-root/usr/."
cp -ra System "/opt/${target}/${target}/sys-root/."
export MACOSX_DEPLOYMENT_TARGET=10.14
popd
fi

# 1. Build HOST
NATIVE_CMAKE_FLAGS=()
NATIVE_CMAKE_FLAGS+=(-DENZYME_CLANG=ON)
Expand All @@ -38,13 +52,14 @@ NATIVE_CMAKE_FLAGS+=(-DBC_LOAD_FLAGS="-target ${target} --sysroot=/opt/${target}

cmake -B build-native -S enzyme -GNinja "${NATIVE_CMAKE_FLAGS[@]}"

# Only build blasheaders (and eventually tblgen)
ninja -C build-native -j ${nproc} blasheaders
# Only build blasheaders and tblgen
ninja -C build-native -j ${nproc} blasheaders enzyme-tblgen

# 2. Cross-compile
CMAKE_FLAGS=()
CMAKE_FLAGS+=(-DENZYME_EXTERNAL_SHARED_LIB=ON)
CMAKE_FLAGS+=(-DBC_LOAD_HEADER=`pwd`/build-native/BCLoad/gsl/blas_headers.h)
CMAKE_FLAGS+=(-DEnzyme_TABLEGEN_EXE=`pwd`/build-native/tools/enzyme-tblgen/enzyme-tblgen)
CMAKE_FLAGS+=(-DENZYME_CLANG=OFF)
# RelWithDebInfo for decent performance, with debugability
CMAKE_FLAGS+=(-DCMAKE_BUILD_TYPE=RelWithDebInfo)
Expand Down Expand Up @@ -94,6 +109,11 @@ for llvm_version in llvm_versions, llvm_assertions in (false, true)
LibraryProduct(["libEnzymeBCLoad-$(llvm_version.major)", "libEnzymeBCLoad"], :libEnzymeBCLoad, dont_dlopen=true),
]

if llvm_version >= v"15"
# We don't build LLVM 15 for i686-linux-musl.
filter!(p -> !(arch(p) == "i686" && libc(p) == "musl"), platforms)
end

for platform in platforms
augmented_platform = deepcopy(platform)
augmented_platform[LLVM.platform_name] = LLVM.platform(llvm_version, llvm_assertions)
Expand Down
Loading