Skip to content

Commit

Permalink
Add event decorators for compilation functions
Browse files Browse the repository at this point in the history
  • Loading branch information
JDBetteridge committed Sep 12, 2024
1 parent 48a18e8 commit 2e47445
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions firedrake/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ def _compile_expression_key(comm, expr, to_element, ufl_element, domain, paramet
hashkey=_compile_expression_key,
cachedir=tsfc_interface._cachedir
)
@PETSc.Log.EventDecorator()
def compile_expression(comm, *args, **kwargs):
return compile_expression_dual_evaluation(*args, **kwargs)

Expand Down
1 change: 1 addition & 0 deletions firedrake/slate/slac/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def _compile_expression_comm(*args, **kwargs):
comm_fetcher=_compile_expression_comm,
cachedir=tsfc_interface._cachedir
)
@PETSc.Log.EventDecorator()
def compile_expression(slate_expr, compiler_parameters=None):
"""Takes a Slate expression `slate_expr` and returns the appropriate
``pyop2.op2.Kernel`` object representing the Slate expression.
Expand Down
2 changes: 1 addition & 1 deletion firedrake/tsfc_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ def _compile_form_comm(*args, **kwargs):
return args[0].ufl_domains()[0].comm


@PETSc.Log.EventDecorator()
@memory_and_disk_cache(
hashkey=_compile_form_hashkey,
comm_fetcher=_compile_form_comm,
cachedir=_cachedir
)
@PETSc.Log.EventDecorator()
def compile_form(form, name, parameters=None, split=True, interface=None, diagonal=False):
"""Compile a form using TSFC.
Expand Down

0 comments on commit 2e47445

Please sign in to comment.