-
Notifications
You must be signed in to change notification settings - Fork 915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List element Equality comparator #10289
Merged
Merged
Changes from 122 commits
Commits
Show all changes
129 commits
Select commit
Hold shift + click to select a range
933c974
First commit
devavret a1636e5
testing and profiling deep single hierarchy struct
devavret d59f54c
Merge branch 'branch-22.02' into struct-row-comp
devavret 765dd8d
Merge branch 'branch-22.02' into struct-row-comp
devavret 3d21daf
Make the sandboxed test compile again
devavret 9f32e6b
Update my row_comparator with nullate
devavret 53d3c90
Merge branch 'branch-22.02' into struct-row-comp
devavret 022e2a4
Basic verticalization utility and experimental namespace
devavret 7fef643
clean up most of row operators that I didn't change.
devavret 930d8de
Sliced column test
devavret 0ecc4f8
column order and null precendence support
devavret ff36d2d
Manually managed stack
devavret cd0f938
New depth based method to avoid superimpose nulls
devavret 7b8e060
Put sort2 impl in separate TU
devavret 25eb237
Merge branch 'branch-22.04' into struct-row-comp
devavret c8e527e
Basic working list == comp
devavret eb87ed7
Merge branch 'branch-22.04' into list-row-eq
devavret cc1584d
deeper list test
devavret 925481a
benchmark list ==
devavret b2b41c7
small cleanups
devavret d2937cf
Merge branch 'branch-22.04' into struct-row-comp
devavret d55c9c7
Move verticalization code to row_comparator.cpp
devavret b7cdfe0
Merge branch 'struct-row-comp' into list-row-eq
devavret 8309151
Use regular type dispatcher with new id type map
devavret 8717b9c
Early return from unequal leaf elements
devavret 21df6cf
Combined struct and list equality operator
devavret fa35461
Add null testing to list level also
devavret 3bd749e
Owning row lex operator
devavret 613d664
merge fixes
devavret 2ef3ac7
Move struct logic out of main row loop and into element_relational_co…
devavret 5577431
pushing even more logic into element_relational_comparator
devavret f037bc0
More optimizations.
devavret 8c54a85
review changes
devavret 9d24a87
Checks to ensure tables can be compared
devavret 4e5fe21
Merge branch 'struct-row-comp' into list-row-eq
devavret 693dbca
Owning row eq operator
devavret 294b0cf
Another attempt at new API
devavret a4c799a
Remove stack based struct comparator + cleanups
devavret ecb2eb0
thrust::pair -> cuda::std::pair
devavret 34a6564
optional device spans
devavret fa4abb4
Prevent device comparator construction from any table_device_view
devavret b213210
Nullate default and fix for non nested depth
devavret 6f9bedd
Fix an unsurfaced bug about depth passing
devavret be69ffa
Switch over sort impl to new comparator
devavret 76d535a
Copyright changes to satiate ci
devavret 78d10fc
Migrate struct sort benchmark to nvbench
devavret 15920ee
Avoid optional::value in favor of *
devavret d01fc30
throw when trying to sort List
devavret ac2eb0d
Leftover change for struct sort nvbench
devavret 076c4c1
struct without null pushdown test
devavret e8a9202
Remove temporary sort2_test
devavret a4b1167
Remove temporary sort2 files
devavret 62f6914
leftover sort2 in cmake
devavret 8f628ae
cleanup benchmark headers
devavret dc7d125
Docs
devavret fa7d940
Merge branch 'branch-22.04' into struct-row-comp
devavret bdc1cb6
Merge branch 'struct-row-comp' into list-row-eq
devavret 83ba4bf
Match API with self lex comparator
devavret 9c0060f
Guard null check code with nullate
devavret 57fdd1e
remove redundant size check
devavret 76c883f
Apply suggestions from code review
devavret 5fc82a9
Docs
devavret 82db9d6
port benchmark to nvbench
devavret 7871c48
privatise row_equality_comparator's ctor
devavret c9e5dc3
List rank test cleanup and merge with reduction test
devavret 98b253b
rmm pool in benchmark + style fixes
devavret 38fa66f
Merge branch 'struct-row-comp' into list-row-eq
devavret 3255dc5
Merge branch 'branch-22.04' into struct-row-comp
devavret 44d3735
Merge branch 'struct-row-comp' into list-row-eq
devavret e2d4b93
run cmake-format
devavret 52e3a35
Review changes
devavret 9470f06
More review changes
devavret 7c897c3
Review changes req by @vyasr
devavret e0467c7
add a runtime is_relationally_comparable funtion
devavret fc1e993
Review changes
devavret 096593f
Review changes
devavret f539647
Avoid WAR of storing a table_device_view
devavret 01be0bc
Rename struct_linearize to decompose_structs and Improve docs
devavret de95530
review changes req by @ttnghia
devavret 6c45cd4
Namespace changes and making element comparator private
devavret f72ce8b
Merge branch 'struct-row-comp' into list-row-eq
devavret c624317
put in row namespace
devavret 0ca2d14
Review on lex applied to equality
devavret f309837
create method just like struct lex
devavret 81f9ab8
loop 0 to size -> start off to end off
devavret 9bfd08e
Update cpp/include/cudf/table/experimental/row_operators.cuh
devavret 70e4581
Merge branch 'struct-row-comp' into list-row-eq
devavret dd8650d
We also need to keep the null mask buffers around
devavret 6cab5c4
Fix slices struct issues
devavret 14f9d25
Handle sliced list column
devavret bcd6962
Merge branch 'branch-22.04' into list-row-eq
devavret 0c12c15
Move equality comparator to experimental header
devavret b41b3fa
Style fixes
devavret 4919b04
Merge branch 'branch-22.06' into list-row-eq
devavret 3dfc133
Review changes
devavret 9031900
Review changes requested by @hyperbolic2346
devavret 119d830
Add an equality comparable check similar to lex comparable check
devavret 1cefa5a
Move linked column to a common header in utilities
devavret 34aa66b
Review changes
devavret e7ea7f9
Change to progressive slicing logic
devavret e60fbd4
pull type dispatcher out of element compare loop
devavret 42319ad
Move slicing logic to lists_column_device_view and new structs_column…
devavret 67c035c
Move list size iterator and make it only constructible from list_colu…
devavret e5fe24c
push slice logic into columns_device_view
devavret 85861a9
Add validity safe iterator
devavret 9db7479
Move element_range_comparator to element_comparator's private
devavret db3b79b
style fixes
devavret 6ca7deb
Docs for the newly added stuff
devavret 2fc3d3d
Merge branch 'branch-22.06' into list-row-eq
devavret 1c3a99d
review changes
devavret a0e581c
review changes
devavret 046c407
Review changes
devavret 6a282a6
linked_column_view inherit from column_view_base
devavret 0f768ac
spell check
devavret 92c1ff5
Change composition to private inheritance
devavret 4c0e7fa
Replace __host__ __device__ with macro
devavret 75104bb
Add more null frequencies to benchmark
devavret 1e1053b
Templatize make_validity_iterator
devavret bcfe91b
Increase testing for null frequency
devavret 981438d
curr_col -> temp_col
devavret 5bbf18e
element_range_comparator -> column_comparator
devavret 8e18d66
cleaner column_view conversion
devavret 75eaed4
delete copy ctor and assignment operator
devavret be98357
iterator docs
devavret f4c509a
Handle empty struct in list equality
devavret d1386cf
Handle empty list (without offsets)
devavret 6aef29f
Merge branch 'branch-22.06' into list-row-eq
devavret 3cc1159
Merge branch 'branch-22.06' into list-row-eq
devavret 8078e3c
Column_device_view review changes
devavret File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strictly speaking, this macro is really only necessary in a
.hpp
file that is expected to work in both host and device code TUs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change made as part of this feedback #10289 (comment). I can revert the macro changes made to all .cuh headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's not necessary in
cuh
. I made this suggestion because not everyone will think about that and people will invariably copy-paste, so uniformly usingCUDF_HOST_DEVICE
helps reduce the chance of future errors and leaves one less thing for developers to think about. It's a minor suggestion though, if you prefer to use it more surgically that's OK with me.