-
Notifications
You must be signed in to change notification settings - Fork 197
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
[Feat] add repeat
, sparsity
, eval_n_elements
APIs to bitset
#2439
Conversation
rhdong
commented
Sep 18, 2024
- This PR is a part of the feature that applies the prefilter brute-force in Cagra.
cpp/include/raft/core/bitset.cuh
Outdated
auto nnz_view = raft::make_device_scalar_view<index_t>(nnz.data()); | ||
auto size_view = raft::make_host_scalar_view<index_t>(&size_h); | ||
|
||
raft::popc(res, vector_view, size_view, nnz_view); |
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.
The count()
method can also be implemented in bitset_view
, it will be useful for users.
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 am also noticing that if the number of bits is not a multiple of the bitset element size the result might be wrong.
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 am also noticing that if the number of bits is not a multiple of the bitset element size the result might be wrong.
Should not, because the size is the actual number of bits. Maybe I miss something?
cpp/test/core/bitset.cu
Outdated
@@ -145,6 +194,37 @@ class BitsetTest : public testing::TestWithParam<test_spec_bitset> { | |||
resource::sync_stream(res, stream); | |||
ASSERT_TRUE(hostVecMatch(bitset_ref, bitset_result, raft::Compare<bitset_t>())); | |||
|
|||
// test sparsity, repeat and eval_n_elements | |||
if constexpr (std::is_same_v<bitset_t, uint32_t> || std::is_same_v<bitset_t, uint64_t>) { |
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.
Why restrict the test to those data types?
Hi @cjnolet @lowener , this PR merging will cause CUVS CI fail, so the CUVS PR rapidsai/cuvs#350 must be merged immediately after this. |
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.
LGTM
/ok to test |
/merge |