| commit | 0238b63e3ba3731d1691f3e8a4001803b28951c1 | [log] [tgz] |
|---|---|---|
| author | William S. Moses <gh@wsmoses.com> | Mon Aug 16 19:43:26 2021 -0400 |
| committer | William Moses <gh@wsmoses.com> | Wed Aug 18 09:10:03 2021 -0400 |
| tree | 28fe2fb77556764dd05f61eb26f639b4a9958e53 | |
| parent | a81df94939d673f351ee8f927863f5d29aae1928 [diff] |
Correct errors
Enzyme is a plugin that performs automatic differentiation (AD) of statically analyzable LLVM.
Enzyme can be used by calling __enzyme_autodiff on a function to be differentiated as shown below. Running the Enzyme transformation pass then replaces the call to __enzyme_autodiff with the gradient of its first argument.
double foo(double); double grad_foo(double x) { return __enzyme_autodiff(foo, x); }
Enzyme is highly-efficient and its ability to perform AD on optimized code allows Enzyme to meet or exceed the performance of state-of-the-art AD tools.
Detailed information on installing and using Enzyme can be found on our website: https://enzyme.mit.edu.
A short example of how to install Enzyme is below:
cd /path/to/Enzyme/enzyme mkdir build && cd build cmake -G Ninja .. -DLLVM_DIR=/path/to/llvm/lib/cmake/llvm -DLLVM_EXTERNAL_LIT=/path/to/lit/lit.py ninja
Or, install Enzyme using Homebrew:
brew install enzyme
To get involved or if you have questions, please join our mailing list.
If using this code in an academic setting, please cite the following:
@incollection{enzymeNeurips,
title = {Instead of Rewriting Foreign Code for Machine Learning, Automatically Synthesize Fast Gradients},
author = {Moses, William S. and Churavy, Valentin},
booktitle = {Advances in Neural Information Processing Systems 33},
year = {2020},
note = {To appear in},
}
Julia bindings for Enzyme are available here