-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNMG ANN #231
Merged
Merged
SNMG ANN #231
Changes from 50 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
cc1e45a
SNMG ANN
viclafargue 279c345
nccl_clique as header
viclafargue b10d01d
update linking, build system and conda env
viclafargue d178155
Answered review
viclafargue 4bc9d9c
Merge branch 'branch-24.08' into snmg-ann
viclafargue 1459248
Apply review
viclafargue f3a65fc
Answer reviews + small changes
viclafargue ee2dcc3
Adding documentation
viclafargue 5236cc2
Merge branch 'branch-24.08' into snmg-ann
viclafargue 60bd621
removing unnecessary omp barriers
viclafargue 17f62d2
int64_t change
viclafargue f523251
tree reduction merge implementation
viclafargue 3e79a44
tree merge solidification
viclafargue d4cabe0
Adding bench code
viclafargue 37f9755
Merge branch 'branch-24.08' into snmg-ann
viclafargue 504b0c3
Auto max throughput for replicated search
viclafargue 2d0a950
improve batching
viclafargue 169eb15
branch-24.10 merge
viclafargue 686f81d
answering reviews 1
viclafargue c8d3864
Updating params
viclafargue 51291d8
iface free functions
viclafargue 80cf875
free functions
viclafargue d60e583
NCCL clique from RAFT handle
viclafargue 3419dfa
load balancing mechanism
viclafargue 7970fdc
Merge branch 'branch-24.10' into snmg-ann
viclafargue 6a220b5
update doc
viclafargue c5e955f
moving iface struct
viclafargue 60fbef1
include fix
viclafargue 5ea9b9b
small fixes
viclafargue 8b0c8c7
RAFT handle update
viclafargue bcf97c9
RAFT handle update
viclafargue 9418f7e
smallSearchBatchSize as constexpr
viclafargue fa457f4
Merge branch 'branch-24.10' into snmg-ann
viclafargue dc2ccdd
add half type
viclafargue ed68cd8
fix bench
viclafargue 9e659c4
Update build system
viclafargue f3bc98a
update iface to only expose device-only search function
viclafargue d9a83e5
Adding replicated search mode (load-balancer and round-robin)
viclafargue e6a73c6
CAGRA bench consolidation
viclafargue d68f572
Adding --mg to conda recipes
viclafargue 6a673c3
resolving merge conflict
viclafargue 55fbb36
enable multi-GPU by default, add a CMake option to control it
jameslamb 5649a49
empty commit to re-trigger CI
jameslamb a208d49
Merge branch 'branch-24.10' into snmg-ann
jameslamb e0c232a
revert CUVS_EXPLICIT_INSTANTIATE_ONLY re-introduction
jameslamb 1a5a2f2
Merge branch 'snmg-ann' of github.com:viclafargue/cuvs into snmg-ann
jameslamb fef0fc9
Removing std comms
cjnolet c028dca
Remove UCP
cjnolet a43c4f9
Adding nccl to rapids_build
cjnolet 3b2feb7
add back NCCL dependency, pin to NCCL>=2.19
jameslamb d77a4e9
Revert "Removing std comms"
cjnolet 4af2c2e
Renaming comms source file
cjnolet cecb372
Merge branch 'snmg-ann' of github.com:viclafargue/cuvs into snmg-ann
cjnolet f7a73fd
Merge branch 'branch-24.10' into snmg-ann
cjnolet ceb6287
Adding ucp to cmakelists
cjnolet ce37b71
Merge branch 'snmg-ann' of github.com:viclafargue/cuvs into snmg-ann
cjnolet 1f0f5e9
MOre renames
cjnolet cb8ed0c
Adding libucxx
cjnolet fe5b6f8
Adding ucxx
cjnolet e257282
Adding to run time
cjnolet b6cb776
Adding libucxx to libcuvs y
cjnolet ac26507
use raw nccl calls
viclafargue 4a10a6c
Removing ucp from cmake
cjnolet c9515d5
changing serialization path and disabling sharded mode testing
viclafargue d77704c
round robin check improvment + temporary disable of CAGRA
viclafargue c2c810c
Merge branch 'branch-24.10' into snmg-ann
viclafargue 4e7398a
fix merge
viclafargue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viclafargue marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,7 @@ option(BUILD_C_LIBRARY "Build cuVS C API library" OFF) | |
option(BUILD_C_TESTS "Build cuVS C API tests" OFF) | ||
option(BUILD_CUVS_BENCH "Build cuVS ann benchmarks" OFF) | ||
option(BUILD_CAGRA_HNSWLIB "Build CAGRA+hnswlib interface" ON) | ||
option(BUILD_MG_ALGOS "Build with multi-GPU support" ON) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Summarizing our offline conversation here (somewhere threaded, that could be marked I just pushed 55fbb36, which does the following:
|
||
option(CUDA_ENABLE_KERNELINFO "Enable kernel resource usage info" OFF) | ||
option(CUDA_ENABLE_LINEINFO | ||
"Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler)" OFF | ||
|
@@ -287,6 +288,23 @@ target_compile_options( | |
"$<$<COMPILE_LANGUAGE:CUDA>:${CUVS_CUDA_FLAGS}>" | ||
) | ||
|
||
if(BUILD_MG_ALGOS) | ||
viclafargue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
set(CUVS_MG_ALGOS | ||
src/neighbors/mg/mg_flat_float_int64_t.cu | ||
src/neighbors/mg/mg_flat_int8_t_int64_t.cu | ||
src/neighbors/mg/mg_flat_uint8_t_int64_t.cu | ||
src/neighbors/mg/mg_pq_float_int64_t.cu | ||
src/neighbors/mg/mg_pq_half_int64_t.cu | ||
src/neighbors/mg/mg_pq_int8_t_int64_t.cu | ||
src/neighbors/mg/mg_pq_uint8_t_int64_t.cu | ||
src/neighbors/mg/mg_cagra_float_uint32_t.cu | ||
src/neighbors/mg/mg_cagra_half_uint32_t.cu | ||
src/neighbors/mg/mg_cagra_int8_t_uint32_t.cu | ||
src/neighbors/mg/mg_cagra_uint8_t_uint32_t.cu | ||
src/neighbors/mg/omp_checks.cu | ||
) | ||
endif() | ||
|
||
add_library( | ||
cuvs SHARED | ||
src/cluster/kmeans_balanced_fit_float.cu | ||
|
@@ -367,6 +385,17 @@ add_library( | |
src/neighbors/cagra_serialize_half.cu | ||
src/neighbors/cagra_serialize_int8.cu | ||
src/neighbors/cagra_serialize_uint8.cu | ||
src/neighbors/iface/iface_cagra_float_uint32_t.cu | ||
src/neighbors/iface/iface_cagra_half_uint32_t.cu | ||
src/neighbors/iface/iface_cagra_int8_t_uint32_t.cu | ||
src/neighbors/iface/iface_cagra_uint8_t_uint32_t.cu | ||
src/neighbors/iface/iface_flat_float_int64_t.cu | ||
src/neighbors/iface/iface_flat_int8_t_int64_t.cu | ||
src/neighbors/iface/iface_flat_uint8_t_int64_t.cu | ||
src/neighbors/iface/iface_pq_float_int64_t.cu | ||
src/neighbors/iface/iface_pq_half_int64_t.cu | ||
src/neighbors/iface/iface_pq_int8_t_int64_t.cu | ||
src/neighbors/iface/iface_pq_uint8_t_int64_t.cu | ||
src/neighbors/detail/cagra/cagra_build.cpp | ||
src/neighbors/detail/cagra/topk_for_cagra/topk.cu | ||
$<$<BOOL:${BUILD_CAGRA_HNSWLIB}>:src/neighbors/hnsw.cpp> | ||
|
@@ -428,8 +457,13 @@ add_library( | |
src/selection/select_k_half_uint32_t.cu | ||
src/stats/silhouette_score.cu | ||
src/stats/trustworthiness_score.cu | ||
${CUVS_MG_ALGOS} | ||
) | ||
|
||
if(BUILD_MG_ALGOS) | ||
target_compile_definitions(cuvs PUBLIC CUVS_BUILD_MG_ALGOS) | ||
endif() | ||
|
||
target_compile_options( | ||
cuvs INTERFACE $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--expt-extended-lambda | ||
--expt-relaxed-constexpr> | ||
|
@@ -459,11 +493,16 @@ if(NOT BUILD_CPU_ONLY) | |
${CUVS_CUSPARSE_DEPENDENCY} ${CUVS_CURAND_DEPENDENCY} | ||
) | ||
|
||
if(BUILD_MG_ALGOS) | ||
set(CUVS_COMMS_DEPENDENCY nccl) | ||
endif() | ||
|
||
# Keep cuVS as lightweight as possible. Only CUDA libs and rmm should be used in global target. | ||
target_link_libraries( | ||
cuvs | ||
PUBLIC rmm::rmm raft::raft ${CUVS_CTK_MATH_DEPENDENCIES} | ||
PRIVATE nvidia::cutlass::cutlass $<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX> cuvs-cagra-search | ||
${CUVS_COMMS_DEPENDENCY} | ||
viclafargue marked this conversation as resolved.
Show resolved
Hide resolved
|
||
) | ||
endif() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed a commit adding a NCCL host dependency for cuVS (which it didn't have before) and pinning it to
nccl>=2.19
everywhere.Context:
>= 2.19
, per upgrade tonccl>=2.19
across RAPIDS build-planning#102 (comment)nccl.h
in the bits of RAFT that cuVS includes:In the interest of time (we're very close to code freeze), I just added this host dependency in all of
libcuvs-examples
,libcuvs-static
,libcuvs
, andlibcuvs-tests
.cc @jakirkham @vyasr for awareness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Thanks James! 🙏
To reflect this, updated this comment: rapidsai/build-planning#102 (comment)
Please feel free to edit that further
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads-up James.