Skip to content
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 67 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
cc1e45a
SNMG ANN
viclafargue Jul 18, 2024
279c345
nccl_clique as header
viclafargue Jul 18, 2024
b10d01d
update linking, build system and conda env
viclafargue Jul 18, 2024
d178155
Answered review
viclafargue Jul 19, 2024
4bc9d9c
Merge branch 'branch-24.08' into snmg-ann
viclafargue Jul 19, 2024
1459248
Apply review
viclafargue Jul 22, 2024
f3a65fc
Answer reviews + small changes
viclafargue Jul 25, 2024
ee2dcc3
Adding documentation
viclafargue Jul 26, 2024
5236cc2
Merge branch 'branch-24.08' into snmg-ann
viclafargue Jul 26, 2024
60bd621
removing unnecessary omp barriers
viclafargue Jul 29, 2024
17f62d2
int64_t change
viclafargue Jul 30, 2024
f523251
tree reduction merge implementation
viclafargue Jul 30, 2024
3e79a44
tree merge solidification
viclafargue Jul 31, 2024
d4cabe0
Adding bench code
viclafargue Aug 6, 2024
37f9755
Merge branch 'branch-24.08' into snmg-ann
viclafargue Aug 6, 2024
504b0c3
Auto max throughput for replicated search
viclafargue Aug 9, 2024
2d0a950
improve batching
viclafargue Aug 20, 2024
169eb15
branch-24.10 merge
viclafargue Sep 6, 2024
686f81d
answering reviews 1
viclafargue Sep 6, 2024
c8d3864
Updating params
viclafargue Sep 9, 2024
51291d8
iface free functions
viclafargue Sep 9, 2024
80cf875
free functions
viclafargue Sep 10, 2024
d60e583
NCCL clique from RAFT handle
viclafargue Sep 18, 2024
3419dfa
load balancing mechanism
viclafargue Sep 19, 2024
7970fdc
Merge branch 'branch-24.10' into snmg-ann
viclafargue Sep 19, 2024
6a220b5
update doc
viclafargue Sep 19, 2024
c5e955f
moving iface struct
viclafargue Sep 23, 2024
60fbef1
include fix
viclafargue Sep 23, 2024
5ea9b9b
small fixes
viclafargue Sep 24, 2024
8b0c8c7
RAFT handle update
viclafargue Sep 26, 2024
bcf97c9
RAFT handle update
viclafargue Sep 26, 2024
9418f7e
smallSearchBatchSize as constexpr
viclafargue Sep 27, 2024
fa457f4
Merge branch 'branch-24.10' into snmg-ann
viclafargue Sep 30, 2024
dc2ccdd
add half type
viclafargue Sep 30, 2024
ed68cd8
fix bench
viclafargue Sep 30, 2024
9e659c4
Update build system
viclafargue Oct 2, 2024
f3bc98a
update iface to only expose device-only search function
viclafargue Oct 2, 2024
d9a83e5
Adding replicated search mode (load-balancer and round-robin)
viclafargue Oct 2, 2024
e6a73c6
CAGRA bench consolidation
viclafargue Oct 2, 2024
d68f572
Adding --mg to conda recipes
viclafargue Oct 2, 2024
6a673c3
resolving merge conflict
viclafargue Oct 2, 2024
55fbb36
enable multi-GPU by default, add a CMake option to control it
jameslamb Oct 2, 2024
5649a49
empty commit to re-trigger CI
jameslamb Oct 2, 2024
a208d49
Merge branch 'branch-24.10' into snmg-ann
jameslamb Oct 2, 2024
e0c232a
revert CUVS_EXPLICIT_INSTANTIATE_ONLY re-introduction
jameslamb Oct 2, 2024
1a5a2f2
Merge branch 'snmg-ann' of github.com:viclafargue/cuvs into snmg-ann
jameslamb Oct 2, 2024
fef0fc9
Removing std comms
cjnolet Oct 2, 2024
c028dca
Remove UCP
cjnolet Oct 2, 2024
a43c4f9
Adding nccl to rapids_build
cjnolet Oct 2, 2024
3b2feb7
add back NCCL dependency, pin to NCCL>=2.19
jameslamb Oct 2, 2024
d77a4e9
Revert "Removing std comms"
cjnolet Oct 3, 2024
4af2c2e
Renaming comms source file
cjnolet Oct 3, 2024
cecb372
Merge branch 'snmg-ann' of github.com:viclafargue/cuvs into snmg-ann
cjnolet Oct 3, 2024
f7a73fd
Merge branch 'branch-24.10' into snmg-ann
cjnolet Oct 3, 2024
ceb6287
Adding ucp to cmakelists
cjnolet Oct 3, 2024
ce37b71
Merge branch 'snmg-ann' of github.com:viclafargue/cuvs into snmg-ann
cjnolet Oct 3, 2024
1f0f5e9
MOre renames
cjnolet Oct 3, 2024
cb8ed0c
Adding libucxx
cjnolet Oct 3, 2024
fe5b6f8
Adding ucxx
cjnolet Oct 3, 2024
e257282
Adding to run time
cjnolet Oct 3, 2024
b6cb776
Adding libucxx to libcuvs y
cjnolet Oct 3, 2024
ac26507
use raw nccl calls
viclafargue Oct 3, 2024
4a10a6c
Removing ucp from cmake
cjnolet Oct 3, 2024
c9515d5
changing serialization path and disabling sharded mode testing
viclafargue Oct 3, 2024
d77704c
round robin check improvment + temporary disable of CAGRA
viclafargue Oct 3, 2024
c2c810c
Merge branch 'branch-24.10' into snmg-ann
viclafargue Oct 3, 2024
4e7398a
fix merge
viclafargue Oct 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARGS=$*
# scripts, and that this script resides in the repo dir!
REPODIR=$(cd $(dirname $0); pwd)

