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

Add Arrow bloom filter policy #625

Merged
merged 36 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
90cc686
WIP. Add Arrow BF policy
mhaseeb123 Oct 25, 2024
8c614d0
Add test and benchmark
mhaseeb123 Oct 25, 2024
f4d67d8
Minor improvements to example
mhaseeb123 Oct 25, 2024
a5e625f
Update the example to insert and evaluate both policies in one
mhaseeb123 Oct 25, 2024
7bbb36a
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Oct 25, 2024
d31d147
Convert templated lambda function into normal one
mhaseeb123 Oct 25, 2024
2ff15a5
Merge branch 'fea/impl-arrow-bf-policy' of https://github.com/mhaseeb…
mhaseeb123 Oct 25, 2024
863a508
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Oct 25, 2024
8eb5b3c
Update bloom filter policies structure
mhaseeb123 Oct 26, 2024
708aac3
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Oct 26, 2024
0872cfb
doc updates
mhaseeb123 Oct 26, 2024
a0c7d32
Minor updates
mhaseeb123 Oct 26, 2024
a98225c
Merge branch 'fea/impl-arrow-bf-policy' of https://github.com/mhaseeb…
mhaseeb123 Oct 26, 2024
05b6967
Minor
mhaseeb123 Oct 26, 2024
2f42861
Merge branch 'dev' into fea/impl-arrow-bf-policy
mhaseeb123 Oct 26, 2024
e389a7b
Minor updates
mhaseeb123 Oct 26, 2024
8c536bd
Minor
mhaseeb123 Oct 26, 2024
f61e79c
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Oct 26, 2024
e587a21
Update example link
mhaseeb123 Oct 26, 2024
a4f7013
Merge branch 'fea/impl-arrow-bf-policy' of https://github.com/mhaseeb…
mhaseeb123 Oct 26, 2024
8d54b16
Apply suggestions from code review
mhaseeb123 Oct 28, 2024
44ffc9d
Apply suggestion from code review
mhaseeb123 Oct 28, 2024
db6b8f0
Doxygen fix. Benchmarks
mhaseeb123 Oct 28, 2024
59f9791
Separate the two examples.
mhaseeb123 Oct 28, 2024
26ef2a8
Update README with both example links
mhaseeb123 Oct 28, 2024
40ac01f
Apply suggestions from code review
mhaseeb123 Oct 28, 2024
efceee3
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Oct 28, 2024
701886c
Address review comments
mhaseeb123 Oct 28, 2024
d7f91a3
[pre-commit.ci] auto code formatting
pre-commit-ci[bot] Oct 28, 2024
7955cb6
Update README.md
PointKernel Oct 28, 2024
a489d2b
doxygen updates
mhaseeb123 Oct 28, 2024
ee48c4d
Merge branch 'fea/impl-arrow-bf-policy' of https://github.com/mhaseeb…
mhaseeb123 Oct 28, 2024
a927b1a
Remove Arrow policy example and add a @code docstring to demo the policy
mhaseeb123 Oct 29, 2024
6802d79
Merge branch 'dev' into fea/impl-arrow-bf-policy
mhaseeb123 Oct 29, 2024
fd9861f
docstring updates
mhaseeb123 Oct 30, 2024
6f7bf92
Merge branch 'fea/impl-arrow-bf-policy' of https://github.com/mhaseeb…
mhaseeb123 Oct 30, 2024
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,4 @@ We plan to add many GPU-accelerated, concurrent data structures to `cuCollection
`cuco::bloom_filter` implements a Blocked Bloom Filter for approximate set membership queries.

#### Examples:
- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/bloom_filter/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJydVm1v20YM_iuE9mF2I78FCwo4L4CXpJuxwsnstEUxD8HpRFuHynfavdgxg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0cnjR-BaIMrF5dPj_7wj9pwkxXJyYEFlolLKfVTMswZZYB7QPHrSOsuAFToeBTJhJhjb9EXtdXdX-4n171IcWCyvKrVJVMqBUJMSdVQqyoa2tU5bfJoWvGTIbGPz5Tv5J9vcfllDs5ZSWn_I6ci1yRXF5tT_bSmypjqx6vsIxbh8N2pEFNU3Vj_Ri029CrAMvxK2e3zLv4H3lfV9I0_SCvrCs2Ng3YFi4u6HHrh5KetvS5FiGYfd8q-2JvD7GUJK-wNNJUSPCr-oXetPz7C73R6P0LWSTXnA9Oz9yAjlVhy7e1qENAl_zkZPAeOkzz7NKsHt_3odOhzW3pj6UcmHZytkrCK1wukgYm5zwn47p86SID1Su_RS9xfU67-uCctIte_g6__wINDYAL))
- [Host-bulk APIs](https://github.com/NVIDIA/cuCollections/blob/dev/examples/bloom_filter/host_bulk_example.cu) (see [live example in godbolt](https://godbolt.org/clientstate/eJzFV9tu20YQ_ZUBC7RSQl1sNAgg2QaUWyM0kFPLSRBUBbEiV9Ii1C67F8mq4X_vzHIpkbacGu1D44eIO7czZ2ZnyNvIcGOEkiYa_H4biSwanMRRzuTSsSWPBlHqMhbFkVFOp_TcezaT8Axeq2KnxXJloZW24bR_-nMMk8_jN-MRvL68-nh5NboeX066pOv1P4iUS8MzcDLjGuyKw6hgKf4XJDF85pqAwGm3Dy1SmEVBNovaQ-9lpxys2Q6ksuAMRzfCwELkHPhNygsLQkKq1kUumEw5bIVd-VDBj4cDX4MTNbcM9RlaFPi0qGsCs3vo9G9lbTHo9bbbbZd52F2ll728VDa9D-PXbyfTtx2Evjf7JHNkFjT_0wmNic93wApElrI54s3ZFpQGttQcZVYR8q0WVshlDEYt7JZp7v1kwlgt5s42yKtwYv51BaSPSSRuNIXxdBbBq9F0PI29ny_j6_eXn67hy-jqajS5Hr-dwuUVFmvyZkylwqd3MJp8hV_HkzcxcKQOQ_GbQlMWCFUQrTwrOZxy3oCxUCUsU_BULEQKVQfBUm24lpgWFFyvRdlrCD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sFI73wFlO9YpQElpLSNigceBxWjD3IzJs9IVZw3AhZXq6jlYuDCr-xOCbPjPiLJ_aCTjM2GODd4yxLDL6s86S6gA9Suxg-ocka-B9rsUczCb_r8nqvxXB7dwRYox3_l36sZ_3furGR-8PW1BzXk4Q-zSX8cqTvMfxC04cPzEhu0vTk9IU7QbEqbPn1GXUQzXn6_PnJS-gwna7OzTp52YdOBweP7fiuwFfdTs7Wc_9Jmot5zWeapjkebsqPSDzAwSu_RXdxJcfeasixh6K7P_zf3_9HQ24=))
6 changes: 3 additions & 3 deletions benchmarks/bloom_filter/add_bench.cu
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ template <typename Key, typename Hash, typename Word, nvbench::int32_t WordsPerB
void bloom_filter_add(nvbench::state& state,
nvbench::type_list<Key, Hash, Word, nvbench::enum_type<WordsPerBlock>, Dist>)
{
using policy_type = cuco::bloom_filter_policy<rebind_hasher_t<Hash, Key>,
Word,
static_cast<std::uint32_t>(WordsPerBlock)>;
using policy_type = cuco::default_filter_policy<rebind_hasher_t<Hash, Key>,
Word,
static_cast<std::uint32_t>(WordsPerBlock)>;
using filter_type =
cuco::bloom_filter<Key, cuco::extent<size_t>, cuda::thread_scope_device, policy_type>;

Expand Down
68 changes: 64 additions & 4 deletions benchmarks/bloom_filter/contains_bench.cu
PointKernel marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ void bloom_filter_contains(
{
// cudaDeviceSetLimit(cudaLimitMaxL2FetchGranularity, 32); // slightly improves peformance if
// filter block fits into a 32B sector
using policy_type = cuco::bloom_filter_policy<rebind_hasher_t<Hash, Key>,
Word,
static_cast<std::uint32_t>(WordsPerBlock)>;
using policy_type = cuco::default_filter_policy<rebind_hasher_t<Hash, Key>,
Word,
static_cast<std::uint32_t>(WordsPerBlock)>;
using filter_type =
cuco::bloom_filter<Key, cuco::extent<size_t>, cuda::thread_scope_device, policy_type>;

Expand Down Expand Up @@ -88,6 +88,57 @@ void bloom_filter_contains(
});
}

/**
* @brief A benchmark evaluating `cuco::bloom_filter::contains_async` performance with
* `arrow_filter_policy`
*/
template <typename Key, typename Dist>
void arrow_bloom_filter_contains(nvbench::state& state, nvbench::type_list<Key, Dist>)
{
// cudaDeviceSetLimit(cudaLimitMaxL2FetchGranularity, 32); // slightly improves peformance if
// filter block fits into a 32B sector
using policy_type = cuco::arrow_filter_policy<Key>;
using filter_type =
cuco::bloom_filter<Key, cuco::extent<size_t>, cuda::thread_scope_device, policy_type>;

auto const num_keys = state.get_int64("NumInputs");
auto const filter_size_mb = state.get_int64("FilterSizeMB");

std::size_t const num_sub_filters =
(filter_size_mb * 1024 * 1024) /
(sizeof(typename filter_type::word_type) * filter_type::words_per_block);

try {
auto const policy = policy_type{static_cast<uint32_t>(num_sub_filters)};
} catch (std::exception const& e) {
state.skip(e.what()); // skip invalid configurations
}

thrust::device_vector<Key> keys(num_keys);
thrust::device_vector<bool> result(num_keys, false);

key_generator gen;
gen.generate(dist_from_state<Dist>(state), keys.begin(), keys.end());

state.add_element_count(num_keys);

filter_type filter{num_sub_filters, {}, {static_cast<uint32_t>(num_sub_filters)}};

state.collect_dram_throughput();
state.collect_l1_hit_rates();
state.collect_l2_hit_rates();
state.collect_loads_efficiency();
state.collect_stores_efficiency();

add_fpr_summary(state, filter);

filter.add(keys.begin(), keys.end());

state.exec([&](nvbench::launch& launch) {
filter.contains_async(keys.begin(), keys.end(), result.begin(), {launch.get_stream()});
});
}

NVBENCH_BENCH_TYPES(bloom_filter_contains,
NVBENCH_TYPE_AXES(nvbench::type_list<defaults::BF_KEY>,
nvbench::type_list<defaults::BF_HASH>,
Expand Down Expand Up @@ -122,4 +173,13 @@ NVBENCH_BENCH_TYPES(bloom_filter_contains,
.set_type_axes_names({"Key", "Hash", "Word", "WordsPerBlock", "Distribution"})
.set_max_noise(defaults::MAX_NOISE)
.add_int64_axis("NumInputs", {defaults::BF_N})
.add_int64_axis("FilterSizeMB", {defaults::BF_SIZE_MB});
.add_int64_axis("FilterSizeMB", {defaults::BF_SIZE_MB});

NVBENCH_BENCH_TYPES(arrow_bloom_filter_contains,
NVBENCH_TYPE_AXES(nvbench::type_list<defaults::BF_KEY>,
nvbench::type_list<distribution::unique>))
.set_name("arrow_bloom_filter_contains_unique_size")
.set_type_axes_names({"Key", "Distribution"})
.set_max_noise(defaults::MAX_NOISE)
.add_int64_axis("NumInputs", {defaults::BF_N / 2})
.add_int64_axis("FilterSizeMB", defaults::BF_SIZE_MB_RANGE_CACHE);
45 changes: 36 additions & 9 deletions examples/bloom_filter/host_bulk_example.cu
mhaseeb123 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@

#include <iostream>

int main(void)
{
// Generate 10'000 keys and insert the first 5'000 into the filter.
int constexpr num_keys = 10'000;
int constexpr num_tp = num_keys * 0.5;
int constexpr num_tn = num_keys - num_tp;
// key type for bloom filter
using key_type = int;

// Spawn a filter with 200 sub-filters.
cuco::bloom_filter<int> filter{200};
// Function to bulk insert to the provided bloom filter and evaluate FPR.
template <typename FilterType>
void bulk_insert_and_eval_bloom_filter(FilterType& filter, int num_keys)
{
// Insert the first half keys into the filter.
int const num_tp = num_keys * 0.5;
int const num_tn = num_keys - num_tp;

thrust::device_vector<int> keys(num_keys);
thrust::device_vector<key_type> keys(num_keys);
thrust::sequence(keys.begin(), keys.end(), 1);

auto tp_begin = keys.begin();
Expand Down Expand Up @@ -63,6 +64,32 @@ int main(void)
float(thrust::count(thrust::device, tn_result.begin(), tn_result.end(), true)) / float(num_tn);

std::cout << "TPR=" << tp_rate << " FPR=" << fp_rate << std::endl;
}

int main(void)
{
int constexpr num_keys = 10'000; ///< Generate 10'000 keys
int constexpr sub_filters = 200; ///< 200 sub-filters per bloom filter

// Spawn a bloom filter with default policy and 200 sub-filters.
cuco::bloom_filter<key_type> filter{sub_filters};

// bulk insert to the bloom filter and evaluate
std::cout << "Bulk insert and evaluate bloom filter with default policy: " << std::endl;
bulk_insert_and_eval_bloom_filter(filter, num_keys);

// Arrow bloom filter policy type
using arrow_policy_type = cuco::arrow_filter_policy<key_type>;
// bloom filter with arrow policy type
using arrow_policy_filter_type = cuco::
bloom_filter<key_type, cuco::extent<size_t>, cuda::thread_scope_device, arrow_policy_type>;

// Spawn a bloom filter with arrow policy and 200 sub-filters.
arrow_policy_filter_type filter_arrow_policy{sub_filters, {}, arrow_policy_type{sub_filters}};

// bulk insert to the bloom filter and evaluate
std::cout << "Bulk insert and evaluate bloom filter with arrow policy: " << std::endl;
bulk_insert_and_eval_bloom_filter(filter_arrow_policy, num_keys);

return 0;
}
8 changes: 4 additions & 4 deletions include/cuco/bloom_filter.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#pragma once

#include <cuco/bloom_filter_policy.cuh>
#include <cuco/bloom_filter_policies.cuh>
#include <cuco/bloom_filter_ref.cuh>
#include <cuco/detail/storage/storage_base.cuh>
#include <cuco/extent.cuh>
Expand Down Expand Up @@ -55,13 +55,13 @@ namespace cuco {
* @tparam Extent Size type that is used to determine the number of blocks in the filter
* @tparam Scope The scope in which operations will be performed by individual threads
* @tparam Policy Type that defines how to generate and store key fingerprints (see
* `cuco/bloom_filter_policy.cuh`)
* `cuco/default_filter_policy.cuh`)
mhaseeb123 marked this conversation as resolved.
Show resolved Hide resolved
* @tparam Allocator Type of allocator used for device-accessible storage
*/
template <class Key,
class Extent = cuco::extent<std::size_t>,
cuda::thread_scope Scope = cuda::thread_scope_device,
class Policy = cuco::bloom_filter_policy<cuco::xxhash_64<Key>, std::uint32_t, 8>,
class Policy = cuco::default_filter_policy<cuco::xxhash_64<Key>, std::uint32_t, 8>,
class Allocator = cuco::cuda_allocator<cuda::std::byte>>
class bloom_filter {
public:
Expand Down Expand Up @@ -109,7 +109,7 @@ class bloom_filter {
*
* @param num_blocks Number of sub-filters or blocks
* @param scope The scope in which operations will be performed
* @param policy Fingerprint generation policy (see `cuco/bloom_filter_policy.cuh`)
* @param policy Fingerprint generation policy (see `cuco/default_filter_policy.cuh`)
mhaseeb123 marked this conversation as resolved.
Show resolved Hide resolved
* @param alloc Allocator used for allocating device-accessible storage
* @param stream CUDA stream used to initialize the filter
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,25 @@

#pragma once

#include <cuco/detail/bloom_filter/bloom_filter_policy_impl.cuh>
#include <cuco/detail/bloom_filter/arrow_filter_policy.cuh>
#include <cuco/detail/bloom_filter/default_filter_policy_impl.cuh>

#include <cstdint>

namespace cuco {

/**
* @brief A policy that defines how a Blocked Bloom Filter generates and stores a key's fingerprint.
* @brief A policy that defines how Arrow Block-Split Bloom Filter generates and stores a key's
* fingerprint.
*
* @tparam Key The type of the values to generate a fingerprint for.
*/
template <class Key>
using arrow_filter_policy = detail::arrow_filter_policy<Key>;

/**
* @brief The default policy that defines how a Blocked Bloom Filter generates and stores a key's
* fingerprint.
*
* @note `Word` type must be an atomically updatable integral type. `WordsPerBlock` must
* be a power-of-two.
Expand All @@ -33,8 +44,8 @@ namespace cuco {
* @tparam WordsPerBlock Number of words/segments in each block
*/
template <class Hash, class Word, std::uint32_t WordsPerBlock>
class bloom_filter_policy {
using impl_type = cuco::detail::bloom_filter_policy_impl<Hash, Word, WordsPerBlock>;
class default_filter_policy {
using impl_type = cuco::detail::default_filter_policy_impl<Hash, Word, WordsPerBlock>;

public:
using hasher = typename impl_type::hasher; ///< Type of the hash function
Expand All @@ -48,7 +59,7 @@ class bloom_filter_policy {

public:
/**
* @brief Constructs the `bloom_filter_policy` object.
* @brief Constructs the `default_filter_policy` object.
*
* @throws Compile-time error if the specified number of words in a filter block is not a
* power-of-two or is larger than 32. If called from host: throws exception; If called from
Expand All @@ -64,8 +75,8 @@ class bloom_filter_policy {
* @param pattern_bits Number of bits in a key's fingerprint
* @param hash Hash function used to generate a key's fingerprint
*/
__host__ __device__ constexpr bloom_filter_policy(std::uint32_t pattern_bits = words_per_block,
Hash hash = {});
__host__ __device__ constexpr default_filter_policy(std::uint32_t pattern_bits = words_per_block,
Hash hash = {});

/**
* @brief Generates the hash value for a given key.
Expand Down Expand Up @@ -116,4 +127,4 @@ class bloom_filter_policy {

} // namespace cuco

#include <cuco/detail/bloom_filter/bloom_filter_policy.inl>
#include <cuco/detail/bloom_filter/default_filter_policy.inl>
4 changes: 2 additions & 2 deletions include/cuco/bloom_filter_ref.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace cuco {
* @tparam Extent Size type that is used to determine the number of blocks in the filter
* @tparam Scope The scope in which operations will be performed by individual threads
* @tparam Policy Type that defines how to generate and store key fingerprints (see
* `cuco/bloom_filter_policy.cuh`)
* `cuco/bloom_filter_policies.cuh`)
*/
template <class Key, class Extent, cuda::thread_scope Scope, class Policy>
class bloom_filter_ref {
Expand All @@ -60,7 +60,7 @@ class bloom_filter_ref {
* @param data Pointer to the storage span of the filter
* @param num_blocks Number of sub-filters or blocks
* @param scope The scope in which operations will be performed
* @param policy Fingerprint generation policy (see `cuco/bloom_filter_policy.cuh`)
* @param policy Fingerprint generation policy (see `cuco/default_filter_policy.cuh`)
mhaseeb123 marked this conversation as resolved.
Show resolved Hide resolved
*/
__host__ __device__ explicit constexpr bloom_filter_ref(word_type* data,
Extent num_blocks,
Expand Down
Loading