[Enzyme] Enable The New Pass Manager

Description of the project: Enzyme is a compiler plugin for LLVM that 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 integrates into frontends through the use of an LLVM plugin that can be loaded into Clang, LLVM (opt), the linker (lld), libraries (HIPRtc), directly loaded (Julia), among others (Flang, Rust, etc).

While using various pieces of machinery from the new pass manager internally, Enzyme does not currently automatically register its transformation passes when using the new pass manager. This creates problems for users on LLVM 13 or above, where the new pass manager is run by default and may not understand why they get linker errors from their code not being differentiated (currently they must add a flag to specify the old pass manager).

The goal of this project is to enable Enzyme to be called by the new pass manager in LLVM and generally create a coherent user experience.

Expected results:

  • Enzyme can be called by the new pass manager
  • [optional, as time permits] Additional syntactic sugar that makes it easier to use Enzyme.

Desirable skills: Good knowledge of C++, and LLVM. Experience with Enzyme would be nice, but can also be learned in the project.

Mentors: William Moses (@wsmoses), Valentin Churavy (@vchuravy)

Project type: Small

1 Like

Hi @wsmoses
I am interested in doing this project. I sent you and llvm@discoursemail.com an email and with my CV attached.