Skip to content

Commit afa9cd0

Browse files
committed
compiler: Refactor perf log introducing emit_perf_args
1 parent 529f0b5 commit afa9cd0

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

devito/operator/operator.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,12 @@ def lower_perfentry(v):
11581158
perf(f"{indent*2}+ {n} ran in {fround(v1.time):.2f} s "
11591159
f"[{fround(v1.time/v.time*100):.2f}%] {metrics}")
11601160

1161-
# Emit performance mode and arguments
1161+
self._emit_perf_args(args)
1162+
1163+
return summary
1164+
1165+
def _emit_perf_args(self, args):
1166+
"""Emit performance mode and runtime performance arguments."""
11621167
perf_args = {}
11631168
for i in self.input + self.dimensions:
11641169
if not i.is_PerfKnob:
@@ -1176,8 +1181,6 @@ def lower_perfentry(v):
11761181
perf_args = {k: perf_args[k] for k in sorted(perf_args)}
11771182
perf(f"Performance[mode={self._mode}] arguments: {perf_args}")
11781183

1179-
return summary
1180-
11811184
# Pickling support
11821185

11831186
def __getstate__(self):

0 commit comments

Comments
 (0)