Skip to content
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

Use stream allocator adaptor for hash join table #9704

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/cmake/thirdparty/get_cucollections.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function(find_and_configure_cucollections)
cuco 0.0
GLOBAL_TARGETS cuco::cuco
CPM_ARGS GITHUB_REPOSITORY NVIDIA/cuCollections
GIT_TAG f0eecb203590f1f4ac4a9f1700229f4434ac64dc
GIT_TAG 6433e8ad7571f14cc5384051b049029c60dd1ce0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the dependency PR is already merged, shouldn't this GIT_TAG be removed and just depend on a release branch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cuco doesn't have a release yet thus we choose to fetch a specific commit instead of the main branch (dev).

OPTIONS "BUILD_TESTS OFF" "BUILD_BENCHMARKS OFF" "BUILD_EXAMPLES OFF"
)

Expand Down
3 changes: 2 additions & 1 deletion cpp/src/join/hash_join.cu
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ hash_join::hash_join_impl::hash_join_impl(cudf::table_view const& build,
_hash_table{compute_hash_table_size(build.num_rows()),
std::numeric_limits<hash_value_type>::max(),
cudf::detail::JoinNoneValue,
stream.value()}
stream.value(),
detail::hash_table_allocator_type{default_allocator<char>{}, stream}}
{
CUDF_FUNC_RANGE();
CUDF_EXPECTS(0 != build.num_columns(), "Hash join build table is empty");
Expand Down
5 changes: 4 additions & 1 deletion cpp/src/join/join_common_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <hash/concurrent_unordered_multimap.cuh>

#include <cuco/static_multimap.cuh>
#include <rmm/mr/device/polymorphic_allocator.hpp>
PointKernel marked this conversation as resolved.
Show resolved Hide resolved

#include <limits>

Expand All @@ -38,11 +39,13 @@ using pair_type = cuco::pair_type<hash_value_type, size_type>;

using hash_type = cuco::detail::MurmurHash3_32<hash_value_type>;

using hash_table_allocator_type = rmm::mr::stream_allocator_adaptor<default_allocator<char>>;

using multimap_type =
cuco::static_multimap<hash_value_type,
size_type,
cuda::thread_scope_device,
default_allocator<char>,
hash_table_allocator_type,
cuco::double_hashing<DEFAULT_JOIN_CG_SIZE, hash_type, hash_type>>;

using row_hash = cudf::row_hasher<default_hash>;
Expand Down