Skip to content

Commit

Permalink
Revert changes made to the Python frontend
Browse files Browse the repository at this point in the history
(these may belong in a different PR)
  • Loading branch information
tbennun committed Sep 25, 2023
1 parent 7816999 commit 6fc5890
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions dace/frontend/python/newast.py
Original file line number Diff line number Diff line change
Expand Up @@ -4941,10 +4941,6 @@ def visit_Subscript(self, node: ast.Subscript, inference: bool = False):
# If this subscript originates from an external array, create the
# subset in the edge going to the connector, as well as a local
# reference to the subset
# old_node = node
# if isinstance(node.value, ast.Name):
# true_node = copy.deepcopy(old_node)
# true_node.value.id = true_name
if (true_name not in self.sdfg.arrays and isinstance(node.value, ast.Name)):
true_node = copy.deepcopy(node)
true_node.value.id = true_name
Expand All @@ -4961,9 +4957,9 @@ def visit_Subscript(self, node: ast.Subscript, inference: bool = False):
rng.offset(rng, True)
return self.sdfg.arrays[true_name].dtype, rng.size()
if is_read:
new_name, new_rng = self._add_read_access(true_name, rng, node)
new_name, new_rng = self._add_read_access(name, rng, node)
else:
new_name, new_rng = self._add_write_access(true_name, rng, node)
new_name, new_rng = self._add_write_access(name, rng, node)
new_arr = self.sdfg.arrays[new_name]
full_rng = subsets.Range.from_array(new_arr)
if new_rng.ranges == full_rng.ranges:
Expand Down

0 comments on commit 6fc5890

Please sign in to comment.