Skip to content

Commit

Permalink
added nvtx scoped ranges to polynomials benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarrr committed Jan 13, 2025
1 parent d7a7d17 commit f84cb54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/benchmarks/ast/polynomials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <cudf/ast/expressions.hpp>
#include <cudf/column/column.hpp>
#include <cudf/detail/nvtx/ranges.hpp>
#include <cudf/table/table.hpp>
#include <cudf/transform.hpp>
#include <cudf/utilities/error.hpp>
Expand Down Expand Up @@ -69,6 +70,7 @@ static void BM_ast_polynomials(nvbench::state& state)
state.add_global_memory_writes<key_type>(num_rows);

state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
cudf::scoped_range range{"benchmark_iteration"};
cudf::compute_column(*table, tree.back(), launch.get_stream().get_stream());
});
}
Expand Down
2 changes: 2 additions & 0 deletions cpp/benchmarks/binaryop/polynomials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <cudf/binaryop.hpp>
#include <cudf/column/column.hpp>
#include <cudf/column/column_factories.hpp>
#include <cudf/detail/nvtx/ranges.hpp>
#include <cudf/strings/strings_column_view.hpp>
#include <cudf/types.hpp>

Expand Down Expand Up @@ -57,6 +58,7 @@ static void BM_binaryop_polynomials(nvbench::state& state)

state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
// computes polynomials: (((ax + b)x + c)x + d)x + e... = ax**4 + bx**3 + cx**2 + dx + e....
cudf::scoped_range range{"benchmark_iteration"};
rmm::cuda_stream_view stream{launch.get_stream().get_stream()};

auto result = cudf::make_column_from_scalar(constants[0], num_rows, stream);
Expand Down
3 changes: 3 additions & 0 deletions cpp/benchmarks/transform/polynomials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <cudf/column/column.hpp>
#include <cudf/column/column_factories.hpp>
#include <cudf/detail/nvtx/ranges.hpp>
#include <cudf/transform.hpp>
#include <cudf/types.hpp>

Expand Down Expand Up @@ -58,6 +59,8 @@ static void BM_transform_polynomials(nvbench::state& state)
state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
// computes polynomials: (((ax + b)x + c)x + d)x + e... = ax**4 + bx**3 + cx**2 + dx + e....

cudf::scoped_range range{"benchmark_iteration"};

std::string expr = std::to_string(constants[0]);

for (cudf::size_type i = 0; i < order; i++) {
Expand Down

0 comments on commit f84cb54

Please sign in to comment.