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

Use std::generate to generate benchmark data #156

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

zyzzyxdonta
Copy link
Contributor

@zyzzyxdonta zyzzyxdonta commented Dec 29, 2023

This pull request implements benchmark data generation with generator structs used with std::generate. This clearly communicates the intent, making the code more readable than the raw loops used before.

TODO:

  • Actually try to compile this with cuFFT and float16 support.

Thoughts:

It would also be interesting to know whether the sparseness of the benchmark data (float16 case) affects results. There are even special FFT implementations for certain kinds of sparse data. With that in mind, it might even make sense to make benchmark data generators user-selectable at compile time. (Not now but as a possible new feature ;-))

At the price of always using the float16 special implementation
regardless of data size, this allows us to get rid of the runtime type
check.
This has to be done to avoid division by 0 that occurs with the other
formula.

Also use `static_cast<float16>` instead of `half_float` methods. This
makes the implementation simpler and is good enough for simply returning
numbers.
@zyzzyxdonta zyzzyxdonta marked this pull request as ready for review January 6, 2024 19:10
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.

None yet

1 participant