Skip to content

Commit 3ca1ed9

Browse files
authored
Fix redundant memset (rapidsai#1305)
The workspace is already being reset in the calling function `fusedDistanceNNImpl`, see https://github.com/rapidsai/cuvs/blob/branch-25.10/cpp/src/distance/detail/fused_distance_nn.cuh#L73 Therefore removing the memset in `fusedL2NNImpl` Authors: - Vinay Deshpande (https://github.com/vinaydes) Approvers: - Tamas Bela Feher (https://github.com/tfeher) URL: rapidsai#1305
1 parent 6254dd9 commit 3ca1ed9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

cpp/src/distance/detail/fused_distance_nn/fused_l2_nn.cuh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021-2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,7 +64,6 @@ void fusedL2NNImpl(OutT* min,
6464
constexpr auto maxVal = std::numeric_limits<DataT>::max();
6565
typedef raft::KeyValuePair<IdxT, DataT> KVPair;
6666

67-
RAFT_CUDA_TRY(cudaMemsetAsync(workspace, 0, sizeof(int) * m, stream));
6867
if (initOutBuffer) {
6968
initKernel<DataT, OutT, IdxT, ReduceOpT>
7069
<<<nblks, P::Nthreads, 0, stream>>>(min, m, maxVal, redOp);

0 commit comments

Comments
 (0)