From 0b31f9aa92ee4db1a70a60d8a0c492affb900a27 Mon Sep 17 00:00:00 2001 From: Yakup Budanaz Date: Thu, 21 Nov 2024 18:51:58 +0100 Subject: [PATCH] Use free symbols instead of arglist --- dace/codegen/targets/framecode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dace/codegen/targets/framecode.py b/dace/codegen/targets/framecode.py index 1845f3b692..cd3e9222a3 100644 --- a/dace/codegen/targets/framecode.py +++ b/dace/codegen/targets/framecode.py @@ -896,7 +896,7 @@ def generate_code(self, # Allocate outer-level transients self.allocate_arrays_in_scope(sdfg, sdfg, sdfg, global_stream, callsite_stream) - global_args = sdfg.arglist() + outside_symbols = sdfg.free_symbols # Define constants as top-level-allocated for cname, (ctype, _) in sdfg.constants_prop.items(): @@ -956,7 +956,7 @@ def generate_code(self, self.dispatcher.defined_vars.add(isvarName, disp.DefinedType.Scalar, isvarType.ctype) else: # If the variable is passed as an input argument to the SDFG, do not need to declare it - if isvarName not in global_args: + if isvarName not in outside_symbols: callsite_stream.write('%s;\n' % (isvar.as_arg(with_types=True, name=isvarName)), sdfg) self.dispatcher.defined_vars.add(isvarName, disp.DefinedType.Scalar, isvarType.ctype) callsite_stream.write('\n', sdfg)