Skip to content

Commit 79cb97e

Browse files
committed
Restore IVF-SQ list size initialization
1 parent 027c664 commit 79cb97e

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎c/tests/neighbors/ann_mg_c.cu‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <cuda.h>
77
#include <gtest/gtest.h>
88
#include <cuda/stream>
9+
910
#include <raft/core/device_mdarray.hpp>
1011
#include <raft/core/handle.hpp>
1112
#include <raft/random/rng.cuh>

‎cpp/src/neighbors/ivf_sq_index.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ index<CodeT>::index(raft::resources const& res,
4646
check_consistency();
4747
auto stream = raft::resource::get_cuda_stream(res);
4848
std::memset(accum_sorted_sizes_.data_handle(), 0, accum_sorted_sizes_.size() * sizeof(int64_t));
49+
RAFT_CUDA_TRY(cudaMemsetAsync(
50+
list_sizes_.data_handle(), 0, list_sizes_.size() * sizeof(uint32_t), stream.get()));
4951
RAFT_CUDA_TRY(
5052
cudaMemsetAsync(data_ptrs_.data_handle(), 0, data_ptrs_.size() * sizeof(CodeT*), stream.get()));
5153
RAFT_CUDA_TRY(cudaMemsetAsync(

0 commit comments

Comments
 (0)