-
Notifications
You must be signed in to change notification settings - Fork 88
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
Trie #350
base: dev
Are you sure you want to change the base?
Trie #350
Conversation
Can one of the admins verify this patch? Admins can comment |
Pull requests from external contributors require approval from a |
ok to test |
/ok to test |
7921760
to
ef30e24
Compare
This PR adds `dynamic_bitset` code that will be used in Trie data structure. Trie will be integrated in a separate PR #350. Since `dynamic_bitset` is not intended to be part of public-facing API, all files (.cuh and .inl) are located in include/cuco/detail/trie/dynamic_bitset Tests are added in tests/dynamic_bitset --------- Co-authored-by: Yunsong Wang <yunsongw@nvidia.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
/ok to test |
This improves insertion perfomance massively
A key is a list of labels. Iterators use LabelIt, rather than KeyIt.
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.
Reviewed just the benchmarks
benchmarks/trie/lookup_bench.cu
Outdated
|
||
distribution::unique lengths_dist; | ||
distribution::gaussian labels_dist{0.5}; | ||
generate_labels(labels, offsets, num_keys, max_key_length, lengths_dist, labels_dist); |
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 should be placed into some namespace, e.g., ´cuco::test::`
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.
Added namespace coco::test::trie 025c59a
benchmarks/trie/lookup_bench.cu
Outdated
#include <defaults.hpp> | ||
#include <utils.hpp> | ||
|
||
#include "../../tests/trie/trie_utils.hpp" |
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.
You can use the system path here, i.e., <cuco/tests/…>
.
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.
<cuco/tests/..>
does not compile. Using <../tests/>
in recent commit.
Should we change top-level CMakeLists or benchmarks/CMakeLists to access <cuco/tests/..>
from benchmarks?
benchmarks/trie/insert_bench.cu
Outdated
auto const num_keys = state.get_int64_or_default("NumKeys", 100 * 1000); | ||
auto const max_key_length = state.get_int64_or_default("MaxKeyLength", 10); | ||
|
||
using LabelType = int; |
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.
Would it make sense to make this a configurable parameter?
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.
7f1d083 makes LabelType
configurable. Testing char
, int
for now.
Trie and associated bit-vector code with tests