Skip to content

Commit

Permalink
Always add faiss library alias if it's missing (#287)
Browse files Browse the repository at this point in the history
Always add the `FAISS::FAISS` library target alias if it doesn't exist. This can happen if cuML is built and installs FAISS before cuGraph or vice-versa.

Related PRs:
rapidsai/cuml#4028
rapidsai/cugraph#1694

Note: We can probably remove the `get_faiss.cmake` file in cuML and cuGraph since they both should get it from RAFT.

Authors:
  - Paul Taylor (https://github.com/trxcllnt)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #287
  • Loading branch information
trxcllnt authored Jul 9, 2021
1 parent 82061e0 commit 22a16dd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cpp/cmake/thirdparty/get_faiss.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ function(find_and_configure_faiss)

if(FAISS_ADDED)
set(FAISS_GPU_HEADERS ${FAISS_SOURCE_DIR} PARENT_SCOPE)
add_library(FAISS::FAISS ALIAS faiss)
endif()

if(TARGET faiss AND NOT TARGET FAISS::FAISS)
add_library(FAISS::FAISS ALIAS faiss)
endif()

endfunction()
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/raft/sparse/cusparse_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace detail {
inline const char* cusparse_error_to_string(cusparseStatus_t err) {
#if defined(CUDART_VERSION) && CUDART_VERSION >= 10100
return cusparseGetErrorString(err);
#else // CUDART_VERSION
#else // CUDART_VERSION
switch (err) {
_CUSPARSE_ERR_TO_STR(CUSPARSE_STATUS_SUCCESS);
_CUSPARSE_ERR_TO_STR(CUSPARSE_STATUS_NOT_INITIALIZED);
Expand Down
2 changes: 1 addition & 1 deletion cpp/scripts/run-clang-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import tempfile


EXPECTED_VERSION = "8.0.1"
EXPECTED_VERSION = "11.0.0"
VERSION_REGEX = re.compile(r"clang-format version ([0-9.]+)")
# NOTE: populate this list with more top-level dirs as we add more of them to
# to the cuml repo
Expand Down

0 comments on commit 22a16dd

Please sign in to comment.