Skip to content

Commit

Permalink
compiler: Tweak topo-fusion
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioLuporini authored and mloubout committed Jan 14, 2025
1 parent 4bf6523 commit 82fa700
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions devito/passes/clusters/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,14 @@ def choose_element(queue, scheduled):
# Process the `strict` part of the key
candidates = [i for i in queue if m[i].itintervals == k.itintervals]

if k.guards:
compatible = [i for i in candidates if m[i].guards == k.guards]
candidates = compatible or candidates
compatible = [i for i in candidates if m[i].guards == k.guards]
candidates = compatible or candidates

if k.syncs:
compatible = [i for i in candidates if m[i].syncs == k.syncs]
candidates = compatible or candidates
compatible = [i for i in candidates if m[i].syncs == k.syncs]
candidates = compatible or candidates

# Process the `weak` part of the key
for i in reversed(range(len(k.weak) + 1)):
for i in range(len(k.weak), -1, -1):
choosable = [e for e in candidates if m[e].weak[:i] == k.weak[:i]]
try:
# Ensure stability
Expand Down

0 comments on commit 82fa700

Please sign in to comment.