-
Notifications
You must be signed in to change notification settings - Fork 7
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
ReverseDiff support in an extension #46
Comments
I thought ReverseDiff was already compatible with ChainRules? |
You can "import" rules into ReverseDiff using |
So how do we define rules then? |
We define an internal function which takes the implicit function as its first argument. Then we define the rule on the internal function. (f::ImplicitFunction)(args...; kwargs...) = call_implicit_function(f, args...; kwargs...) |
Do we have to move all rules to this weird scheme or is it just for ReverseDiff? |
preferably we should move all rules to be consistent, defining that function is just an extra line of code |
The ChainRules docs says ReverseDiff doesn't support calling back into AD. That means we cannot use it for both the implicit function and the conditions. |
Thanks to DI we can use ReverseDiff for the conditions, but I don't think it will ever work for the outer backend |
It would be cool to make ReverseDiff work with this using the
ReverseDiff.@grad
macro. Examples: https://github.com/JuliaDiff/ReverseDiff.jl/blob/master/test/MacrosTests.jl#L184The text was updated successfully, but these errors were encountered: