Skip to content

Commit

Permalink
Copy2Map: Check for happens-before memlets
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastruemper committed Dec 2, 2023
1 parent e17f0f4 commit 5e1bdfa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dace/transformation/dataflow/copy_to_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ def can_be_applied(self, graph: SDFGState, expr_index: int, sdfg: SDFG, permissi
if self.a.desc(sdfg).strides == self.b.desc(sdfg).strides:
return False

# Happens-before edges
for edge in graph.edges_between(self.a, self.b):
if edge.data.data is None:
return False

return True

def delinearize_linearize(self, desc: data.Array, copy_shape: Tuple[symbolic.SymbolicType],
Expand Down

0 comments on commit 5e1bdfa

Please sign in to comment.