Skip to content

Commit

Permalink
Add bytes_per_second to hash_partition benchmark
Browse files Browse the repository at this point in the history
Adds `bytes_per_second` to the `PARTITION_BENCH` benchmark.

This patch relates to rapidsai#13735.
  • Loading branch information
Martin Marenz committed Aug 25, 2023
1 parent aef903c commit 17fe3c7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpp/benchmarks/hashing/partition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ void BM_hash_partition(benchmark::State& state)
cuda_event_timer timer(state, true);
auto output = cudf::hash_partition(input, columns_to_hash, num_partitions);
}

auto const bytes_read = num_rows * num_cols * sizeof(T);
auto const bytes_written = num_rows * num_cols * sizeof(T);
auto const partition_bytes = num_partitions * sizeof(cudf::size_type);

state.SetBytesProcessed(static_cast<int64_t>(state.iterations()) *
(bytes_read + bytes_written + partition_bytes));
}

BENCHMARK_DEFINE_F(Hashing, hash_partition)
Expand Down

0 comments on commit 17fe3c7

Please sign in to comment.