From 60184c1ada6aaea96f9f012ce5d77072dffbe827 Mon Sep 17 00:00:00 2001 From: Tamas Bela Feher Date: Sun, 14 May 2023 22:01:55 +0200 Subject: [PATCH] Move cagra template instantiations from raft_lib to NEIGHBORS_TEST --- cpp/CMakeLists.txt | 27 ---------------- .../cagra/search_multi_cta_kernel-ext.cuh | 2 +- .../detail/cagra/search_multi_cta_kernel.cuh | 4 +-- .../cagra/search_single_cta_kernel-ext.cuh | 2 +- .../detail/cagra/search_single_cta_kernel.cuh | 4 +-- cpp/test/CMakeLists.txt | 31 ++++++++++++++++++- .../ann_cagra/test_float_uint32_t.cu | 5 +++ .../ann_cagra/test_int8_t_uint32_t.cu | 4 +++ .../ann_cagra/test_uint8_t_uint32_t.cu | 5 +++ 9 files changed, 50 insertions(+), 34 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 9ed86834f6..5fe02ec794 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -306,33 +306,6 @@ if(RAFT_COMPILE_LIBRARY) src/neighbors/brute_force_knn_int64_t_float_uint32_t.cu src/neighbors/brute_force_knn_int_float_int.cu src/neighbors/brute_force_knn_uint32_t_float_uint32_t.cu - src/neighbors/cagra_build_float_uint32.cu - src/neighbors/cagra_prune_float_uint32.cu - src/neighbors/cagra_search_float_uint32.cu - src/neighbors/detail/cagra/search_multi_cta_float_uint32_dim128_t8.cu - src/neighbors/detail/cagra/search_multi_cta_float_uint32_dim256_t16.cu - src/neighbors/detail/cagra/search_multi_cta_float_uint32_dim512_t32.cu - src/neighbors/detail/cagra/search_multi_cta_float_uint32_dim1024_t32.cu - src/neighbors/detail/cagra/search_multi_cta_int8_uint32_dim128_t8.cu - src/neighbors/detail/cagra/search_multi_cta_int8_uint32_dim256_t16.cu - src/neighbors/detail/cagra/search_multi_cta_int8_uint32_dim512_t32.cu - src/neighbors/detail/cagra/search_multi_cta_int8_uint32_dim1024_t32.cu - src/neighbors/detail/cagra/search_multi_cta_uint8_uint32_dim128_t8.cu - src/neighbors/detail/cagra/search_multi_cta_uint8_uint32_dim256_t16.cu - src/neighbors/detail/cagra/search_multi_cta_uint8_uint32_dim512_t32.cu - src/neighbors/detail/cagra/search_multi_cta_uint8_uint32_dim1024_t32.cu - src/neighbors/detail/cagra/search_single_cta_float_uint32_dim128_t8.cu - src/neighbors/detail/cagra/search_single_cta_float_uint32_dim256_t16.cu - src/neighbors/detail/cagra/search_single_cta_float_uint32_dim512_t32.cu - src/neighbors/detail/cagra/search_single_cta_float_uint32_dim1024_t32.cu - src/neighbors/detail/cagra/search_single_cta_int8_uint32_dim128_t8.cu - src/neighbors/detail/cagra/search_single_cta_int8_uint32_dim256_t16.cu - src/neighbors/detail/cagra/search_single_cta_int8_uint32_dim512_t32.cu - src/neighbors/detail/cagra/search_single_cta_int8_uint32_dim1024_t32.cu - src/neighbors/detail/cagra/search_single_cta_uint8_uint32_dim128_t8.cu - src/neighbors/detail/cagra/search_single_cta_uint8_uint32_dim256_t16.cu - src/neighbors/detail/cagra/search_single_cta_uint8_uint32_dim512_t32.cu - src/neighbors/detail/cagra/search_single_cta_uint8_uint32_dim1024_t32.cu src/neighbors/detail/ivf_flat_interleaved_scan_float_float_int64_t.cu src/neighbors/detail/ivf_flat_interleaved_scan_int8_t_int32_t_int64_t.cu src/neighbors/detail/ivf_flat_interleaved_scan_uint8_t_uint32_t_int64_t.cu diff --git a/cpp/include/raft/neighbors/detail/cagra/search_multi_cta_kernel-ext.cuh b/cpp/include/raft/neighbors/detail/cagra/search_multi_cta_kernel-ext.cuh index 8e4da23031..9ea757d51f 100644 --- a/cpp/include/raft/neighbors/detail/cagra/search_multi_cta_kernel-ext.cuh +++ b/cpp/include/raft/neighbors/detail/cagra/search_multi_cta_kernel-ext.cuh @@ -20,7 +20,7 @@ namespace raft::neighbors::experimental::cagra::detail { namespace multi_cta_search { -#ifdef RAFT_EXPLICIT_INSTANTIATE_ONLY +#ifdef RAFT_EXPLICIT_INSTANTIATE_ONLY_CAGRA template +// TODO(tfeher): remove these definitions once https://github.com/rapidsai/raft/issues/1459 +// is resolved +#define RAFT_EXPLICIT_INSTANTIATE_ONLY_CAGRA +#define RAFT_COMPILED_CAGRA + #include "../ann_cagra.cuh" namespace raft::neighbors::experimental::cagra { diff --git a/cpp/test/neighbors/ann_cagra/test_int8_t_uint32_t.cu b/cpp/test/neighbors/ann_cagra/test_int8_t_uint32_t.cu index 11c986c189..7ca6f70d20 100644 --- a/cpp/test/neighbors/ann_cagra/test_int8_t_uint32_t.cu +++ b/cpp/test/neighbors/ann_cagra/test_int8_t_uint32_t.cu @@ -15,6 +15,10 @@ */ #include +// TODO(tfeher): remove these definitions once https://github.com/rapidsai/raft/issues/1459 +// is resolved +#define RAFT_EXPLICIT_INSTANTIATE_ONLY_CAGRA +#define RAFT_COMPILED_CAGRA #include "../ann_cagra.cuh" diff --git a/cpp/test/neighbors/ann_cagra/test_uint8_t_uint32_t.cu b/cpp/test/neighbors/ann_cagra/test_uint8_t_uint32_t.cu index 51d4feeed2..5d9deaf5f1 100644 --- a/cpp/test/neighbors/ann_cagra/test_uint8_t_uint32_t.cu +++ b/cpp/test/neighbors/ann_cagra/test_uint8_t_uint32_t.cu @@ -16,6 +16,11 @@ #include +// TODO(tfeher): remove these definitions once https://github.com/rapidsai/raft/issues/1459 +// is resolved +#define RAFT_EXPLICIT_INSTANTIATE_ONLY_CAGRA +#define RAFT_COMPILED_CAGRA + #include "../ann_cagra.cuh" namespace raft::neighbors::experimental::cagra {