-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Adding A New AD #1105
Comments
You'd just define a along with the caches: https://github.com/SciML/SciMLSensitivity.jl/blob/v7.66.2/src/adjoint_common.jl#L212-L215 where that's used to build whatever caches are required to get a non-allocating vecjacobian. You would probably want to opt it into callbacks https://github.com/SciML/SciMLSensitivity.jl/blob/v7.66.2/src/callback_tracking.jl because it supports mutation. Similarly, GaussAdjoint needs a special cache SciMLSensitivity.jl/src/gauss_adjoint.jl Lines 416 to 432 in eded161
SciMLSensitivity.jl/src/gauss_adjoint.jl Lines 496 to 504 in eded161
and QuadratureAdjoint needs a fairly similar one SciMLSensitivity.jl/src/quadrature_adjoint.jl Lines 213 to 239 in eded161
SciMLSensitivity.jl/src/quadrature_adjoint.jl Lines 293 to 300 in eded161
|
Lovely, thanks for this. Is there a recommended way to test that my overloads are implemented correctly? |
You'll see that this file runs through lots of combinations: https://github.com/SciML/SciMLSensitivity.jl/blob/master/test/adjoint.jl#L46-L196 If you add a vjp option for Tapir then you should be able to just add an Because this grew organically over time it's a bit verbose, but we'll make that into a loop some day 😅 |
Haha excellent -- thanks for the info! |
Question❓
I'm interested in getting (the soon-to-be-renamed) Tapir.jl to work nicely with SciMLSensitivity.jl, as I understand this to be the way to get it to play nicely with the SciML ecosystem more broadly (please correct me if I'm wrong on this point!)
I can't see from the docs, or from a quick dive into some of the internals of this package, what the right way to go about this is. It looks like there's a few functions that I need to add methods for, but I'm not at all sure.
Could someone point me in the right direction?
The text was updated successfully, but these errors were encountered: