diff --git a/cpp/include/raft/neighbors/detail/cagra/search_multi_kernel.cuh b/cpp/include/raft/neighbors/detail/cagra/search_multi_kernel.cuh index 879b202f4d..b4400f3c24 100644 --- a/cpp/include/raft/neighbors/detail/cagra/search_multi_kernel.cuh +++ b/cpp/include/raft/neighbors/detail/cagra/search_multi_kernel.cuh @@ -501,7 +501,7 @@ void apply_filter(INDEX_T* const result_indices_ptr, cudaStream_t cuda_stream) { const std::size_t block_size = 256; - const std::size_t grid_size = (num_queries * result_buffer_size + block_size - 1) / block_size; + const std::size_t grid_size = ceildiv(num_queries * result_buffer_size, block_size ) ; apply_filter_kernel<<>>(result_indices_ptr, result_distances_ptr,