Skip to content
Snippets Groups Projects
Commit bd6b63ab authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fix types and linting

parent c83b06a5
No related branches found
No related tags found
1 merge request!418Nesting of Type Contexts, Type Hints, and Improved Array Typing
Pipeline #67995 passed
...@@ -22,8 +22,8 @@ def optimize_cpu( ...@@ -22,8 +22,8 @@ def optimize_cpu(
canonicalize = CanonicalizeSymbols(ctx, True) canonicalize = CanonicalizeSymbols(ctx, True)
kernel_ast = cast(PsBlock, canonicalize(kernel_ast)) kernel_ast = cast(PsBlock, canonicalize(kernel_ast))
# hoist_invariants = HoistLoopInvariantDeclarations(ctx) hoist_invariants = HoistLoopInvariantDeclarations(ctx)
# kernel_ast = cast(PsBlock, hoist_invariants(kernel_ast)) kernel_ast = cast(PsBlock, hoist_invariants(kernel_ast))
if cfg is None: if cfg is None:
return kernel_ast return kernel_ast
......
...@@ -24,7 +24,6 @@ from ..ast.structural import ( ...@@ -24,7 +24,6 @@ from ..ast.structural import (
PsExpression, PsExpression,
PsAssignment, PsAssignment,
PsDeclaration, PsDeclaration,
PsStatement,
PsEmptyLeafMixIn, PsEmptyLeafMixIn,
) )
from ..ast.expressions import ( from ..ast.expressions import (
...@@ -704,6 +703,7 @@ class Typifier: ...@@ -704,6 +703,7 @@ class Typifier:
) )
items_tc.apply_dtype(deconstify(elem_type)) items_tc.apply_dtype(deconstify(elem_type))
tc.infer_dtype(expr) tc.infer_dtype(expr)
return None
case DereferencableTo(elem_type_or_hint): case DereferencableTo(elem_type_or_hint):
if isinstance(elem_type_or_hint, PsType): if isinstance(elem_type_or_hint, PsType):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment