Skip to content

Commit 2015111

Browse files
EdCauntmloubout
authored andcommitted
compiler: Revert incorrect modifications to DAG construction
1 parent 1c96965 commit 2015111

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

devito/ir/support/basic.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ def distance(self, other):
363363
# Case 1: `sit` is an IterationInterval with statically known
364364
# trip count. E.g. it ranges from 0 to 3; `other` performs a
365365
# constant access at 4
366-
# TODO: This case represents the majority of time constructing a DAG
367366
for v in (self[n], other[n]):
368367
try:
369368
if bool(v < sit.symbolic_min or v > sit.symbolic_max):
@@ -1127,10 +1126,6 @@ def d_anti(self):
11271126
"""Anti (or "write-after-read") dependences."""
11281127
return DependenceGroup(self.d_anti_gen())
11291128

1130-
@cached_property
1131-
def has_antidependencies(self):
1132-
return any(i.cause for i in self.d_anti_gen())
1133-
11341129
@memoized_generator
11351130
def d_output_gen(self):
11361131
"""Generate the output (or "write-after-write") dependences."""

devito/passes/clusters/misc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,9 @@ def is_cross(source, sink):
362362
# (intuitively, "the loop nests are to be kept separated")
363363
# * All ClusterGroups between `cg0` and `cg1` must precede `cg1`
364364
# * All ClusterGroups after `cg1` cannot precede `cg1`
365-
# TODO: Check that this is indeed what the attribute does
366-
if prefix and scope.has_antidependencies:
365+
366+
# FIXME: Slow
367+
if any(i.cause & prefix for i in scope.d_anti_gen()):
367368
for cg2 in cgroups[n:cgroups.index(cg1)]:
368369
dag.add_edge(cg2, cg1)
369370
for cg2 in cgroups[cgroups.index(cg1)+1:]:

0 commit comments

Comments
 (0)