-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
feat: support alternative AD backends in linearization #3477
base: master
Are you sure you want to change the base?
Conversation
Test failures |
T = p isa MTKParameters ? eltype(p.tunable) : eltype(p) | ||
hp_jac = PreparedJacobian{true}( | ||
hp_fun, zeros(T, size(outputs)), autodiff, inputvals, | ||
DI.Constant(prob.u0), DI.Constant(p), DI.Constant(t0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to use DI.ConstantOrCache
for the parameter p
if it contains storage where active data gets written
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's never written to. setter
is out of place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok good, the same remark holds for other uses of Constant but I guess it gets the same answer. Just asking because we had the issue in OrdinaryDiffEq
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the review nonetheless! It's nice to be doubly sure this is correct
Co-authored-by: Fredrik Bagge Carlson <baggepinnen@gmail.com>
9b61cae
to
d448fc5
Compare
No description provided.