-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Jacobian-Free Krylov Versions for TR/LM/GN #282
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #282 +/- ##
===========================================
+ Coverage 49.06% 94.04% +44.97%
===========================================
Files 19 20 +1
Lines 1824 1896 +72
===========================================
+ Hits 895 1783 +888
+ Misses 929 113 -816 ☔ View full report in Codecov by Sentry. |
@ChrisRackauckas this is good to go on my end |
__init_JᵀJ(J::StaticArray) = MArray{Tuple{size(J, 2), size(J, 2)}, eltype(J)}(undef) | ||
__init_JᵀJ(J::Number, args...; kwargs...) = zero(J), zero(J) | ||
function __init_JᵀJ(J::AbstractArray, fu, args...; kwargs...) | ||
JᵀJ = J' * J |
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.
what is actually using this?
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.
None of the algorithms by default. But if LM/GN/TR is forced to use a Linear Solve which only works with square matrices then this needs to be triggered.
end | ||
autodiff = __concrete_vjp_autodiff(vjp_autodiff, jvp_autodiff, uf) | ||
Jᵀ = VecJac(uf, u; fu, autodiff) | ||
JᵀJ_op = SciMLOperators.cache_operator(Jᵀ * J, u) |
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.
This operator shouldn't need to be constructed.
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.
without doing the cache thing, it complained that for in place operations we need to run set the cache (something along those lines)
u
. Should we allocate 2 caches? Inefficient for factorizations where we want to reuse factorization. How do we prevent the aliasingFixes #167