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
This patch relates to rapidsai#13735.
  • Loading branch information
Blonck committed Sep 22, 2023
1 parent f0ba859 commit 676e82d
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 676e82d

Please sign in to comment.