From ac5cc15853158552065729d7211b27b0f31fd720 Mon Sep 17 00:00:00 2001 From: rhdong Date: Thu, 13 Feb 2025 18:25:00 -0800 Subject: [PATCH] [Fix] CAGRA 'merge' API compilation error under CUDA 12.4 - https://github.com/rapidsai/cuvs/issues/694 --- cpp/src/neighbors/detail/cagra/cagra_merge.cuh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cpp/src/neighbors/detail/cagra/cagra_merge.cuh b/cpp/src/neighbors/detail/cagra/cagra_merge.cuh index bc29cb206..4fe59a93e 100644 --- a/cpp/src/neighbors/detail/cagra/cagra_merge.cuh +++ b/cpp/src/neighbors/detail/cagra/cagra_merge.cuh @@ -50,8 +50,7 @@ index merge(raft::resources const& handle, for (auto index : indices) { RAFT_EXPECTS(index != nullptr, "Null pointer detected in 'indices'. Ensure all elements are valid before usage."); - using ds_idx_type = decltype(index->data().n_rows()); - if (auto* strided_dset = dynamic_cast*>(&index->data()); + if (auto* strided_dset = dynamic_cast*>(&index->data()); strided_dset != nullptr) { if (dim == 0) { dim = index->dim(); @@ -75,8 +74,7 @@ index merge(raft::resources const& handle, auto merge_dataset = [&](T* dst) { for (auto index : indices) { - using ds_idx_type = decltype(index->data().n_rows()); - auto* strided_dset = dynamic_cast*>(&index->data()); + auto* strided_dset = dynamic_cast*>(&index->data()); RAFT_CUDA_TRY(cudaMemcpy2DAsync(dst + offset * dim, sizeof(T) * dim,