EnzymeAD / Enzyme

High-performance automatic differentiation of LLVM and MLIR.
https://enzyme.mit.edu
Other
1.25k stars 104 forks source link

How to use enzyme in my makefile? #1992

Open ZhangFengshun opened 1 month ago

ZhangFengshun commented 1 month ago

Hi there, I have installed Enzyme on my PC using Homebrew, and I want to use Enzyme in my CFD code. However, I don't know how to compile my code using Enzyme. The Makefile for my code is as follows: image And main code is like: image

wsmoses commented 1 month ago

You should add an -fplugin=/path/to/ClangEnzyme-XX.so

ZhangFengshun commented 1 month ago

You should add an -fplugin=/path/to/ClangEnzyme-XX.so

Thank you, I tried to add this line but encountered some errors.

makefile: image

ouputs: image