Skip to content

Commit

Permalink
Fix more issues found via warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed May 14, 2024
1 parent ca58668 commit 13ef7ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cpp/src/neighbors/ivf_pq_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ index<IdxT>::index(raft::resources const& handle,
pq_bits_(pq_bits),
pq_dim_(pq_dim == 0 ? calculate_pq_dim(dim) : pq_dim),
conservative_memory_allocation_(conservative_memory_allocation),
pq_centers_{raft::make_device_mdarray<float>(handle, make_pq_centers_extents())},
lists_{n_lists},
rotation_matrix_{
raft::make_device_matrix<float, uint32_t>(handle, this->rot_dim(), this->dim())},
list_sizes_{raft::make_device_vector<uint32_t, uint32_t>(handle, n_lists)},
pq_centers_{raft::make_device_mdarray<float>(handle, make_pq_centers_extents())},
centers_{raft::make_device_matrix<float, uint32_t>(handle, n_lists, this->dim_ext())},
centers_rot_{raft::make_device_matrix<float, uint32_t>(handle, n_lists, this->rot_dim())},
rotation_matrix_{
raft::make_device_matrix<float, uint32_t>(handle, this->rot_dim(), this->dim())},
data_ptrs_{raft::make_device_vector<uint8_t*, uint32_t>(handle, n_lists)},
inds_ptrs_{raft::make_device_vector<IdxT*, uint32_t>(handle, n_lists)},
accum_sorted_sizes_{raft::make_host_vector<IdxT, uint32_t>(n_lists + 1)}
Expand Down
4 changes: 2 additions & 2 deletions cpp/test/neighbors/ann_ivf_pq.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ class ivf_pq_test : public ::testing::TestWithParam<ivf_pq_inputs> {
cuvs::Compare<uint8_t>{}));

// Another test with the API that take list_data directly
auto list_data = index->lists()[label]->data.view();
uint32_t n_take = 4;
[[maybe_unused]] auto list_data = index->lists()[label]->data.view();
uint32_t n_take = 4;
ASSERT_TRUE(row_offset + n_take < n_rows);
auto codes2 = raft::make_device_matrix<uint8_t>(handle_, n_take, index->pq_dim());
ivf_pq::helpers::codepacker::unpack_list_data(
Expand Down

0 comments on commit 13ef7ec

Please sign in to comment.