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

remove faiss from cuml #5293

Merged
merged 22 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4f66867
Tests seem to pass w/ the new compiled bits
cjnolet Mar 14, 2023
957bd1c
Merge branch 'branch-23.04' into imp-2306-using_raft_compiled_target
cjnolet Mar 20, 2023
083f667
Reverting changes to dependencies.yaml
cjnolet Mar 20, 2023
0abad43
Update cpp/CMakeLists.txt
cjnolet Mar 20, 2023
ef2d8ee
Fixing bad merge
cjnolet Mar 20, 2023
16d39fe
Temporarily using artifacts from commit
cjnolet Mar 21, 2023
241171b
Using correct path
cjnolet Mar 21, 2023
30e531f
Something got reverted. Fixing
cjnolet Mar 21, 2023
3ee94da
Adding cuml_use_faiss_static option back in
cjnolet Mar 21, 2023
2db2603
Adding CUML_USE_RAFT_NN back
cjnolet Mar 21, 2023
3578b83
Turning USE_RAFT_NN on in the proper place
cjnolet Mar 21, 2023
e567150
Fixing get_raft
cjnolet Mar 21, 2023
6ad3f12
remove faiss from cuml
benfred Mar 22, 2023
4c3ce76
fix get_raft
benfred Mar 22, 2023
f850e93
Merge branch 'branch-23.04' into remove_faiss
benfred Mar 23, 2023
b7c5f2f
Use device inline epilogue
benfred Mar 24, 2023
bed5213
Merge branch 'branch-23.04' into remove_faiss
cjnolet Mar 25, 2023
71185fb
Add note about exposing more metrics to hdbscan
benfred Mar 27, 2023
8b39d92
Merge branch 'remove_faiss' of github.com:benfred/cuml into remove_faiss
benfred Mar 27, 2023
6002077
Merge branch 'branch-23.04' into remove_faiss
benfred Mar 27, 2023
f3a1543
remove 'k' param from brute_force::knn code
benfred Mar 28, 2023
3557be1
Merge branch 'remove_faiss' of github.com:benfred/cuml into remove_faiss
benfred Mar 28, 2023
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: 1 addition & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (c) 2019-2022, NVIDIA CORPORATION.
# Copyright (c) 2019-2023, NVIDIA CORPORATION.

# cuml build script

Expand Down Expand Up @@ -47,7 +47,6 @@ HELP="$0 [<target> ...] [<flag> ...]
and profiling enabled (WARNING: Impacts performance)
--ccache - Use ccache to cache previous compilations
--nocloneraft - CMake will clone RAFT even if it is in the environment, use this flag to disable that behavior
--static-faiss - Force CMake to use the FAISS static libs, cloning and building them if necessary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!!!

--static-treelite - Force CMake to use the Treelite static libs, cloning and building them if necessary

default action (no args) is to build and install 'libcuml', 'cuml', and 'prims' targets only for the detected GPU arch
Expand Down Expand Up @@ -78,7 +77,6 @@ BUILD_DISABLE_DEPRECATION_WARNINGS=ON
BUILD_CUML_STD_COMMS=ON
BUILD_CUML_TESTS=ON
BUILD_CUML_MG_TESTS=OFF
BUILD_STATIC_FAISS=OFF
BUILD_STATIC_TREELITE=OFF
CMAKE_LOG_LEVEL=WARNING

Expand Down Expand Up @@ -199,9 +197,6 @@ while true; do
--nocloneraft )
DISABLE_FORCE_CLONE_RAFT=ON
;;
--static-faiss )
BUILD_STATIC_FAISS=ON
;;
--static-treelite )
BUILD_STATIC_TREELITE=ON
;;
Expand Down Expand Up @@ -256,7 +251,6 @@ if completeBuild || hasArg libcuml || hasArg prims || hasArg bench || hasArg pri
-DBUILD_CUML_TESTS=${BUILD_CUML_TESTS} \
-DBUILD_CUML_MPI_COMMS=${BUILD_CUML_MG_TESTS} \
-DBUILD_CUML_MG_TESTS=${BUILD_CUML_MG_TESTS} \
-DCUML_USE_FAISS_STATIC=${BUILD_STATIC_FAISS} \
-DCUML_USE_TREELITE_STATIC=${BUILD_STATIC_TREELITE} \
-DNVTX=${NVTX} \
-DUSE_CCACHE=${CCACHE} \
Expand Down
2 changes: 1 addition & 1 deletion ci/build_cpp.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion ci/build_python.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.

set -euo pipefail

Expand Down
1 change: 0 additions & 1 deletion ci/checks/copyright.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
]
FILES_TO_EXCLUDE = [
re.compile(r"cpp/src/tsne/cannylab/bh\.cu"),
re.compile(r"cpp/src/hdbscan/detail/faiss_mr\.hpp"),
]

