diff --git a/devito/core/cpu.py b/devito/core/cpu.py index 5c71af9bf0..386b81fdb4 100644 --- a/devito/core/cpu.py +++ b/devito/core/cpu.py @@ -15,6 +15,8 @@ from devito.core.operator import CoreOperator, CustomOperator, ParTile from devito.exceptions import InvalidOperator from devito.ir.iet import Callable, MetaCall +from devito.ir.iet.nodes import Section +from devito.ir.iet.visitors import FindNodes from devito.logger import info, perf from devito.mpi import MPI from devito.operator.profiling import create_profile diff --git a/devito/ir/ietxdsl/cluster_to_ssa.py b/devito/ir/ietxdsl/cluster_to_ssa.py index c6aa1db16a..aa17e2de0f 100644 --- a/devito/ir/ietxdsl/cluster_to_ssa.py +++ b/devito/ir/ietxdsl/cluster_to_ssa.py @@ -54,6 +54,7 @@ class ExtractDevitoStencilConversion: def __init__(self): self.temps = dict() + self.symbol_values = dict() time_offs: int diff --git a/devito/ir/ietxdsl/profiling.py b/devito/ir/ietxdsl/profiling.py index aa02ee5006..15f0130979 100644 --- a/devito/ir/ietxdsl/profiling.py +++ b/devito/ir/ietxdsl/profiling.py @@ -56,6 +56,8 @@ def apply_timers(module, **kwargs): """ Apply timers to a module """ + if kwargs['xdsl_num_sections'] < 1: + return name = kwargs.get("name", "Kernel") grpa = GreedyRewritePatternApplier([MakeFunctionTimed(name)]) PatternRewriteWalker(grpa, walk_regions_first=True).rewrite_module(module) diff --git a/tests/test_xdsl_base.py b/tests/test_xdsl_base.py index d4a4dfd543..3b9db7b30d 100644 --- a/tests/test_xdsl_base.py +++ b/tests/test_xdsl_base.py @@ -3,7 +3,7 @@ from devito import (Grid, TensorTimeFunction, VectorTimeFunction, div, grad, diag, solve, Operator, Eq, Constant, norm, SpaceDimension) -from devito.types import Symbol, Array, Function, TimeFunction +from devito.types import Array, Function, TimeFunction from xdsl.dialects.scf import For, Yield from xdsl.dialects.arith import Addi