Skip to content

Commit

Permalink
Fix: out-of-date PMTContinuousObserver readings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wvbbreu committed Dec 4, 2024
1 parent 4c0a877 commit 93b75eb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel_tuner/observers/pmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93b75eb

Please sign in to comment.