# this will break starting at year 10000, which is probably OK :)
Expand Down
2 changes: 1 addition & 1 deletion ci/test_python_common.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2023, NVIDIA CORPORATION.

set -euo pipefail

Expand Down
9 changes: 0 additions & 9 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,16 @@ option(NVTX "Enable nvtx markers" OFF)
option(SINGLEGPU "Disable all mnmg components and comms libraries" OFF)
option(USE_CCACHE "Cache build artifacts with ccache" OFF)
option(CUDA_STATIC_RUNTIME "Statically link the CUDA toolkit runtime and libraries" OFF)
option(CUML_USE_FAISS_STATIC "Build and statically link the FAISS library for nearest neighbors search on GPU" OFF)
option(CUML_USE_RAFT_STATIC "Build and statically link the RAFT libraries" OFF)
option(CUML_RAFT_COMPILED "Use libraft shared library" ON)
option(CUML_USE_TREELITE_STATIC "Build and statically link the treelite library" OFF)
option(CUML_EXPORT_TREELITE_LINKAGE "Whether to publicly or privately link treelite to libcuml++" OFF)
option(CUML_USE_CUMLPRIMS_MG_STATIC "Build and statically link the cumlprims_mg library" OFF)
option(CUML_ENABLE_NN_DEPENDENCIES "Whether to enable FAISS dependency" ON)

# The options below allow incorporating libcuml into another build process
# without installing all its components. This is useful if total file size is
# at a premium and we do not expect other consumers to use any APIs of the
# dependency except those that are directly linked to by the dependent library.
option(CUML_EXCLUDE_FAISS_FROM_ALL "Exclude FAISS targets from RAFT's 'all' target" ON)
option(CUML_EXCLUDE_RAFT_FROM_ALL "Exclude RAFT targets from cuML's 'all' target" OFF)
option(CUML_EXCLUDE_TREELITE_FROM_ALL "Exclude Treelite targets from cuML's 'all' target" OFF)
option(CUML_EXCLUDE_CUMLPRIMS_MG_FROM_ALL "Exclude cumlprims_mg targets from cuML's 'all' target" OFF)
Expand All @@ -100,7 +97,6 @@ message(VERBOSE "CUML_CPP: Disabling all mnmg components and comms libraries: ${
message(VERBOSE "CUML_CPP: Cache build artifacts with ccache: ${USE_CCACHE}")
message(VERBOSE "CUML_CPP: Statically link the CUDA toolkit runtime and libraries: ${CUDA_STATIC_RUNTIME}")
message(VERBOSE "CUML_CPP: Build and statically link RAFT libraries: ${CUML_USE_RAFT_STATIC}")
message(VERBOSE "CUML_CPP: Build and statically link FAISS library: ${CUML_USE_FAISS_STATIC}")
message(VERBOSE "CUML_CPP: Build and statically link Treelite library: ${CUML_USE_TREELITE_STATIC}")

set(CUML_ALGORITHMS "ALL" CACHE STRING "Experimental: Choose which algorithms are built into libcuml++.so. Can specify individual algorithms or groups in a semicolon-separated list.")
Expand Down Expand Up @@ -226,10 +222,6 @@ endif()

include(cmake/thirdparty/get_raft.cmake)

if(CUML_USE_RAFT_NN)
include(cmake/thirdparty/get_faiss.cmake)
endif()

if(LINK_TREELITE)
include(cmake/thirdparty/get_treelite.cmake)
endif()
Expand Down Expand Up @@ -610,7 +602,6 @@ if(BUILD_CUML_CPP_LIBRARY)
# These are always private:
list(APPEND _cuml_cpp_private_libs
raft::raft
$<$<BOOL:${CUML_USE_RAFT_NN}>:faiss>
$<TARGET_NAME_IF_EXISTS:GPUTreeShap::GPUTreeShap>
$<$<BOOL:${LINK_CUFFT}>:CUDA::cufft${_ctk_static_suffix}>
${TREELITE_LIBS}
Expand Down
89 changes: 0 additions & 89 deletions cpp/cmake/thirdparty/get_faiss.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions cpp/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ endfunction()
# To use a different RAFT locally, set the CMake variable
# CPM_raft_SOURCE=/path/to/local/raft
find_and_configure_raft(VERSION ${CUML_MIN_VERSION_raft}
FORK rapidsai
PINNED_TAG branch-${CUML_BRANCH_VERSION_raft}
FORK benfred
PINNED_TAG post_distance_op
EXCLUDE_FROM_ALL ${CUML_EXCLUDE_RAFT_FROM_ALL}
# When PINNED_TAG above doesn't match cuml,
# force local raft clone in build directory
Expand Down
Loading