Skip to content

Commit

Permalink
reword conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
divyegala committed Nov 12, 2024
1 parent 14b14e8 commit 11a7402
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/neighbors/detail/nn_descent.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ RAFT_KERNEL preprocess_data_kernel(
if (threadIdx.x == 0) { l2_norm = 0; }
__syncthreads();

if (metric != cuvs::distance::DistanceType::InnerProduct) {
if (metric == cuvs::distance::DistanceType::L2Expanded ||
metric == cuvs::distance::DistanceType::CosineExpanded) {
int lane_id = threadIdx.x % raft::warp_size();
for (int step = 0; step < raft::ceildiv(dim, raft::warp_size()); step++) {
int idx = step * raft::warp_size() + lane_id;
Expand Down

0 comments on commit 11a7402

Please sign in to comment.