-
Notifications
You must be signed in to change notification settings - Fork 916
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
Refactor cudf::detail::contains(table_view, table_view)
#11325
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-22.08 #11325 +/- ##
===============================================
Coverage ? 86.39%
===============================================
Files ? 143
Lines ? 22753
Branches ? 0
===============================================
Hits ? 19658
Misses ? 3095
Partials ? 0 Continue to review full report at Codecov.
|
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.
LGTM
template <typename T> | ||
__device__ inline auto operator()(T const idx) const noexcept | ||
{ | ||
return _hasher(static_cast<size_type>(idx)); |
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.
Will there be narrow conversion issues?
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.
This functor is only used locally in this file, and the input idx
is only strong index types (either lhs_index_type
or rhs_index_type
).
This was looking good to me. I'd like to get my head around the null-checking before I approve. |
Do we have any performance results for this yet? |
Close this as it is covered in a new PR: #11330. |
…ins` (#11330) The current implementation of `cudf::detail::contains` can process input with arbitrary nested types. However, it was reported to have severe performance issue when the input tables have many duplicate rows (#11299). In order to fix the issue, #11310 and #11325 was created. Unfortunately, #11310 is separating semi-anti-join from `cudf::detail::contains`, causing duplicate implementation. On the other hand, #11325 can address the issue #11299 but semi-anti-join using it still performs worse than the previous semi-anti-join implementation. The changes in this PR include the following: * Fix the performance issue reported in #11299 for the current `cudf::detail::contains` implementation that support nested types. * Add a separate code path into `cudf::detail::contains` such that: * Input without having lists column (at any nested level) will be processed by the code path that is the same as the old implementation of semi-anti-join. This is to make sure the performance of semi-anti-join will remain the same as before. * Input with nested lists column, or NaNs compared as unequal, will be processed by another code path that supports nested types and different NaNs behavior. This will make sure support for nested types will not be dropped. Closes #11299. Authors: - Nghia Truong (https://github.com/ttnghia) Approvers: - Yunsong Wang (https://github.com/PointKernel) - Bradley Dice (https://github.com/bdice) - MithunR (https://github.com/mythrocks) - Vyas Ramasubramani (https://github.com/vyasr) - Mike Wilson (https://github.com/hyperbolic2346) - Alessandro Bellina (https://github.com/abellina) URL: #11330
This PR modifies the overload of
cudf::detail::contains
that accepts a pair oftable_view
. The main change here is switching to usingcuco::static_map
instead ofcuco::static_multimap
. This can avoid the performance regression due to the limitation of using multimap as has been reported in #11299, when the input tables have many duplicate rows.