From 6fc589034955ce744a31d8d1a8fb9a574a2ece95 Mon Sep 17 00:00:00 2001 From: Tal Ben-Nun Date: Sun, 24 Sep 2023 18:09:51 -0700 Subject: [PATCH] Revert changes made to the Python frontend (these may belong in a different PR) --- dace/frontend/python/newast.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dace/frontend/python/newast.py b/dace/frontend/python/newast.py index 9f57759b9d..2010aa6b1e 100644 --- a/dace/frontend/python/newast.py +++ b/dace/frontend/python/newast.py @@ -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 @@ -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: