From f84cb549763badaa781d51ea73908123bf7c81cf Mon Sep 17 00:00:00 2001 From: Basit Ayantunde Date: Mon, 13 Jan 2025 13:17:47 +0000 Subject: [PATCH] added nvtx scoped ranges to polynomials benchmarks --- cpp/benchmarks/ast/polynomials.cpp | 2 ++ cpp/benchmarks/binaryop/polynomials.cpp | 2 ++ cpp/benchmarks/transform/polynomials.cpp | 3 +++ 3 files changed, 7 insertions(+) diff --git a/cpp/benchmarks/ast/polynomials.cpp b/cpp/benchmarks/ast/polynomials.cpp index d1fc878ef51..c71f3dfedc9 100644 --- a/cpp/benchmarks/ast/polynomials.cpp +++ b/cpp/benchmarks/ast/polynomials.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -69,6 +70,7 @@ static void BM_ast_polynomials(nvbench::state& state) state.add_global_memory_writes(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()); }); } diff --git a/cpp/benchmarks/binaryop/polynomials.cpp b/cpp/benchmarks/binaryop/polynomials.cpp index c6bfbf02b18..7a6489eb2c9 100644 --- a/cpp/benchmarks/binaryop/polynomials.cpp +++ b/cpp/benchmarks/binaryop/polynomials.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -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); diff --git a/cpp/benchmarks/transform/polynomials.cpp b/cpp/benchmarks/transform/polynomials.cpp index 4f0311b50c0..32fbeb0af45 100644 --- a/cpp/benchmarks/transform/polynomials.cpp +++ b/cpp/benchmarks/transform/polynomials.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -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++) {