Refactor mixed_semi_join using cuco::static_set#16230
Refactor mixed_semi_join using cuco::static_set#16230rapids-bot[bot] merged 36 commits intorapidsai:branch-24.10from
Conversation
As rapids-cmake uses the latest cuco which uses key_equal as lhs, thus build and probe table needed to swaped accordingly.
| experimental::row::equality::preprocessed_table::create(probe, stream); | ||
| auto const row_comparator = | ||
| cudf::experimental::row::equality::two_table_comparator{preprocessed_probe, preprocessed_build}; | ||
| cudf::experimental::row::equality::two_table_comparator{preprocessed_build, preprocessed_probe}; |
There was a problem hiding this comment.
is there a reason for this order change build and probe?
There was a problem hiding this comment.
I need to dig into why but without this change the gtests start failing. Maybe @srinivasyadav18 can provide us a quick insight.
There was a problem hiding this comment.
Update: We changed this order and added swap_tables=true at mixed_join_kernels_semi.cu:+72 (tagged you there) to fix the left and right directionality in the equality in single_expression_equality::operator(). Specifically, the single_expression_equality expects indices in {build, probe} order and we have also reset the hasher and equality functors for the cuco::static_set which swaps the internal left and right directions for {build, probe} hence us using swap_table=true.
I know it's quite confusing. 😅
There was a problem hiding this comment.
This is mainly due to a breaking change in NVIDIA/cuCollections#479 where we always put query keys on the left-hand side for comparison.
Please provide benchmark showing what benefit this PR will bring to us. |
|
/ok to test |
PointKernel
left a comment
There was a problem hiding this comment.
One minor improvement otherwise looks great to me.
@mhaseeb123 Thank you for stepping in to help resolve the issue and finalize the PR! 🔥 🔥 🔥
| experimental::row::equality::preprocessed_table::create(probe, stream); | ||
| auto const row_comparator = | ||
| cudf::experimental::row::equality::two_table_comparator{preprocessed_probe, preprocessed_build}; | ||
| cudf::experimental::row::equality::two_table_comparator{preprocessed_build, preprocessed_probe}; |
There was a problem hiding this comment.
This is mainly due to a breaking change in NVIDIA/cuCollections#479 where we always put query keys on the left-hand side for comparison.
Co-authored-by: Yunsong Wang <yunsongw@nvidia.com>
|
Performance results from Spark (spark-h). Thanks to @zpuller for running this. Queries of interest: q16 and q94 that use |
|
Shorter for easy reading:
|
|
/merge |
Description
This PR refactors
mixed_semi_joinby replacing cuco legacystatic_mapwith lateststatic_set.Contributes to #12261.
Checklist