Skip to content

Commit

Permalink
Fix schedule tree conversion for use of arrays in conditions (#1440)
Browse files Browse the repository at this point in the history
If a data container appears as part of `read_symbols` (i.e., as an
object, e.g., `x is not None`), do not replace it with a memlet.
  • Loading branch information
tbennun committed Nov 22, 2023
1 parent 12b9981 commit 4139ddf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dace/sdfg/analysis/schedule_tree/sdfg_to_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ def replace_memlets(sdfg: SDFG, input_mapping: Dict[str, Memlet], output_mapping
syms.remove(memlet.data)
for s in syms:
if s in input_mapping:
repl_dict[s] = str(input_mapping[s])
if s in sdfg.arrays:
repl_dict[s] = input_mapping[s].data
else:
repl_dict[s] = str(input_mapping[s])

# Manual replacement with strings
# TODO(later): Would be MUCH better to use MemletReplacer / e.data.replace_dict(repl_dict, replace_keys=False)
Expand Down

0 comments on commit 4139ddf

Please sign in to comment.