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 1 commit
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
4 changes: 2 additions & 2 deletions cpp/cmake/thirdparty/get_cucollections.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function(find_and_configure_cucollections)
# cuCollections doesn't have a version yet
cuco 0.0
GLOBAL_TARGETS cuco::cuco
CPM_ARGS GITHUB_REPOSITORY NVIDIA/cuCollections
GIT_TAG f0eecb203590f1f4ac4a9f1700229f4434ac64dc
PointKernel marked this conversation as resolved.
Show resolved Hide resolved
CPM_ARGS GITHUB_REPOSITORY PointKernel/cuCollections
GIT_TAG allocator-without-stream
PointKernel marked this conversation as resolved.
Show resolved Hide resolved
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