Skip to content

Commit

Permalink
More missused type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad committed Jan 10, 2025
1 parent 619dea8 commit 1457599
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dace/frontend/fortran/intrinsics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ def one_to_one_size(node: ast_internal_classes.Call_Expr_Node, sizes: List[ast_i
INTRINSIC_SIZE_FUNCTIONS = {
"TRANSPOSE": IntrinsicSDFGTransformation.transpose_size,
"MATMUL": IntrinsicSDFGTransformation.matmul_size,
"EXP": one_to_one_size
"EXP": one_to_one_size.__func__,
}

class TypeTransformer(IntrinsicNodeTransformer):
Expand Down
10 changes: 5 additions & 5 deletions tests/fortran/prune_unused_children_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from fparser.two.parser import ParserFactory
from fparser.two.utils import walk

from dace.frontend.fortran.ast_desugaring import ENTRY_POINT_OBJECT_TYPES, find_name_of_node, prune_unused_objects, \
SPEC, ident_spec, NAMED_STMTS_OF_INTEREST_TYPES
from dace.frontend.fortran.ast_desugaring import ENTRY_POINT_OBJECT_CLASSES, NAMED_STMTS_OF_INTEREST_CLASSES, \
find_name_of_node, prune_unused_objects, SPEC, ident_spec
from dace.frontend.fortran.ast_utils import children_of_type, singular
from dace.frontend.fortran.fortran_parser import recursive_ast_improver
from tests.fortran.fortran_test_helper import SourceCodeBuilder
Expand All @@ -25,12 +25,12 @@ def parse_and_improve(sources: Dict[str, str]):

def find_entrypoint_objects_named(ast: Program, name: str) -> List[SPEC]:
objs: List[SPEC] = []
for n in walk(ast, ENTRY_POINT_OBJECT_TYPES):
assert isinstance(n, ENTRY_POINT_OBJECT_TYPES)
for n in walk(ast, ENTRY_POINT_OBJECT_CLASSES):
assert isinstance(n, ENTRY_POINT_OBJECT_CLASSES)
if not isinstance(n.parent, Program):
continue
if find_name_of_node(n) == name:
stmt = singular(children_of_type(n, NAMED_STMTS_OF_INTEREST_TYPES))
stmt = singular(children_of_type(n, NAMED_STMTS_OF_INTEREST_CLASSES))
objs.append(ident_spec(stmt))
return objs

Expand Down

0 comments on commit 1457599

Please sign in to comment.