Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions devito/core/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
check_stability, PetscTarget)
from devito.tools import timed_pass

from devito.petsc.iet.passes import lower_petsc_symbols

__all__ = ['Cpu64NoopCOperator', 'Cpu64NoopOmpOperator', 'Cpu64AdvCOperator',
'Cpu64AdvOmpOperator', 'Cpu64FsgCOperator', 'Cpu64FsgOmpOperator',
'Cpu64CustomOperator', 'Cpu64CustomCXXOperator', 'Cpu64AdvCXXOperator',
Expand Down Expand Up @@ -143,6 +145,9 @@ def _specialize_iet(cls, graph, **kwargs):
# Symbol definitions
cls._Target.DataManager(**kwargs).process(graph)

# Lower PETSc symbols
lower_petsc_symbols(graph, **kwargs)

return graph


Expand Down Expand Up @@ -222,6 +227,9 @@ def _specialize_iet(cls, graph, **kwargs):
# Symbol definitions
cls._Target.DataManager(**kwargs).process(graph)

# Lower PETSc symbols
lower_petsc_symbols(graph, **kwargs)

# Linearize n-dimensional Indexeds
linearize(graph, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion devito/ir/iet/visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ class FindSymbols(LazyVisitor[Any, list[Any], None]):
Drive the search. Accepted:
- `symbolics`: Collect all AbstractFunction objects, default
- `basics`: Collect all Basic objects
- `abstractsymbols`: Collect all AbstractSymbol objects
- `symbols`: Collect all AbstractSymbol objects
- `dimensions`: Collect all Dimensions
- `indexeds`: Collect all Indexed objects
- `indexedbases`: Collect all IndexedBase objects
Expand Down
4 changes: 4 additions & 0 deletions devito/passes/iet/languages/C.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from devito.passes.iet.langbase import LangBB
from devito.symbolics import c_complex, c_double_complex
from devito.tools import dtype_to_cstr

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does devito.petsc get its own line? I thought the "notional" "Devito style" grouped Devito imports.

(I will reiterate my desire to automate this nonsense!)

from devito.petsc.utils import petsc_type_mappings

__all__ = ['CBB', 'CDataManager', 'COrchestrator']
Expand Down Expand Up @@ -82,3 +83,6 @@ class PetscCPrinter(CPrinter):
_restrict_keyword = ''

type_mappings = {**CPrinter.type_mappings, **petsc_type_mappings}

def _print_Pi(self, expr):
return 'PETSC_PI'
Loading