Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions devito/passes/clusters/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ def callback(self, cgroups, prefix):
# Toposort to maximize fusion
if self.toposort:
clusters = self._toposort(cgroups, prefix)
if self.toposort == 'nofuse':
return [clusters]
else:
clusters = ClusterGroup(cgroups)

Expand All @@ -146,6 +144,13 @@ def callback(self, cgroups, prefix):
g = list(group)

for maybe_fusible in self._apply_heuristics(g):
if self.toposort == 'nofuse':
# Special case: we retain the ClusterGroup to maximize the
# effectiveness of the toposort at the next stage, but we
# do not actually fuse anything
processed.append(ClusterGroup(maybe_fusible, prefix))
continue

try:
# Perform fusion
processed.append(Cluster.from_clusters(*maybe_fusible))
Expand Down
Loading