From 93b75eb30a98fc812c528dc00112023f5b76d25c Mon Sep 17 00:00:00 2001 From: Wiebe van Breukelen Date: Wed, 4 Dec 2024 16:55:31 +0100 Subject: [PATCH] Fix: out-of-date PMTContinuousObserver readings Instead of using the power measurement stored in self.results, we should use those in self.parent.results. This will ensure we have the latest readings after continuous benchmarking (benchmark_continuous), instead of the figures measured during the benchmark_default run. --- kernel_tuner/observers/pmt.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel_tuner/observers/pmt.py b/kernel_tuner/observers/pmt.py index 1a795d15..254bec5c 100644 --- a/kernel_tuner/observers/pmt.py +++ b/kernel_tuner/observers/pmt.py @@ -125,9 +125,7 @@ def after_finish(self): def get_results(self): average_kernel_execution_time_ms = self.results["time"] - - averages = {key: np.average(values) for key, values in self.results.items()} - self.parent.initialize_results(self.parent.pm_names) + averages = self.parent.get_results() # correct energy measurement, because current _energy number is collected over the entire duration # we estimate energy as the average power over the continuous duration times the kernel execution time