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

Revive micro-benchmarks for vector functions #571

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

joanaxcruz
Copy link
Contributor

@joanaxcruz joanaxcruz commented Aug 28, 2024

What is the purpose of this pull request?

Check if existent micro benchmark program is working.
The micro benchmark system in place would compile and run hitting no errors, however, the execution time returned for every function seemed flatlined at 2ns (as described in #445). Turns out the function call was being optimized away during its benchmark.
Updated program with relevant changes to prevent this.

What changes did you make?

Store the result of the function call during the benchmark, which prevents the compiler from removing the function call. Also added a warm up call.

Does this PR relate to any existing issue?

This PR should fix #445 and relates to issue #9.

joanaxcruz and others added 3 commits August 28, 2024 10:26
Store the result of the function call during its benchmark
to prevent it from being optimized away.
Also changed name of NITER1 and NITER2 macros to more obvious
acronymes.
Tested on aarch64 and x86 so far.
@blapie blapie merged commit 93f04d8 into shibatch:master Aug 29, 2024
30 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.

How do I check if my build flag is optimize?
2 participants