From 2e47445acff0f5908715ec6b45cd11a0edfa12e3 Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Fri, 23 Aug 2024 15:59:53 +0100 Subject: [PATCH] Add event decorators for compilation functions --- firedrake/interpolation.py | 1 + firedrake/slate/slac/compiler.py | 1 + firedrake/tsfc_interface.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/firedrake/interpolation.py b/firedrake/interpolation.py index 24bc7ab45d..f1e9fa93d0 100644 --- a/firedrake/interpolation.py +++ b/firedrake/interpolation.py @@ -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) diff --git a/firedrake/slate/slac/compiler.py b/firedrake/slate/slac/compiler.py index 8e6486d7a3..46611aaf01 100644 --- a/firedrake/slate/slac/compiler.py +++ b/firedrake/slate/slac/compiler.py @@ -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. diff --git a/firedrake/tsfc_interface.py b/firedrake/tsfc_interface.py index 4532604128..245663d8c1 100644 --- a/firedrake/tsfc_interface.py +++ b/firedrake/tsfc_interface.py @@ -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.