-
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
[FEA] Add support for bitmap_view & the API of bitmap_to_csr
#2109
Changes from 1 commit
165b278
62d9e34
7dea38d
1b6e784
67f0650
1e5294c
70cce47
f8960d9
20f76af
7dc7cf8
cab8691
3edeafd
f015ed5
308eb8b
0d5ec74
5cf5a8b
42d5355
1aff844
59533e0
311f2d1
7d960bd
8a3b759
7dea754
08397c6
b2ad06e
09e64ab
53202c6
8838a36
1c91c74
01dd903
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -366,9 +366,9 @@ class BitmapToCSRTest : public ::testing::TestWithParam<BitmapToCSRInputs<index_ | |
|
||
auto csr_view = raft::make_device_compressed_structure_view<index_t, index_t, index_t>( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't have to know the sparsity of the CSR when we call |
||
indptr_d.data(), indices_d.data(), params.n_rows, params.n_cols, nnz); | ||
auto csr = raft::make_device_csr_matrix_view<value_t, index_t>(values_d.data(), csr_view); | ||
auto csr = raft::make_device_csr_matrix<value_t, index_t>(handle, csr_view); | ||
|
||
convert::bitmap_to_csr<bitmap_t, index_t>(handle, bitmap, csr); | ||
convert::bitmap_to_csr(handle, bitmap, csr); | ||
|
||
resource::sync_stream(handle); | ||
|
||
|
@@ -389,9 +389,8 @@ class BitmapToCSRTest : public ::testing::TestWithParam<BitmapToCSRInputs<index_ | |
resource::sync_stream(handle); | ||
|
||
ASSERT_TRUE(csr_compare(indptr_h, indices_h, indptr_expected_h, indices_expected_h)); | ||
|
||
ASSERT_TRUE(raft::devArrMatch<value_t>( | ||
values_d.data(), values_expected_d.data(), nnz, raft::Compare<value_t>(), stream)); | ||
csr.get_elements().data(), values_expected_d.data(), nnz, raft::Compare<value_t>(), stream)); | ||
} | ||
|
||
protected: | ||
|
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.
In and out are already specified on the param so we shouldn't need to duplicate those in the description. Can you please expand the descriptions, though? Instead of just "handle" and "raft::bitmap_view", it would be helpful to explain their purpose.
Also, please don't include "reference type" in the description. The caller doesn't have to care that it's a reference type. That's automatic when they pass in the argument.
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 think we should still be accepting device_structure_owning_csr_matrix here unless we intend to explicitly support both. If a user passes in a structure-preserving csr matrix, they will end up getting an error when you try to initialize the sparsity.
EDIT: Nevermind. I see where you are supporting both below.
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.
Make sense.