-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
List element Equality comparator (#10289)
This PR implements equality comparator for LIST columns. This only supports "self" comparison for now, meaning the two rows to be compared should belong to the same table. A comparator that works on rows of two different tables will be implemented in another PR. This works only on "sanitized" list columns. See #10291 for details. This will partially support #10186. Authors: - Devavret Makkar (https://github.com/devavret) Approvers: - Robert Maynard (https://github.com/robertmaynard) - Vyas Ramasubramani (https://github.com/vyasr) - Mike Wilson (https://github.com/hyperbolic2346) - Jake Hemstad (https://github.com/jrhemstad) - Jordan Jacobelli (https://github.com/Ethyling) URL: #10289
- Loading branch information
Showing
15 changed files
with
1,106 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright (c) 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. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <benchmarks/common/generate_input.hpp> | ||
#include <benchmarks/fixture/rmm_pool_raii.hpp> | ||
|
||
#include <cudf/detail/scan.hpp> | ||
#include <cudf/filling.hpp> | ||
#include <cudf/lists/list_view.cuh> | ||
|
||
#include <nvbench/nvbench.cuh> | ||
|
||
template <typename type> | ||
static void nvbench_reduction_scan(nvbench::state& state, nvbench::type_list<type>) | ||
{ | ||
cudf::rmm_pool_raii pool_raii; | ||
|
||
auto const dtype = cudf::type_to_id<type>(); | ||
|
||
double const null_frequency = state.get_float64("null_frequency"); | ||
size_t const size = state.get_int64("data_size"); | ||
|
||
data_profile table_data_profile; | ||
table_data_profile.set_distribution_params(dtype, distribution_id::UNIFORM, 0, 5); | ||
table_data_profile.set_null_frequency(null_frequency); | ||
|
||
auto const table = create_random_table({dtype}, table_size_bytes{size / 2}, table_data_profile); | ||
|
||
auto const new_tbl = cudf::repeat(table->view(), 2); | ||
cudf::column_view input(new_tbl->view().column(0)); | ||
|
||
state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) { | ||
rmm::cuda_stream_view stream_view{launch.get_stream()}; | ||
auto result = cudf::detail::inclusive_dense_rank_scan( | ||
input, stream_view, rmm::mr::get_current_device_resource()); | ||
}); | ||
} | ||
|
||
using data_type = nvbench::type_list<int32_t, cudf::list_view>; | ||
|
||
NVBENCH_BENCH_TYPES(nvbench_reduction_scan, NVBENCH_TYPE_AXES(data_type)) | ||
.set_name("rank_scan") | ||
.add_float64_axis("null_frequency", {0, 0.1, 0.5, 0.9}) | ||
.add_int64_axis("data_size", | ||
{ | ||
10000, // 10k | ||
100000, // 100k | ||
1000000, // 1M | ||
10000000, // 10M | ||
100000000, // 100M | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.