enzyme

Automatic differentiation compiler plugin for LLVM and C/C++ code

brewmacoslinux
Try with needOr install directly
Source

About

High-performance automatic differentiation of LLVM

Commands

enzyme

Examples

Load Enzyme as an LLVM pass plugin for optimization$ opt -load-pass-plugin=$(brew --prefix enzyme)/lib/LLVMEnzyme.so -passes=enzyme input.ll -o output.ll
Compile C code with automatic differentiation using Clang$ clang -fplugin=$(brew --prefix enzyme)/lib/LLVMEnzyme.so -O3 program.c -o program
Use Enzyme within LLVM IR workflow for derivative computation$ llvm-as input.ll | opt -load-pass-plugin=$(brew --prefix enzyme)/lib/LLVMEnzyme.so -passes=enzyme | llvm-dis