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

feat: support alternative AD backends in linearization #3477

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AayushSabharwal
Copy link
Member

No description provided.

@ChrisRackauckas
Copy link
Member

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))
Copy link

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

Copy link
Member Author

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.

Copy link

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

Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants