From c597e24fbff9304188518dd2d15c7fe79cc019ef Mon Sep 17 00:00:00 2001 From: Yakup Budanaz Date: Tue, 3 Dec 2024 16:42:57 +0100 Subject: [PATCH] Naming fixes --- dace/frontend/python/newast.py | 2 +- dace/sdfg/sdfg.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dace/frontend/python/newast.py b/dace/frontend/python/newast.py index 255bd26983..bab8ffa0ab 100644 --- a/dace/frontend/python/newast.py +++ b/dace/frontend/python/newast.py @@ -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() diff --git a/dace/sdfg/sdfg.py b/dace/sdfg/sdfg.py index d3866cd07e..bfa85dc6ed 100644 --- a/dace/sdfg/sdfg.py +++ b/dace/sdfg/sdfg.py @@ -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