Skip to content

Commit

Permalink
undo some diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
tarang-jain committed Sep 22, 2023
1 parent 4139c7e commit e846352
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
33 changes: 13 additions & 20 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 "$<$<COMPILE_LANGUAGE:CXX>:${RAFT_CXX_FLAGS}>"
"$<$<COMPILE_LANGUAGE:CUDA>:${RAFT_CUDA_FLAGS}>"
)
target_compile_options(raft_objs PRIVATE "$<$<COMPILE_LANGUAGE:CXX>:${RAFT_CXX_FLAGS}>"
"$<$<COMPILE_LANGUAGE:CUDA>:${RAFT_CUDA_FLAGS}>")

add_library(raft_lib SHARED $<TARGET_OBJECTS:raft_objs>)
add_library(raft_lib_static STATIC $<TARGET_OBJECTS:raft_objs>)
Expand All @@ -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_NAME_IF_EXISTS:OpenMP::OpenMP_CXX>
)
target_link_libraries(${target} PUBLIC
raft::raft
${RAFT_CTK_MATH_DEPENDENCIES} # TODO: Once `raft::resources` is used everywhere, this
# will just be cublas
$<TARGET_NAME_IF_EXISTS:OpenMP::OpenMP_CXX>)

# 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")
Expand Down Expand Up @@ -737,4 +730,4 @@ endif()

if(BUILD_ANN_BENCH)
include(bench/ann/CMakeLists.txt)
endif()
endif()
1 change: 0 additions & 1 deletion cpp/include/raft/neighbors/ivf_pq_codepacker.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <raft/core/device_mdspan.hpp>
#include <raft/core/resource/cuda_stream.hpp>
#include <raft/core/resources.hpp>
#include <raft/neighbors/detail/div_utils.hpp>
#include <raft/neighbors/detail/ivf_pq_codepacking.cuh>
#include <raft/neighbors/ivf_pq_types.hpp>

Expand Down

0 comments on commit e846352

Please sign in to comment.