We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 367c982 commit fabd033Copy full SHA for fabd033
1 file changed
devito/passes/iet/mpi.py
@@ -41,9 +41,13 @@ def _drop_reduction_halospots(iet):
41
# If all HaloSpot reads pertain to reductions, then the HaloSpot is useless
42
for hs, expressions in MapNodes(HaloSpot, Expression).visit(iet).items():
43
scope = Scope(i.expr for i in expressions)
44
- for f, v in scope.reads.items():
45
- if f in hs.fmapper and all(i.is_reduction for i in v):
46
- mapper[hs].add(f)
+ for k, v in hs.fmapper.items():
+ f = v.bundle or k
+ if f not in scope.reads:
47
+ continue
48
+ v = scope.reads[f]
49
+ if all(i.is_reduction for i in v):
50
+ mapper[hs].add(k)
51
52
# Transform the IET introducing the "reduced" HaloSpots
53
mapper = {hs: hs._rebuild(halo_scheme=hs.halo_scheme.drop(mapper[hs]))
0 commit comments