Skip to content

Commit

Permalink
Change RefineNestedAccess to only look at memlets which are in the re…
Browse files Browse the repository at this point in the history
…ad and write set
  • Loading branch information
Samuel Martin committed Jul 20, 2023
1 parent 7343f55 commit bb00fea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dace/transformation/interstate/sdfg_nesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,12 @@ def _candidates(
continue

# For now we only detect one element
read_set, write_set = nstate.read_and_write_sets()
for e in nstate.in_edges(dnode):
if e.data.data not in write_set:
# Skip data which is not in the read and write set of the state -> there also won't be a
# connector
continue
# If more than one unique element detected, remove from
# candidates
if e.data.data in out_candidates:
Expand All @@ -941,6 +946,10 @@ def _candidates(
continue
out_candidates[e.data.data] = (e.data, nstate, set(range(len(e.data.subset))))
for e in nstate.out_edges(dnode):
if e.data.data not in read_set:
# Skip data which is not in the read and write set of the state -> there also won't be a
# connector
continue
# If more than one unique element detected, remove from
# candidates
if e.data.data in in_candidates:
Expand Down

0 comments on commit bb00fea

Please sign in to comment.