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

add run_benchmarks target for running benchmarks with json output #9879

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions cpp/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ add_library(
synchronization/synchronization.cpp io/cuio_benchmark_common.cpp
)
target_link_libraries(cudf_benchmark_common PRIVATE cudf_datagen)
add_custom_command(
OUTPUT CUDF_BENCHMARKS
COMMAND echo Running benchmarks
COMMAND mkdir -p results
VERBATIM
COMMENT "Running cudf benchmarks."
USES_TERMINAL
)

# This function takes in a benchmark name and benchmark source and handles setting all of the
# associated properties and linking to build the benchmark
Expand All @@ -54,6 +62,13 @@ function(ConfigureBench CMAKE_BENCH_NAME)
target_link_libraries(
${CMAKE_BENCH_NAME} PRIVATE cudf_benchmark_common cudf_datagen benchmark::benchmark_main
)
add_custom_command(
OUTPUT CUDF_BENCHMARKS
COMMAND ${CMAKE_BENCH_NAME} --benchmark_out_format=json
--benchmark_out=results/${CMAKE_BENCH_NAME}.json
APPEND
COMMENT "Adding ${CMAKE_BENCH_NAME}"
)
endfunction()

# This function takes in a benchmark name and benchmark source for nvbench benchmarks and handles
Expand Down Expand Up @@ -254,3 +269,9 @@ ConfigureBench(JSON_BENCH string/json_benchmark.cpp)
# ##################################################################################################
# * io benchmark ---------------------------------------------------------------------
ConfigureBench(MULTIBYTE_SPLIT_BENCHMARK io/text/multibyte_split_benchmark.cpp)

add_custom_target(
run_benchmarks
DEPENDS CUDF_BENCHMARKS
COMMENT "Custom command for running cudf benchmarks."
)