Skip to content

Commit

Permalink
compiler: Impose canonical ordering for HaloTouch args
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini committed Jun 4, 2023
1 parent 17e2038 commit 404339f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions devito/ir/clusters/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ def callback(self, clusters, prefix, seen=None):
# be rescheduled after `c` upon topological sorting
points.update(a.access for a in c.scope.accesses if a.is_write)

# Sort for determinism
# NOTE: not sorting might impact code generation. The order of
# the args is important because that's what search functions honor!
points = sorted(points, key=str)

rhs = HaloTouch(*points, halo_scheme=halo_scheme)

# Insert only if not redundant, to avoid useless pollution
Expand Down

0 comments on commit 404339f

Please sign in to comment.