diff --git a/dace/frontend/fortran/ast_components.py b/dace/frontend/fortran/ast_components.py index 49a28a3650..0e62ab91b9 100644 --- a/dace/frontend/fortran/ast_components.py +++ b/dace/frontend/fortran/ast_components.py @@ -1,4 +1,4 @@ -# Copyright 2019-2023 ETH Zurich and the DaCe authors. All rights reserved. +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. from typing import Any, List, Optional, Type, TypeVar, Union, overload, TYPE_CHECKING, Dict import networkx as nx diff --git a/dace/frontend/fortran/ast_desugaring.py b/dace/frontend/fortran/ast_desugaring.py index 7d8b3d58e1..bfcc842bc5 100644 --- a/dace/frontend/fortran/ast_desugaring.py +++ b/dace/frontend/fortran/ast_desugaring.py @@ -1,3 +1,5 @@ +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. + import math import operator import re diff --git a/dace/frontend/fortran/ast_internal_classes.py b/dace/frontend/fortran/ast_internal_classes.py index 54475892b6..643aad802b 100644 --- a/dace/frontend/fortran/ast_internal_classes.py +++ b/dace/frontend/fortran/ast_internal_classes.py @@ -1,4 +1,4 @@ -# Copyright 2019-2023 ETH Zurich and the DaCe authors. All rights reserved. +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. from typing import List, Optional, Tuple, Union, Dict, Any # The node class is the base class for all nodes in the AST. It provides attributes including the line number and fields. diff --git a/dace/frontend/fortran/ast_transforms.py b/dace/frontend/fortran/ast_transforms.py index 8a69e9e2a8..de0ef6c259 100644 --- a/dace/frontend/fortran/ast_transforms.py +++ b/dace/frontend/fortran/ast_transforms.py @@ -1,4 +1,4 @@ -# Copyright 2023 ETH Zurich and the DaCe authors. All rights reserved. +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. import copy from typing import Dict, List, Optional, Tuple, Set, Union diff --git a/dace/frontend/fortran/ast_utils.py b/dace/frontend/fortran/ast_utils.py index 5251fc10bc..378d647895 100644 --- a/dace/frontend/fortran/ast_utils.py +++ b/dace/frontend/fortran/ast_utils.py @@ -1,26 +1,24 @@ -# Copyright 2023 ETH Zurich and the DaCe authors. All rights reserved. -from itertools import chain -from typing import List, Set, Iterator, Type, TypeVar, Dict, Tuple, Iterable, Union, Optional - -import networkx as nx -from fparser.two.Fortran2003 import Module_Stmt, Name, Interface_Block, Subroutine_Stmt, Specification_Part, Module, \ - Derived_Type_Def, Function_Stmt, Interface_Stmt, Function_Body, Type_Name, Rename, Entity_Decl, Kind_Selector, \ - Intrinsic_Type_Spec, Use_Stmt, Declaration_Type_Spec -from fparser.two.Fortran2008 import Type_Declaration_Stmt, Procedure_Stmt +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. + +from typing import (Dict, Iterable, Iterator, List, Optional, Set, Tuple, Type, TypeVar, Union) + +from fparser.two.Fortran2003 import (Derived_Type_Def, Function_Body, Function_Stmt, Interface_Block, Interface_Stmt, + Module, Module_Stmt, Name, Rename, Specification_Part, Subroutine_Stmt, Type_Name, + Use_Stmt) +from fparser.two.Fortran2008 import Procedure_Stmt, Type_Declaration_Stmt from fparser.two.utils import Base from numpy import finfo as finf from numpy import float64 as fl +# dace imports from dace import DebugInfo as di from dace import Language as lang from dace import Memlet from dace import data as dat -from dace import dtypes -# dace imports -from dace import subsets +from dace import dtypes, subsets from dace import symbolic as sym from dace.frontend.fortran import ast_internal_classes -from dace.sdfg import SDFG, SDFGState, InterstateEdge +from dace.sdfg import SDFG, InterstateEdge, SDFGState from dace.sdfg.nodes import Tasklet fortrantypes2dacetypes = { diff --git a/dace/frontend/fortran/fortran_parser.py b/dace/frontend/fortran/fortran_parser.py index 36cc2bbf30..56b61c4d52 100644 --- a/dace/frontend/fortran/fortran_parser.py +++ b/dace/frontend/fortran/fortran_parser.py @@ -1,4 +1,4 @@ -# Copyright 2023 ETH Zurich and the DaCe authors. All rights reserved. +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. import copy import os @@ -31,7 +31,7 @@ from dace import subsets as subs from dace import symbolic as sym from dace.data import Scalar, Structure -from dace.frontend.fortran.ast_desugaring import (ENTRY_POINT_OBJECT, ENTRY_POINT_OBJECT_TYPES, NAMED_STMTS_OF_INTEREST, +from dace.frontend.fortran.ast_desugaring import (ENTRY_POINT_OBJECT, NAMED_STMTS_OF_INTEREST, SPEC, append_children, consolidate_uses, const_eval_nodes, correct_for_function_calls, deconstruct_associations, deconstruct_enums, deconstruct_interface_calls, diff --git a/dace/frontend/fortran/icon_config_propagation.py b/dace/frontend/fortran/icon_config_propagation.py index 5b978b7b6b..9fc876df02 100644 --- a/dace/frontend/fortran/icon_config_propagation.py +++ b/dace/frontend/fortran/icon_config_propagation.py @@ -1,4 +1,4 @@ -# Copyright 2023 ETH Zurich and the DaCe authors. All rights reserved. +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. import os import sys @@ -15,10 +15,6 @@ from dace.frontend.fortran import fortran_parser -import dace.frontend.fortran.ast_components as ast_components -import dace.frontend.fortran.ast_transforms as ast_transforms -import dace.frontend.fortran.ast_internal_classes as ast_internal - def find_path_recursive(base_dir): dirs = os.listdir(base_dir) diff --git a/dace/frontend/fortran/intrinsics.py b/dace/frontend/fortran/intrinsics.py index 8488a94837..52a97e2b12 100644 --- a/dace/frontend/fortran/intrinsics.py +++ b/dace/frontend/fortran/intrinsics.py @@ -1,3 +1,5 @@ +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. + import copy import math import sys @@ -6,13 +8,13 @@ from typing import Any, List, Optional, Tuple, Union from dace.frontend.fortran import ast_internal_classes -from dace.frontend.fortran.ast_transforms import NodeVisitor, NodeTransformer, ParentScopeAssigner, \ - ScopeVarsDeclarations, TypeInference, par_Decl_Range_Finder, mywalk +from dace.frontend.fortran.ast_transforms import (NodeTransformer, NodeVisitor, ParentScopeAssigner, + ScopeVarsDeclarations, mywalk, par_Decl_Range_Finder) from dace.frontend.fortran.ast_utils import fortrantypes2dacetypes from dace.libraries.blas.nodes.dot import dot_libnode from dace.libraries.blas.nodes.gemm import gemm_libnode from dace.libraries.standard.nodes import Transpose -from dace.sdfg import SDFGState, SDFG, nodes +from dace.sdfg import SDFG, SDFGState, nodes from dace.sdfg.graph import OrderedDiGraph from dace.transformation import transformation as xf diff --git a/tests/fortran/array_test.py b/tests/fortran/array_test.py index 61090457d0..e83b8367ba 100644 --- a/tests/fortran/array_test.py +++ b/tests/fortran/array_test.py @@ -1,9 +1,8 @@ -# Copyright 2023 ETH Zurich and the DaCe authors. All rights reserved. +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. import numpy as np from dace import dtypes, symbolic -from dace.frontend.fortran.fortran_parser import create_sdfg_from_string from dace.sdfg import utils as sdutil from dace.sdfg.nodes import AccessNode from tests.fortran.fortran_test_helper import SourceCodeBuilder, create_singular_sdfg_from_string diff --git a/tests/fortran/empty_test.py b/tests/fortran/empty_test.py index 9ec83f4d47..e9e9382ba1 100644 --- a/tests/fortran/empty_test.py +++ b/tests/fortran/empty_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 ETH Zurich and the DaCe authors. All rights reserved. +# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved. import numpy as np