Skip to content

Commit

Permalink
fixed ast and binops benchmarks throughput calculation integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarrr committed Oct 26, 2024
1 parent 0db10fe commit 7d7fcd2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpp/benchmarks/ast/transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void BM_ast_transform(nvbench::state& state)
auto const& expression_tree_root = expressions.back();

// Use the number of bytes read from global memory
state.add_global_memory_reads<key_type>(table_size * (tree_levels + 1));
state.add_global_memory_reads<key_type>(static_cast<size_t>(table_size) * (tree_levels + 1));
state.add_global_memory_writes<key_type>(table_size);

state.exec(nvbench::exec_tag::sync,
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/binaryop/binaryop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void BM_binaryop_transform(nvbench::state& state)
cudf::table_view table{*source_table};

// Use the number of bytes read from global memory
state.add_global_memory_reads<key_type>(table_size * (tree_levels + 1));
state.add_global_memory_reads<key_type>(static_cast<size_t>(table_size) * (tree_levels + 1));
state.add_global_memory_writes<key_type>(table_size);

state.exec(nvbench::exec_tag::sync, [&](nvbench::launch&) {
Expand Down

0 comments on commit 7d7fcd2

Please sign in to comment.