Skip to content

Commit

Permalink
MapFission: WCR in NestedSDFG fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastruemper committed Sep 3, 2023
1 parent c5ca99a commit 1ea713f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dace/transformation/dataflow/map_fission.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ def apply(self, graph: sd.SDFGState, sdfg: sd.SDFG):
edge_to_outer[edge] = path[eindex - 1]
else:
# Nested SDFGs use the internal map edges of the node
outer_edge = next(e for e in graph.in_edges(nsdfg_node) if e.dst_conn == edge.src.data)
outer_edge = [e for e in graph.in_edges(nsdfg_node) if e.dst_conn == edge.src.data]
if not outer_edge:
outer_edge = [e for e in graph.out_edges(nsdfg_node) if e.src_conn == edge.src.data and e.data.wcr is not None]
outer_edge = outer_edge[0]
edge_to_outer[edge] = outer_edge

for edge in external_edges_exit:
Expand Down

0 comments on commit 1ea713f

Please sign in to comment.