Repository navigation
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3128 +/- ##
==========================================
- Coverage 83.99% 83.93% -0.07%
==========================================
Files 261 263 +2
Lines 60017 60554 +537
Branches 5065 5135 +70
==========================================
+ Hits 50413 50826 +413
- Misses 8760 8879 +119
- Partials 844 849 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
EdCaunt
commented
Dec 1, 2026
|
|
||
|
|
||
| def _merge_halospots(iet): | ||
| def _sink_halospots(iet): |
Contributor
Author
There was a problem hiding this comment.
This is needed as a result of the changes in algorithms.py to ensure that test_avoid_merging_if_diff_functions still retains its original behaviour (with MPI modes featuring computation-communication overlap - more permissive merging of halo exchanges is preferable otherwise).
FabioLuporini
approved these changes
Dec 2, 2026
Every HaloTouch wrote the same mock Symbol, so all HaloTouches were totally ordered via output dependences. Combined with the mock WARs tying each HaloTouch to the Functions its owner writes, this could pin a HaloTouch between independent Clusters, preventing their fusion depending on the order of the input equations (e.g. equations over SubDomains given per equation rather than per SubDomain). * Each HaloTouch now writes its own mock Symbol, named via the SymbolRegistry * Fusion's topological sorting no longer schedules HaloTouches: they are drained as soon as ready, and reinserted after their predecessors and before their earliest successor, within the run of loop nests sharing loops with the latter, at the gap splitting the fewest shared loops. This preserves the existing halo exchange placement (e.g. no merging of the exchanges of different Functions) while allowing the fusion Co-Authored-By: Claude Opus 5.5 <[email protected]>
EdCaunt
force-pushed
the
fix-halotouch-toposort
branch
from
December 2, 2026 14:40
ffbc420 to
36570b4
Compare
Replace the greedy choice in `Fusion._toposort` with ordered typed fusion [Kennedy & McKinley, 1993]: one type at a time, each ClusterGroup joins the first group of its type it may fuse with (compatible IterationSpace, no fence or prefix anti-dependence in between, contraction keeps the DAG acyclic), and groups are emitted in topological order, ready HaloTouches first. The greedy choice could not see that scheduling a HaloTouch unblocks a fusible successor. Output dependences not carried by the prefix no longer glue Clusters into the same ClusterGroup at inner levels, as they only impose an order. Conservative WAWs between disjoint SubDomains made such groups atomic, preventing fusion. `Keys.type` extends `Keys.full` with the data type and the iteration Dimensions, which `Cluster.from_clusters` also requires, and keys both typed fusion and the actual fusion of adjacent Clusters. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add `toposort='topdown'`, which reorders Clusters from the outermost level inwards, so that each level is ordered before being divided, and then fuses them. With `toposort=True`, a Cluster moved at an outer level never reaches the inner groups it may fuse with, so the outcome depends on equation order. * `Reorder` runs ordered typed fusion top-down: a fine pass by `Keys.type`, then a coarse pass merging the groups that may share an outer loop * Clusters sharing storage the shared loop doesn't index (e.g. contracted temporaries) stay one indivisible unit * Unless tasks are fused, Clusters with locks stay in program order * HaloTouches no longer type a ClusterGroup nor constrain its compatibility, which also fixes `toposort=True` * Core CPU and GPU pipelines switch to `toposort='topdown'` Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
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.
Every HaloTouch wrote the same mock Symbol, so all HaloTouches were totally ordered via output dependences. Combined with the mock WARs tying each HaloTouch to the Functions its owner writes, this could pin a HaloTouch between independent Clusters, preventing their fusion depending on the order of the input equations (e.g. equations over SubDomains given per equation rather than per SubDomain).
mpi.pyto push halospots down to the first loop nest reading them (for computation-communication overlap)