From 5d22609f3c90067896f874ee8a1e69494cb3ccd9 Mon Sep 17 00:00:00 2001 From: Marcin Copik Date: Thu, 7 Dec 2023 18:44:19 +0100 Subject: [PATCH] Fix handling of intrinsic transformations --- dace/frontend/fortran/fortran_parser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dace/frontend/fortran/fortran_parser.py b/dace/frontend/fortran/fortran_parser.py index 0388f94688..1cdecc99a8 100644 --- a/dace/frontend/fortran/fortran_parser.py +++ b/dace/frontend/fortran/fortran_parser.py @@ -1091,7 +1091,8 @@ def create_ast_from_string( program = ast_transforms.ArrayToLoop(program).visit(program) for transformation in own_ast.fortran_intrinsics().transformations(): - program = transformation(program).visit(program) + transformation.initialize(program) + program = transformation.visit(program) program = ast_transforms.ForDeclarer().visit(program) program = ast_transforms.IndexExtractor(program, normalize_offsets).visit(program) @@ -1174,7 +1175,8 @@ def create_sdfg_from_fortran_file(source_string: str, use_experimental_cfg_block program = ast_transforms.ArrayToLoop(program).visit(program) for transformation in own_ast.fortran_intrinsics(): - program = transformation(program).visit(program) + transformation.initialize(program) + program = transformation.visit(program) program = ast_transforms.ForDeclarer().visit(program) program = ast_transforms.IndexExtractor(program).visit(program)