Skip to content

Commit

Permalink
Add the raft logger in more places where it's missing
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasr committed Dec 17, 2024
1 parent cc37a47 commit a7ff85e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
11 changes: 6 additions & 5 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,14 @@ if(BUILD_SHARED_LIBS)
"$<$<COMPILE_LANGUAGE:CUDA>:${CUVS_CUDA_FLAGS}>"
)
target_link_libraries(
cuvs_objs PUBLIC raft::raft rmm::rmm rmm::rmm_logger ${CUVS_CTK_MATH_DEPENDENCIES}
$<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX>
PRIVATE rmm::rmm_logger_impl
cuvs_objs
PUBLIC raft::raft rmm::rmm rmm::rmm_logger ${CUVS_CTK_MATH_DEPENDENCIES}
$<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX>
PRIVATE rmm::rmm_logger_impl raft::raft_logger_impl
)

add_library(cuvs SHARED $<FILTER:$<TARGET_OBJECTS:cuvs_objs>,EXCLUDE,rmm.*logger>)
add_library(cuvs_static STATIC $<FILTER:$<TARGET_OBJECTS:cuvs_objs>,EXCLUDE,rmm.*logger>)
add_library(cuvs_static STATIC $<FILTER:$<TARGET_OBJECTS:cuvs_objs>,EXCLUDE,rmm.*logger>)

target_compile_options(
cuvs INTERFACE $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>:--expt-extended-lambda
Expand Down Expand Up @@ -704,7 +705,7 @@ target_compile_definitions(cuvs::cuvs INTERFACE $<$<BOOL:${CUVS_NVTX}>:NVTX_ENAB
target_link_libraries(
cuvs_c
PUBLIC cuvs::cuvs ${CUVS_CTK_MATH_DEPENDENCIES}
PRIVATE raft::raft rmm::rmm_logger_impl
PRIVATE raft::raft rmm::rmm_logger_impl raft::raft_logger_impl
)

# ensure CUDA symbols aren't relocated to the middle of the debug build binaries
Expand Down
13 changes: 10 additions & 3 deletions cpp/bench/ann/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ endfunction()

if(CUVS_FAISS_ENABLE_GPU)
add_library(cuvs_bench_rmm_logger OBJECT)
target_link_libraries(cuvs_bench_rmm_logger PRIVATE rmm::rmm_logger_impl)
target_link_libraries(cuvs_bench_rmm_logger PRIVATE rmm::rmm_logger_impl raft::raft_logger_impl)
endif()

# ##################################################################################################
Expand Down Expand Up @@ -303,8 +303,15 @@ if(CUVS_ANN_BENCH_SINGLE_EXE)

target_link_libraries(
ANN_BENCH
PRIVATE raft::raft nlohmann_json::nlohmann_json benchmark::benchmark dl fmt::fmt-header-only
spdlog::spdlog_header_only $<$<TARGET_EXISTS:CUDA::nvtx3>:CUDA::nvtx3> rmm::rmm_logger_impl
PRIVATE raft::raft
nlohmann_json::nlohmann_json
benchmark::benchmark
dl
fmt::fmt-header-only
spdlog::spdlog_header_only
$<$<TARGET_EXISTS:CUDA::nvtx3>:CUDA::nvtx3>
rmm::rmm_logger_impl
raft::raft_logger_impl
)
set_target_properties(
ANN_BENCH
Expand Down
4 changes: 2 additions & 2 deletions cpp/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function(ConfigureTest)
endfunction()

add_library(test_rmm_logger OBJECT)
target_link_libraries(test_rmm_logger PRIVATE rmm::rmm_logger_impl)
target_link_libraries(test_rmm_logger PRIVATE rmm::rmm_logger_impl raft::raft_logger_impl)

# ##################################################################################################
# test sources ##################################################################################
Expand Down Expand Up @@ -236,7 +236,7 @@ if(BUILD_TESTS)
NAME SPARSE_TEST PATH sparse/cluster/cluster_solvers.cu sparse/cluster/eigen_solvers.cu
sparse/cluster/spectral.cu GPUS 1 PERCENT 100
)

ConfigureTest(
NAME PREPROCESSING_TEST PATH preprocessing/scalar_quantization.cu GPUS 1 PERCENT 100
)
Expand Down

0 comments on commit a7ff85e

Please sign in to comment.