Conversation
|
Very cool to see! |
65523d2 to
fd75087
Compare
…ath explicitly set in spack.yaml.
reid-g
left a comment
There was a problem hiding this comment.
Compiled and ran with LLVM v18.1.8 and Enzyme v0.0.172 on Ubuntu 20.04.6 LTS (WSL). All test passed locally.
Besides the ninja issue, everything looks good to me.
ashermancinelli
left a comment
There was a problem hiding this comment.
Looks good! Let me know if you run into issues with clang/phase ordering/etc. Good luck!
pelesh
left a comment
There was a problem hiding this comment.
I suggest we merge this as it has basic infrastructure and tests for Enzyme support. We can expand testing and documentation through subsequent PRs.
I left a couple of nitpicking comments.
| #install(TARGETS ${CMAKE_CURRENT_BINARY_DIR}/EnzymeLibCheck DESTINATION bin) | ||
|
|
There was a problem hiding this comment.
Do we want to install Enzyme targets or this is out of scope for this PR?
| double square(double x) { | ||
| return x * x; | ||
| } | ||
|
|
There was a problem hiding this comment.
Should this be hard-wired double or configurable real_type?
* Preliminary support for automatic differentiation using Enzyme * Build GridKit with Enzyme as dependency * Add simple Enzyme tests * Add Spack package for GridKit. * gridkit +enzyme in CI. * Update README with Enzyme dependency. * Changed Enzyme add_custom_target name to fix build issues with Ninja. --------- Co-authored-by: Asher Mancinelli <ashermancinelli@gmail.com> Co-authored-by: Slaven Peles <peless@ornl.gov>
This builds on earlier work from Asher and Slaven to add examples using the Enzyme automatic differentiation library.
There are two new tests compared to
developthat should pass.Building Enzyme from source is discussed in #23. I tested that approach as well as building LLVM and Enzyme through Spack, and both approaches work for this use-case.