From 4bac6b763a78fc554283c41a15c8dd486ff51c75 Mon Sep 17 00:00:00 2001 From: Karthikeyan Natarajan Date: Mon, 14 Feb 2022 20:48:10 +0530 Subject: [PATCH 1/2] move sequence generation to device in benchmark input --- .../type_dispatcher/type_dispatcher.cu | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/cpp/benchmarks/type_dispatcher/type_dispatcher.cu b/cpp/benchmarks/type_dispatcher/type_dispatcher.cu index 90097889a86..00eb3d408df 100644 --- a/cpp/benchmarks/type_dispatcher/type_dispatcher.cu +++ b/cpp/benchmarks/type_dispatcher/type_dispatcher.cu @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021, NVIDIA CORPORATION. + * Copyright (c) 2019-2022, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,8 +14,8 @@ * limitations under the License. */ -#include "../fixture/benchmark_fixture.hpp" -#include "../synchronization/synchronization.hpp" +#include +#include #include @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include #include @@ -170,21 +172,18 @@ void launch_kernel(cudf::mutable_table_view input, T** d_ptr, int work_per_threa template void type_dispatcher_benchmark(::benchmark::State& state) { - const auto source_size = static_cast(state.range(1)); - - const auto n_cols = static_cast(state.range(0)); - + const auto n_cols = static_cast(state.range(0)); + const auto source_size = static_cast(state.range(1)); const auto work_per_thread = static_cast(state.range(2)); - auto data = cudf::detail::make_counting_transform_iterator(0, [](auto i) { return i; }); + auto init = cudf::make_fixed_width_scalar(static_cast(0)); - std::vector> source_column_wrappers; + std::vector> source_column_wrappers; std::vector source_columns; for (int i = 0; i < n_cols; ++i) { - source_column_wrappers.push_back( - cudf::test::fixed_width_column_wrapper(data, data + source_size)); - source_columns.push_back(source_column_wrappers[i]); + source_column_wrappers.push_back(cudf::sequence(source_size, *init)); + source_columns.push_back(*source_column_wrappers[i]); } cudf::mutable_table_view source_table{source_columns}; From 527c88a97e567abaae3f9aefbf9f01a3e065947d Mon Sep 17 00:00:00 2001 From: Karthikeyan <6488848+karthikeyann@users.noreply.github.com> Date: Tue, 15 Feb 2022 01:19:09 +0530 Subject: [PATCH 2/2] remove include iterator.cuh --- cpp/benchmarks/type_dispatcher/type_dispatcher.cu | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/benchmarks/type_dispatcher/type_dispatcher.cu b/cpp/benchmarks/type_dispatcher/type_dispatcher.cu index 00eb3d408df..ca19e3046ad 100644 --- a/cpp/benchmarks/type_dispatcher/type_dispatcher.cu +++ b/cpp/benchmarks/type_dispatcher/type_dispatcher.cu @@ -21,7 +21,6 @@ #include #include -#include #include #include #include