-
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
Add detail cuco_allocator
#14877
Add detail cuco_allocator
#14877
Conversation
35428d2
to
f9ce36f
Compare
@@ -117,7 +117,7 @@ template <typename Key, | |||
typename Element, | |||
typename Hasher = cudf::hashing::detail::default_hash<Key>, | |||
typename Equality = equal_to<Key>, | |||
typename Allocator = default_allocator<thrust::pair<Key, Element>>> | |||
typename Allocator = rmm::mr::polymorphic_allocator<thrust::pair<Key, Element>>> |
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 guess this can't use the cuco_allocator because it needs to allocate in units that aren't just raw bytes, but instead based on the Key/Element pair size?
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.
Exactly, cuco uses a trait internally to convert the given allocator to the desired type thus the input data type doesn't really matter. concurrent_unordered_map
doesn't have this implemented thus we have to pass the proper type to make it work.
/merge |
Description
Surpass #14827
Related to #11176
This PR adds a new
cudf::detail::cuco_allocator
to deprecate and replace the olddefault_allocator
in the global namespace. Following the comments in #14827 (review), the newcudf::detail::cuco_allocator
class is moved todetail/cuco_helpers.cuh
. Free functions inhashing/detail/helper_functions.cuh
are left in the global namespace without changes due to the verbose nested namespace expression.Checklist