diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 9ed26db451..bd05d1340f 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -22,8 +22,7 @@ include(rapids-find) option(BUILD_CPU_ONLY "Build CPU only components. Applies to RAFT ANN benchmarks currently" OFF) -# workaround for rapids_cuda_init_architectures not working for arch detection with -# enable_language(CUDA) +# workaround for rapids_cuda_init_architectures not working for arch detection with enable_language(CUDA) set(lang_list "CXX") if(NOT BUILD_CPU_ONLY) @@ -287,8 +286,7 @@ endif() set_target_properties(raft_compiled PROPERTIES EXPORT_NAME compiled) if(RAFT_COMPILE_LIBRARY) - add_library( - raft_objs OBJECT + add_library(raft_objs OBJECT src/core/logger.cpp src/distance/detail/pairwise_matrix/dispatch_canberra_double_double_double_int.cu src/distance/detail/pairwise_matrix/dispatch_canberra_float_float_float_int.cu @@ -454,21 +452,18 @@ if(RAFT_COMPILE_LIBRARY) src/spatial/knn/detail/fused_l2_knn_int64_t_float.cu src/spatial/knn/detail/fused_l2_knn_uint32_t_float.cu src/util/memory_pool.cpp - ) + ) set_target_properties( raft_objs PROPERTIES CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON - POSITION_INDEPENDENT_CODE ON - ) + POSITION_INDEPENDENT_CODE ON) target_compile_definitions(raft_objs PRIVATE "RAFT_EXPLICIT_INSTANTIATE_ONLY") - target_compile_options( - raft_objs PRIVATE "$<$:${RAFT_CXX_FLAGS}>" - "$<$:${RAFT_CUDA_FLAGS}>" - ) + target_compile_options(raft_objs PRIVATE "$<$:${RAFT_CXX_FLAGS}>" + "$<$:${RAFT_CUDA_FLAGS}>") add_library(raft_lib SHARED $) add_library(raft_lib_static STATIC $) @@ -482,15 +477,13 @@ if(RAFT_COMPILE_LIBRARY) ) foreach(target raft_lib raft_lib_static raft_objs) - target_link_libraries( - ${target} - PUBLIC raft::raft - ${RAFT_CTK_MATH_DEPENDENCIES} # TODO: Once `raft::resources` is used everywhere, this - # will just be cublas - $ - ) + target_link_libraries(${target} PUBLIC + raft::raft + ${RAFT_CTK_MATH_DEPENDENCIES} # TODO: Once `raft::resources` is used everywhere, this + # will just be cublas + $) - # So consumers know when using libraft.so/libraft.a + #So consumers know when using libraft.so/libraft.a target_compile_definitions(${target} PUBLIC "RAFT_COMPILED") # ensure CUDA symbols aren't relocated to the middle of the debug build binaries target_link_options(${target} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/fatbin.ld") @@ -737,4 +730,4 @@ endif() if(BUILD_ANN_BENCH) include(bench/ann/CMakeLists.txt) -endif() +endif() \ No newline at end of file diff --git a/cpp/include/raft/neighbors/ivf_pq_codepacker.cuh b/cpp/include/raft/neighbors/ivf_pq_codepacker.cuh index 116ced0067..305a22ca30 100644 --- a/cpp/include/raft/neighbors/ivf_pq_codepacker.cuh +++ b/cpp/include/raft/neighbors/ivf_pq_codepacker.cuh @@ -20,7 +20,6 @@ #include #include #include -#include #include #include