Skip to content

Commit

Permalink
Add bytes_per_second to compiled binaryop benchmark
Browse files Browse the repository at this point in the history
To add `bytes_per_second`, a call to `SetBytesProcessed()` with the
number of written and read bytes is added to the benchmark.

This patch relates to rapidsai#13735.
  • Loading branch information
Martin Marenz committed Aug 24, 2023
1 parent d497dd8 commit 937a7c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/benchmarks/binaryop/compiled_binaryop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ void BM_compiled_binaryop(benchmark::State& state, cudf::binary_operator binop)
cuda_event_timer timer(state, true);
cudf::binary_operation(lhs, rhs, binop, output_dtype);
}

// use number of bytes read and written to global memory
state.SetBytesProcessed(static_cast<int64_t>(state.iterations()) * column_size *
(sizeof(TypeLhs) + sizeof(TypeRhs) + sizeof(TypeOut)));
}

// TODO tparam boolean for null.
Expand Down

0 comments on commit 937a7c5

Please sign in to comment.