EnzymeAD / rust

A rust fork to work towards Enzyme integration
https://www.rust-lang.org
Other
72 stars 8 forks source link

ENZYME_OPT dbg improvements #147

Open ZuseZ4 opened 4 months ago

ZuseZ4 commented 4 months ago

Right now we add extra autodiff wrappers. That works good enough to test if tt are correct, and to debug things where enzyme fails on IR inside the function being differentiated. For some cases like rsmpi Enzyme will however also analyzes which arguments are passed into the function being differentiated and our ENZYME_OPT wrappers loose this information. We should therefore drop the artificial wrappers and add enzyme_autodiff calls to the same location where we would otherwise add the differentiated functions if we would have used enzyme as a library. The issue here are our ABI wrappers, which analyze the function that we get back from Enzyme, not sure how much trouble that will cause.