-
Notifications
You must be signed in to change notification settings - Fork 916
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 ConfigureNVBench to avoid concurrent main() entry points #8662
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-21.08 #8662 +/- ##
===============================================
Coverage ? 10.64%
===============================================
Files ? 109
Lines ? 18654
Branches ? 0
===============================================
Hits ? 1985
Misses ? 16669
Partials ? 0 Continue to review full report at Codecov.
|
@@ -56,6 +55,14 @@ function(ConfigureBench CMAKE_BENCH_NAME) | |||
PRIVATE cudf_benchmark_common cudf_datagen benchmark::benchmark_main) | |||
endfunction() | |||
|
|||
function(ConfigureNVBench CMAKE_BENCH_NAME) |
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.
Where is this used?
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.
The idea behind this PR is to finally replace all current benchmarks (which use google benchmark) by using nvbench
. I'm working on the first use case of this macro so it's not used yet.
@@ -56,6 +55,14 @@ function(ConfigureBench CMAKE_BENCH_NAME) | |||
PRIVATE cudf_benchmark_common cudf_datagen benchmark::benchmark_main) | |||
endfunction() | |||
|
|||
function(ConfigureNVBench CMAKE_BENCH_NAME) | |||
add_executable(${CMAKE_BENCH_NAME} ${ARGN}) | |||
set_target_properties(${CMAKE_BENCH_NAME} |
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.
I don't know if we want to place benchmarks in different directories based on if they used gbench
or nvbench
. To the person running the benchmark it is an implementation detail, and they would expect all benchmarks to be located in the same folder.
For that reason I think placing all the benchmarks in either the gbenchmark
or benchmark
folder seems more reasonable to me
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.
Right, I hesitate on this different directories idea also. The gbenchmark
naming basically implies that google benchmark is applied. So my only concern is that creating a nvbench
code in gbenchmark
would be misleading.
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.
So my only concern is that creating a nvbench code in gbenchmark would be misleading.
I think most developers won't remember what benchmarks use nvbench, and will be confused on the split.
This might be the perfect time to have all benchmarks in <build_dir>/benchmarks
:)
@gpucibot merge |
This PR fixes a bug where both
nvbench::main
andbenchmark_main
are trying to insertmain()
entry points. It creates a newConfigureNVBench
macro to build nvbench benchmarks in a separate directory.