-
Notifications
You must be signed in to change notification settings - Fork 902
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
add templated benchmark with fixture #9838
add templated benchmark with fixture #9838
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-22.02 #9838 +/- ##
================================================
- Coverage 10.49% 10.44% -0.05%
================================================
Files 119 119
Lines 20305 20422 +117
================================================
+ Hits 2130 2133 +3
- Misses 18175 18289 +114
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool stuff
I wonder if we should just switch these tests over to NVBench as IIRC it already supports this feature. |
NVIDIA/nvbench#24 Found this issue. It doesn't have support for fixtures yet. We should move to nvbench #7960 eventually. |
@gpucibot merge |
BENCHMARK_TEMPLATE_F is for non-templated benchmark with templated fixture.
BENCHMARK_F is for non-templated benchmark with non-templated fixture.
Google benchmark does not have support for templated benchmark function with non-templated fixture.
Often, BENCHMARK_TEMPLATE_F is used as a proxy for templated benchmark. But templated fixture is not really required here. It also has limitation of specifying different name for each template.
So, this PR extends google benchmark to support templated benchmark with non-templated fixture.
Usage:
TEMPLATED_BENCHMARK_F(FixtureClass, TemplateFunction, ...);
...
are template argumentsExample: