Skip to content

Commit

Permalink
Naming fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ThrudPrimrose committed Dec 3, 2024
1 parent 1164e8c commit c597e24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dace/frontend/python/newast.py
Original file line number Diff line number Diff line change
Expand Up @@ -3970,7 +3970,7 @@ def _parse_sdfg_call(self, funcname: str, func: Union[SDFG, SDFGConvertible], no
# Change transient names
arrays_before = list(sdfg.arrays.items())
for arrname, array in arrays_before:
if array.transient and arrname[:5] == '__tmp':
if array.transient and arrname[:5] == '__tmp' and arrname not in sdfg.size_arrays():
if int(arrname[5:]) < self.sdfg._temp_transients:
if self.sdfg._temp_transients > sdfg._temp_transients:
new_name = self.sdfg.temp_data_name()
Expand Down
3 changes: 3 additions & 0 deletions dace/sdfg/sdfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,9 @@ def arrays(self):
"""
return self._arrays

def size_arrays(self):
return [v.size_desc_name for v in self._arrays.values() if v.size_desc_name is not None and v.size_desc_name in self._arrays]

@property
def arrays(self):
return self._arrays
Expand Down

0 comments on commit c597e24

Please sign in to comment.