Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split reverse mode for mutating functions is full of traps #142

Open
gdalle opened this issue Apr 5, 2024 · 0 comments
Open

Split reverse mode for mutating functions is full of traps #142

gdalle opened this issue Apr 5, 2024 · 0 comments
Labels
backend Related to one or more autodiff backends core Related to the core utilities of the package

Comments

@gdalle
Copy link
Owner

gdalle commented Apr 5, 2024

The only backends concerned by this are AutoEnzyme(Enzyme.ReverseModeSplit) and AutoTapir.

For mutating functions, it is dangerous to interrupt reverse mode autodiff after the forward sweep. The variables are in an intermediate state which will only be reverted after the reverse sweep completes.

In particular, Tapir requires running another forward sweep between reverse sweep, so a pullback closure would be useless.

I'm not sure how split reverse Enzyme works, will have to investigate.

Related:

@gdalle gdalle added backend Related to one or more autodiff backends core Related to the core utilities of the package labels Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to one or more autodiff backends core Related to the core utilities of the package
Projects
None yet
Development

No branches or pull requests

1 participant