Sparse eq efunc lowering#2940
Draft
mloubout wants to merge 18 commits into
Draft
Conversation
…sses The 'kind' attribute and the 'kind == ...' / 'isinstance(eq, Inc)' branches that gated interpolation vs. injection behaviour are replaced by leaf classes (Interpolation, IncrInterpolation, Injection) sharing a small InterpolationMixin / InjectionMixin. The polymorphic surface (efunc_prefix, field, is_head_eq, sparse_temps) lives on the leaves, so the IET pass and the lowering pipeline drop their kind-discriminating conditionals.
6f2a15f to
0f1f9eb
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2940 +/- ##
===========================================
- Coverage 83.38% 52.30% -31.09%
===========================================
Files 248 249 +1
Lines 51960 52198 +238
Branches 4480 4509 +29
===========================================
- Hits 43326 27301 -16025
- Misses 7879 23916 +16037
- Partials 755 981 +226
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Sparse-op lowering belongs at the IET-pass level alongside other target-independent structural lowerings, not buried inside the MPI pass. Lifting it also fixes a missed host-device transfer on GPU: the position/coefficient temps it materialises read the coordinate SubFunctions, but those reads were invisible to place_transfers because Graph.data_movs was snapshotted before mpiize ran. Graph.data_movs is now a property recomputed from the live efunc set so downstream passes see ExprStmts introduced after Graph construction.
After lifting lower_sparse_ops out of mpiize, an injection nest is turned into a Call before optimize_halospots runs, so _drop_reduction_halospots can no longer detect that the wrapping HaloSpot's entry for the injected field is reduction-only. The stale entry was left in place, and on save=True (no modulo buffering) the hoist pass propagated the loop iteration variable out of the time loop, producing an undeclared 'time' reference. Drop those entries at lowering time so the resulting HaloSpot only carries entries with a genuine read at the IET level.
8fc3dc4 to
0c27438
Compare
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.
Revamp interpolation
Testing CI