Skip to content

Commit

Permalink
Copyright, more formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad committed Dec 20, 2024
1 parent 2194c9f commit bd30606
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 29 deletions.
2 changes: 1 addition & 1 deletion dace/frontend/fortran/ast_components.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions dace/frontend/fortran/ast_desugaring.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved.

import math
import operator
import re
Expand Down
2 changes: 1 addition & 1 deletion dace/frontend/fortran/ast_internal_classes.py
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion dace/frontend/fortran/ast_transforms.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 11 additions & 13 deletions dace/frontend/fortran/ast_utils.py
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions dace/frontend/fortran/fortran_parser.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 1 addition & 5 deletions dace/frontend/fortran/icon_config_propagation.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions dace/frontend/fortran/intrinsics.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2019-2024 ETH Zurich and the DaCe authors. All rights reserved.

import copy
import math
import sys
Expand All @@ -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

Expand Down
3 changes: 1 addition & 2 deletions tests/fortran/array_test.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/fortran/empty_test.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit bd30606

Please sign in to comment.