Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix geomean computation #196

Merged
merged 1 commit into from
Sep 26, 2024
Merged

chore: fix geomean computation #196

merged 1 commit into from
Sep 26, 2024

Conversation

bollu
Copy link
Collaborator

@bollu bollu commented Sep 26, 2024

Description:

The geomean computation that was incorrectly suggested by @bollu failed to take into account that the TotalRunTime counter was adding the real runtimes, not multiplying them as one should for geomean.

We change the geomean computation algorithm, to accumulate the log of the runtimes, and then divide by n followed by exponentiation as a final step for better numerical accuracy.

$$ g \equiv (t_1 \times t_2 \times \dots \times t_n)^{1/n} = \exp \bigg(\frac{\log t_1 + \log t_2 + \dots \log t_n}{n} \bigg) $$

Testing:

What tests have been run? Did make all succeed for your changes? Was
conformance testing successful on an Aarch64 machine?

Conformance succeeds.

License:

By submitting this pull request, I confirm that my contribution is
made under the terms of the Apache 2.0 license.

@bollu bollu requested a review from shigoel as a code owner September 26, 2024 18:37
Copy link
Collaborator

@shigoel shigoel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bollu bollu merged commit 0194790 into main Sep 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants