From 5e1bdfa89c00c3ca157e121491ae0d3a2a533a38 Mon Sep 17 00:00:00 2001 From: Lukas Truemper Date: Wed, 29 Nov 2023 07:29:15 +0100 Subject: [PATCH] Copy2Map: Check for happens-before memlets --- dace/transformation/dataflow/copy_to_map.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dace/transformation/dataflow/copy_to_map.py b/dace/transformation/dataflow/copy_to_map.py index 24532780b7..da102e70b3 100644 --- a/dace/transformation/dataflow/copy_to_map.py +++ b/dace/transformation/dataflow/copy_to_map.py @@ -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],