NLVS: Cache more adjoint solvers/forms and fix Hessian#4638
NLVS: Cache more adjoint solvers/forms and fix Hessian#4638JHopeCollins wants to merge 5 commits into
Conversation
b89fa44 to
2d9bc78
Compare
|
Hi team! Excellent work and thanks for doing this. I just wanted to flag something before this lands so we don't end up pulling in opposite directions. I've got a small fix sitting on a branch against main that makes the adjoint replay clone the I was just about to do a PR for that on main. But since your work reorganises exactly that area and your refactor is the more structural and better change, I am thinking it's the natural place to do this properly rather than me landing a fix on main that you'd then have to unpick. So I am going to do PR targetting this one if you are OK. If not and you don't like the idea just tell me off and I wait for this to land and do my thing. |
|
Hi Sia, Thanks for raising this. It's a good point, I don't know how we haven't run into this before! |
It only is a problem if the object on appctx changes during taping, so whatever is in there is different at the end of taping and the first fwd block. in our case is a temperature (coming from a different solve) dependent viscosity. |
|
A quick heads-up since this PR is reshaping the same file: I have just opened #5175, which fixes #5172 by recording the projection's effective solver parameters on the |
A bit of a doubling up on the already-present adj_sol on solver blocks.
* reduce nlvs adjoint test size * nlvs adjoint caching - bundle up recompute objects
6f6fd15 to
440f386
Compare
Hi Sia, thanks again for raising this. I think we should follow the same process as the |
No description provided.