Skip to content

Commit

Permalink
Post-rebase tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
PapyChacal committed May 21, 2024
1 parent 8a20f8b commit 55132c6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions devito/core/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions devito/ir/ietxdsl/cluster_to_ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class ExtractDevitoStencilConversion:

def __init__(self):
self.temps = dict()
self.symbol_values = dict()

time_offs: int

Expand Down
2 changes: 2 additions & 0 deletions devito/ir/ietxdsl/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion tests/test_xdsl_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 55132c6

Please sign in to comment.