Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dace/transformation/dataflow/map_expansion.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,14 @@ def apply(self, graph: dace.SDFGState, sdfg: dace.SDFG):
graph.add_edge(entries[-1], edge.src_conn, edge.dst, edge.dst_conn, memlet=copy.deepcopy(edge.data))
graph.remove_edge(edge)

if graph.in_degree(map_entry) == 0:
if graph.in_degree(map_entry) == 0 or all(
e.dst_conn is None or not e.dst_conn.startswith("IN_")
for e in graph.in_edges(map_entry)):
graph.add_memlet_path(map_entry, *entries, memlet=dace.Memlet())
else:
for edge in graph.in_edges(map_entry):
if edge.dst_conn is None:
continue
if not edge.dst_conn.startswith("IN_"):
continue

Expand Down