Skip to content

Commit 59d7919

Browse files
committed
compiler: Tweak fission-for-parallelism
1 parent 59c357b commit 59d7919

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

devito/ir/clusters/algorithms.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ def callback(self, clusters, prefix, backlog=None, known_break=None):
156156

157157
# Schedule Clusters over different IterationSpaces if this increases
158158
# parallelism
159-
for i in range(1, len(clusters)):
159+
for i in reversed(range(len(clusters) - 1)):
160160
if self._break_for_parallelism(scope, candidates, i):
161-
return self.callback(clusters[:i], prefix, clusters[i:] + backlog,
161+
return self.callback(clusters[:i+1], prefix,
162+
clusters[i+1:] + backlog,
162163
candidates | known_break)
163164

164165
# Compute iteration direction

0 commit comments

Comments
 (0)