Repository navigation
[gpu-3] Share polar spline factorizations across solvers - #760
Merged
max-models merged 1 commit intoOct 13, 2026
Merged
Conversation
max-models
added this pull request to stack #729
October 12, 2026 12:34
spossann
previously approved these changes
Oct 13, 2026
max-models
force-pushed
the
gpu-3-polar-factorization-cache
branch
2 times, most recently
from
October 13, 2026 09:41
f119ad9 to
ea49db6
Compare
max-models
force-pushed
the
gpu-3-polar-factorization-cache
branch
from
October 13, 2026 11:56
ea49db6 to
5ae9dba
Compare
spossann
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building multiple polar projector and mass-preconditioner instances repeatedly factorizes identical matrices and creates duplicate device copies. This change shares live 1D and poloidal factors across the polar spaces of one Derham object.
Stack: based on
gpu-2-vlasov-benchmark(#735), as the next PR in the GPU stack.The cache matches exact canonical sparse matrix contents and dtype, solver kind and ILU settings, Schur pole masks/outer factors, and backend/device. It reuses both host factorizations and their cached GPU solves. Boundary-condition and transposed variants share only when their matrices and configurations actually match. Updated mass weights obtain new poloidal factors while retaining unchanged 1D factors.
Entries use weak references: live solvers keep their factors, while obsolete factors and their keys are released when no solver uses them. Different Derham objects have separate caches.
In the small-cylinder fixture, constructing all four solve variants for P0–P3 reduces sparse LU calls from 88 to 9, and dense Schur LU calls from 24 to 8.
Validation:
git diff --check, and commit hooks passed. Assembly kernels compiled with GNU/Fortran for local verification.