-
Notifications
You must be signed in to change notification settings - Fork 197
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
[FEA] Use CAGRA in C++ template #1730
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good- just one question about dependencies.
cpp/template/CMakeLists.txt
Outdated
@@ -28,11 +28,13 @@ rapids_cuda_init_architectures(test_raft) | |||
|
|||
project(test_raft LANGUAGES CXX CUDA) | |||
|
|||
find_package(OpenMP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we adding openmp to the dependencies here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CAGRA is using openmp and the link from raft::compiled
to openmp is not automatic.
I've found that openmp needs to be found in the dependencies of the consumer`s project for the link to happend:
Lines 445 to 451 in b7d2a9a
target_link_libraries( | |
raft_lib | |
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> | |
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robertmaynard do you have any ideas of why this might be happening? Are we missing something in the raft_lib
side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no exporting of the need for OpenMP to consuming projects. https://github.com/rapidsai/raft/blob/branch-23.10/cpp/CMakeLists.txt#L130 would need to change to rapids_find_package
with the proper export sets to remove the need for consumers to explicitly find OpenMP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/merge |
Proposal to change the C++ template from a distance computation to a vector search application using CAGRA.