From 4e351f91381fda56b450b15236cac7b9e7c4e810 Mon Sep 17 00:00:00 2001 From: Martin Marenz Date: Wed, 23 Aug 2023 15:30:56 +0200 Subject: [PATCH] Add `bytes_per_second` to compiled binaryop benchmark 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 #13735. --- cpp/benchmarks/binaryop/compiled_binaryop.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/benchmarks/binaryop/compiled_binaryop.cpp b/cpp/benchmarks/binaryop/compiled_binaryop.cpp index fbba38431dd..a1131df4472 100644 --- a/cpp/benchmarks/binaryop/compiled_binaryop.cpp +++ b/cpp/benchmarks/binaryop/compiled_binaryop.cpp @@ -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(state.iterations()) * column_size * + (sizeof(TypeLhs) + sizeof(TypeRhs) + sizeof(TypeOut))); } // TODO tparam boolean for null.