Skip to content

apply linearise in init for Normal and iterative solvers#198

Open
jpbrodrick89 wants to merge 1 commit intopatrick-kidger:mainfrom
jpbrodrick89:jpb/linearise-normal-iterative
Open

apply linearise in init for Normal and iterative solvers#198
jpbrodrick89 wants to merge 1 commit intopatrick-kidger:mainfrom
jpbrodrick89:jpb/linearise-normal-iterative

Conversation

@jpbrodrick89
Copy link
Contributor

This is not without precedent as is done already in CG. The motivation is that both Normal and iterative solvers employ multiple mv's in sequence that cannot be parallelised, in which case calling linearise to cache the primal computation for JacobianLinearOperators should be more efficient. This is essentially hiding some complexity and decision-making stress from users at the cost of reduce control if there really is a case where not caching the primal computation saves significant memory. Typically, when memory is the bottleneck iterative solvers are the go to and I can't really envisage a case where you could run e.g. LSMR with JacobianLinearOperator but not with FunctionLinearOperator but I may be way off the mark.

If you'd rather not do this, should we remove linearise from CG?

@patrick-kidger
Copy link
Owner

This looks reasonable to me!

...although we appear to have a lot of test failures (not just the nitty ongoing LSMR thing)?

@jpbrodrick89
Copy link
Contributor Author

jpbrodrick89 commented Feb 5, 2026

I think these are fixed by #200 just not merged here (this PR I think was the trigger to go and fix it! 😅), if you're happy with #200 I can rebase the other PR's accordingly. Happy to take a relay approach here where we iterate and merge a PR or two at a time rather than a big sweep. Just trying to break up the cognitive load in to manageable chunks for you. 😊

#200 is definitely the candidate for first merge rn. I can let you know which are next most ready as we go, sorry about the avalanche, when you get deep in the weeds these things all knot together😅

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.

2 participants