Skip to content

Commit

Permalink
Add bytes_per_second to distinct_count of stream_compaction nvbench. (
Browse files Browse the repository at this point in the history
#14172)

This patch relates to #13735.

Benchmark:  [benchmark_distinct_count.txt](https://github.com/rapidsai/cudf/files/12700496/benchmark_distinct_count.txt)

Authors:
  - Martin Marenz (https://github.com/Blonck)
  - Mark Harris (https://github.com/harrism)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Karthikeyan (https://github.com/karthikeyann)
  - Mark Harris (https://github.com/harrism)

URL: #14172
  • Loading branch information
Blonck authored Sep 28, 2023
1 parent dea0df0 commit 23d24d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cpp/benchmarks/stream_compaction/distinct_count.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ static void bench_distinct_count(nvbench::state& state, nvbench::type_list<Type>
auto const& data_column = data_table->get_column(0);
auto const input_table = cudf::table_view{{data_column, data_column, data_column}};

// Collect memory statistics for input and output.
state.add_global_memory_reads<Type>(input_table.num_rows() * input_table.num_columns());
state.add_global_memory_writes<cudf::size_type>(1);
if (null_probability > 0) {
state.add_global_memory_reads<nvbench::int8_t>(
input_table.num_columns() * cudf::bitmask_allocation_size_bytes(input_table.num_rows()));
}

auto mem_stats_logger = cudf::memory_stats_logger(); // init stats logger
state.set_cuda_stream(nvbench::make_cuda_stream_view(cudf::get_default_stream().value()));
state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
Expand Down

0 comments on commit 23d24d4

Please sign in to comment.