-
Notifications
You must be signed in to change notification settings - Fork 57
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
Enzyme requests reverse rule on Const returns #1380
Comments
If a function could mutate things in place, returning a constant output is well defined. You need to also define a rule for the const output case (which for this function would do nothing since it is read-only). |
Sorry, I forgot to mention that I did try doing that, but still received the same error.
|
dret should be |
I receive the same error with this method signature
|
You also need the corresponding augmented primal rule as well (the error above says augmented_primal) wasn't found |
Sorry. Your right. I missed that. This worked 😀 |
I'm trying to define custom autodiff rules on some special functions. Defining any custom autodiff rules however causes
Enzyme
to request a rule forConst
returns. Here's a MWEThe following error then occurs when a
Const
output is requested from a reverse diffThe text was updated successfully, but these errors were encountered: