-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Adjoints for Linear Solve #449
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #449 +/- ##
===========================================
- Coverage 66.12% 22.96% -43.17%
===========================================
Files 27 28 +1
Lines 2146 2147 +1
===========================================
- Hits 1419 493 -926
- Misses 727 1654 +927 ☔ View full report in Codecov by Sentry. |
src/adjoint.jl
Outdated
# Forward Solve | ||
sol = solve!(cache, alg, args...; kwargs...) | ||
|
||
function ∇solve!(∂sol) |
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.
Don't we technically have to deepcopy in here?
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 guess so, it can be problematic if there are 2 subsequent solve calls on the cache.
Is this not just an inherent limitation of Zygote with mutation? I would presume we just need to stay away from that and only support |
4198c86
to
2493dca
Compare
Fixes #198, Fixes #322
TODOs:
linsolve !== nothing
case. This is useful if we know thatExample:
In the following case the cache stores the correct gradients but they are not propagated to
A
andb
. @ChrisRackauckas any idea how to fix this?