libshell icon indicating copy to clipboard operation
libshell copied to clipboard

Skeleton of Enzyme Build

Open chipbuster opened this issue 1 year ago • 2 comments

This PR demos how to modify the CMakeLists.txt to build with Enzyme. It also includes a very simple example of a function being autodiffed by Enzyme.

I have verified that the square and dsquare function appear in liblibshell.a when building. This PR is not intended to be merged as-is.

chipbuster avatar Oct 23 '23 20:10 chipbuster

CMake build mostly-poached from https://github.com/EnzymeAD/CMake-Template

chipbuster avatar Oct 23 '23 20:10 chipbuster

Usage:

mkdir build && cd build
cmake -DEnzyme_DIR=/path/to/Enzyme/enzyme/build 
make

If Enzyme is installed in a system path, the DEnzyme_DIR argument to cmake can be dropped.

chipbuster avatar Oct 23 '23 20:10 chipbuster