Skip to content

Commit

Permalink
InlineMultistateSDFG: Generalization II
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastruemper committed Mar 3, 2024
1 parent 1496d64 commit e455b0b
Show file tree
Hide file tree
Showing 4 changed files with 733 additions and 453 deletions.
8 changes: 8 additions & 0 deletions dace/transformation/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from dace.sdfg import SDFG, SDFGState, InterstateEdge
from dace.sdfg import graph
from dace.memlet import Memlet
from dace.sdfg.utils import get_all_view_nodes, get_view_edge


def nest_sdfg_subgraph(sdfg: SDFG, subgraph: SubgraphView, start: Optional[SDFGState] = None) -> SDFGState:
Expand Down Expand Up @@ -718,6 +719,13 @@ def state_fission_after(sdfg: SDFG, state: SDFGState, node: nodes.Node, label: O
nodes_to_move.add(e.src)
orig_edges.add(e)

for n in list(nodes_to_move):
if isinstance(n, nodes.AccessNode) and isinstance(sdfg.arrays[n.data], data.View):
for view_node in get_all_view_nodes(state, n):
nodes_to_move.add(view_node)
orig_edges.add(get_view_edge(state, view_node))


# Define boundary nodes
for node in set(nodes_to_move):
if isinstance(node, nodes.AccessNode):
Expand Down

0 comments on commit e455b0b

Please sign in to comment.