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

Modifications to avoid including "gflop/s" in the "best gflop/s" computation if the validation fails #40

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

colleeneb
Copy link
Contributor

This is to fix the issue mentioned in #37.

Currently, if the result is not valid, it will still print a result and so the "best gflop/s" which is determined could be incorrect. In particular, if the CUDA kernel launch fails, the "best gflop/s" will be too big since the kernel time was very fast since the kernel didn't run. This will cause the "best flop/s" to be based on an invalid run.

This PR avoids the problem above. If the validation fails, it sets the kernel time to the biggest possible, so that it will not be considered in the computation of "best" gflop/s. There are probably cleaner ways, this is just what I was using to get it working. I'm happy to make changes if requested!

Copy link
Member

@tom91136 tom91136 left a comment

Choose a reason for hiding this comment

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

Thanks, can you run clang-format (e.g clang-format -i src/main.cpp) to align the formatting? If not I can push a style commit later.

@colleeneb
Copy link
Contributor Author

Done, let me know if it's ok!

@tom91136 tom91136 merged commit 570f66c into UoB-HPC:main Oct 15, 2024
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