Skip to content

Commit

Permalink
Use the root of the data name for NestedSDFG connector validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnick83 committed Sep 6, 2023
1 parent 7e7f635 commit 36e5ed6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dace/sdfg/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,17 @@ def validate_state(state: 'dace.sdfg.SDFGState',
nsdfg_node = sdfg.parent_nsdfg_node
if nsdfg_node is not None:
# Find unassociated non-transients access nodes
if (not arr.transient and node.data not in nsdfg_node.in_connectors
and node.data not in nsdfg_node.out_connectors):
node_data = node.data.split('.')[0]
if (not arr.transient and node_data not in nsdfg_node.in_connectors
and node_data not in nsdfg_node.out_connectors):
raise InvalidSDFGNodeError(
f'Data descriptor "{node.data}" is not transient and used in a nested SDFG, '
f'Data descriptor "{node_data}" is not transient and used in a nested SDFG, '
'but does not have a matching connector on the outer SDFG node.', sdfg, state_id, nid)

# Find writes to input-only arrays
only_empty_inputs = all(e.data.is_empty() for e in state.in_edges(node))
if (not arr.transient) and (not only_empty_inputs):
if node.data not in nsdfg_node.out_connectors:
if node_data not in nsdfg_node.out_connectors:
raise InvalidSDFGNodeError(
'Data descriptor %s is '
'written to, but only given to nested SDFG as an '
Expand Down

0 comments on commit 36e5ed6

Please sign in to comment.