Enzyme performs automatic differentiation (in the calculus sense) of LLVM programs. This enables users to use Enzyme to perform various algorithms such as back-propagation in ML or scientific simulation on existing code for any language that lowers to LLVM. Enzyme does so by applying the chain rule to every instruction in every function called by the original function to be differentiated. While functional, this is not necessarily optimal for high-level matrix operations which may have algebraic properties for faster derivative computation. Many programs use BLAS libraries to efficiently compute matrix and tensor operations. This project would enable high-performance automatic differentiation of BLAS and similar libraries (such as Eigen) by specifying custom derivative rules for their operations.

At the end of this Google Summer of Code project, Enzyme should be able to automatically calculate the optimal derivatives of several common linear algebra functions, thereby implicitly allowing easier integration of Enzyme in several mathematical computing libraries.


Pratyush Das


  • William Moses
  • Vassil Vassilev
  • Johannes Doerfert