Skip to content

Commit df8672d

Browse files
committed
compiler: Tweak par-tile unrolling in rare cases
1 parent a62ee8c commit df8672d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

devito/passes/clusters/blocking.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -627,17 +627,17 @@ def apply_par_tiles(clusters, options, **kwargs):
627627

628628
blk_size_gen = BlockSizeGenerator(options['par-tile'])
629629

630-
key0 = lambda d: d.is_Block and d._depth == 2
631-
key = lambda c: c.ispace.project(key0).itdims
630+
key = lambda c: c.ispace.project(lambda d: d.is_Block)
632631

633632
processed = []
634-
for bdims, group in groupby(clusters, key=key):
633+
for ispace, group in groupby(clusters, key=key):
635634
g = list(group)
636635

637-
if not bdims:
636+
if not ispace:
638637
processed.extend(g)
639638
continue
640639

640+
bdims = ispace.project(lambda d: d._depth == 2).itdims
641641
umt = blk_size_gen.schedule(bdims, g)
642642

643643
subs = {}

0 commit comments

Comments
 (0)