Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed solution for #1375 #1376

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
4 changes: 4 additions & 0 deletions dace/transformation/subgraph/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def can_be_applied(self, sdfg: SDFG, subgraph: SubgraphView) -> bool:
# deepcopy
graph_indices = [i for (i, n) in enumerate(graph.nodes()) if n in subgraph]
sdfg_copy = copy.deepcopy(sdfg)
# NOTE: for `can_be_applied` purposes, set the parent attributes to the original SDFG's parents
sdfg_copy.parent = sdfg.parent
sdfg_copy.parent_sdfg = sdfg.parent_sdfg
sdfg_copy.parent_nsdfg_node = sdfg.parent_nsdfg_node
sdfg_copy.reset_sdfg_list()
graph_copy = sdfg_copy.nodes()[sdfg.nodes().index(graph)]
subgraph_copy = SubgraphView(graph_copy, [graph_copy.nodes()[i] for i in graph_indices])
Expand Down
Loading