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

ivf-pq integration: hotfixes #891

Merged
merged 1 commit into from
Oct 5, 2022
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions cpp/include/raft/spatial/knn/detail/ivf_pq_search.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ __launch_bounds__(1024) __global__
out_indices = _out_indices + topk * (probe_ix + (n_probes * query_ix));
} else {
// Store all calculated distances to out_scores
auto max_samples = cluster_offsets[n_probes];
auto max_samples = Pow2<128>::roundUp(cluster_offsets[n_probes]);
out_scores = _out_scores + max_samples * query_ix;
}
uint32_t label = cluster_labels[n_probes * query_ix + probe_ix];
Expand Down Expand Up @@ -741,7 +741,7 @@ __launch_bounds__(1024) __global__
__syncthreads();
} else {
// fill in the rest of the out_scores with dummy values
uint32_t max_samples = uint32_t(cluster_offsets[n_probes]);
uint32_t max_samples = uint32_t(Pow2<128>::roundUp(cluster_offsets[n_probes]));
if (probe_ix + 1 == n_probes) {
for (uint32_t i = threadIdx.x + sample_offset + n_samples; i < max_samples;
i += blockDim.x) {
Expand Down