VALIDARGS="clean libcuvs python rust docs tests bench-ann examples --uninstall -v -g -n --compile-static-lib --allgpuarch --no-nvtx --show_depr_warn --incl-cache-stats --time -h"
VALIDARGS="clean libcuvs python rust docs tests bench-ann examples --uninstall -v -g -n --compile-static-lib --allgpuarch --mg_algos_off --no-nvtx --show_depr_warn --incl-cache-stats --time -h"
viclafargue marked this conversation as resolved.
Show resolved Hide resolved
HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<tool>] [--limit-tests=<targets>] [--limit-bench-ann=<targets>] [--build-metrics=<filename>]
where <target> is:
clean - remove all existing build artifacts and configuration (start over)
Expand Down Expand Up @@ -65,6 +65,7 @@ CMAKE_LOG_LEVEL=""
VERBOSE_FLAG=""
BUILD_ALL_GPU_ARCH=0
BUILD_TESTS=ON
BUILD_MG_ALGOS=ON
BUILD_TYPE=Release
COMPILE_LIBRARY=OFF
INSTALL_TARGET=install
Expand Down Expand Up @@ -261,6 +262,10 @@ if hasArg --allgpuarch; then
BUILD_ALL_GPU_ARCH=1
fi

if hasArg --mg_algos_off; then
BUILD_MG_ALGOS=OFF
fi

if hasArg tests || (( ${NUMARGS} == 0 )); then
BUILD_TESTS=ON
CMAKE_TARGET="${CMAKE_TARGET};${TEST_TARGETS}"
Expand Down Expand Up @@ -353,6 +358,7 @@ if (( ${NUMARGS} == 0 )) || hasArg libcuvs || hasArg docs || hasArg tests || has
-DBUILD_C_TESTS=${BUILD_TESTS} \
-DBUILD_ANN_BENCH=${BUILD_ANN_BENCH} \
-DBUILD_CPU_ONLY=${BUILD_CPU_ONLY} \
-DBUILD_MG_ALGOS=${BUILD_MG_ALGOS} \
-DCMAKE_MESSAGE_LOG_LEVEL=${CMAKE_LOG_LEVEL} \
${CACHE_ARGS} \
${EXTRA_CMAKE_ARGS}
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
- libcusolver=11.4.1.48
- libcusparse-dev=11.7.5.86
- libcusparse=11.7.5.86
- libucxx==0.39.*,>=0.0.0a0
- make
- nccl>=2.9.9
- ninja
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ dependencies:
- libcusolver=11.4.1.48
- libcusparse-dev=11.7.5.86
- libcusparse=11.7.5.86
- libucxx==0.39.*,>=0.0.0a0
- make
- nccl>=2.9.9
- ninja
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-125_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libucxx==0.39.*,>=0.0.0a0
- make
- nccl>=2.9.9
- ninja
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- libcurand-dev
- libcusolver-dev
- libcusparse-dev
- libucxx==0.39.*,>=0.0.0a0
- make
- nccl>=2.9.9
- ninja
Expand Down
26 changes: 26 additions & 0 deletions cpp/CMakeLists.txt
viclafargue marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,22 @@ endif()
# ##################################################################################################
# * cuvs ---------------------------------------------------------------------

if(BUILD_MG_ALGOS)
viclafargue marked this conversation as resolved.
Show resolved Hide resolved
set(CUVS_MG_ALGOS
src/neighbors/ann_mg/ann_mg_flat_float_int64_t.cu
src/neighbors/ann_mg/ann_mg_flat_int8_t_int64_t.cu
src/neighbors/ann_mg/ann_mg_flat_uint8_t_int64_t.cu
src/neighbors/ann_mg/ann_mg_pq_float_int64_t.cu
src/neighbors/ann_mg/ann_mg_pq_int8_t_int64_t.cu
src/neighbors/ann_mg/ann_mg_pq_uint8_t_int64_t.cu
src/neighbors/ann_mg/ann_mg_cagra_float_uint32_t.cu
src/neighbors/ann_mg/ann_mg_cagra_int8_t_uint32_t.cu
src/neighbors/ann_mg/ann_mg_cagra_uint8_t_uint32_t.cu
src/neighbors/ann_mg/nccl_clique.cu
src/neighbors/ann_mg/omp_checks.cu
)
endif()

add_library(
cuvs SHARED
src/cluster/kmeans_balanced_fit_float.cu
Expand Down Expand Up @@ -459,8 +475,13 @@ add_library(
src/selection/select_k_float_int64_t.cu
src/selection/select_k_float_uint32_t.cu
src/selection/select_k_half_uint32_t.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>
Expand Down Expand Up @@ -490,11 +511,16 @@ if(NOT BUILD_CPU_ONLY)
${CUVS_CUSPARSE_DEPENDENCY} ${CUVS_CURAND_DEPENDENCY}
)

if(BUILD_MG_ALGOS)
set(CUVS_COMMS_DEPENDENCY ucp ucs ucxx 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_COMMS_DEPENDENCY}
viclafargue marked this conversation as resolved.
Show resolved Hide resolved
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion cpp/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -2149,7 +2149,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED =
PREDEFINED = "CUVS_BUILD_MG_ALGOS=1"

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
Loading
Loading