Skip to content
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

Making cuco, thrust, and mdspan optional dependencies. #585

Merged

Conversation

cjnolet
Copy link
Member

@cjnolet cjnolet commented Mar 23, 2022

In addition to the cuco dependency, the following changes are included:

  1. ability to turn off thrust and mdspan dependencies (rmm is still required)
  2. compiling libraries now defaults to the same setting of BUILD_TESTS (tests are still enabled)
  3. cuco dependency is disabled by default (unless distance component is enabled)
  4. the headers which are safe to expose in public APIs are moved over to core/ directory.

@robertmaynard
Copy link
Contributor

To build raft by default I had to disable the following tests since they pull in faiss headers, which isn't enabled by default.

  • test/sparse/add.cu
  • test/sparse/convert_coo.cu
  • test/sparse/convert_csr.cu
  • test/sparse/connect_components.cu
  • test/sparse/csr_row_slice.cu
  • test/sparse/csr_to_dense.cu
  • test/sparse/csr_transpose.cu
  • test/sparse/degree.cu
  • test/sparse/dist_coo_spmv.cu
  • test/sparse/distance.cu
  • test/sparse/filter.cu
  • test/sparse/knn.cu
  • test/sparse/knn_graph.cu
  • test/sparse/linkage.cu
  • test/sparse/norm.cu
  • test/sparse/reduce.cu
  • test/sparse/row_op.cu
  • test/sparse/sort.cu
  • test/spatial/knn.cu
  • test/spatial/fused_l2_knn.cu
  • test/spatial/haversine.cu
  • test/spatial/ball_cover.cu
  • test/spatial/epsilon_neighborhood.cu
  • test/spatial/faiss_mr.cu
  • test/spatial/selection.cu
  • test/stats/trustworthiness.cu

@cjnolet
Copy link
Member Author

cjnolet commented Mar 31, 2022

To build raft by default I had to disable the following tests since they pull in faiss headers, which isn't enabled by default.

@robertmaynard most of those files don't include faiss headers, but I do get your point that the tests shouldn't be getting built without FAISS if that's a requirement.

@robertmaynard
Copy link
Contributor

To build raft by default I had to disable the following tests since they pull in faiss headers, which isn't enabled by default.

@robertmaynard most of those files don't include faiss headers, but I do get your point that the tests shouldn't be getting built without FAISS if that's a requirement.

You are correct I over removed tests, I don't know how I captured too many. But here is the full breakdown of what includes faiss / cuco headers.

Requires FAISS directly:

  • test/spatial/fused_l2_knn.cu
  • test/spatial/faiss_mr.cu

Requires FAISS via knn/detail/knn_brute_force_faiss.cuh:

  • test/sparse/knn_graph.cu
  • test/sparse/linkage.cu
  • test/sparse/connect_components.cu
  • test/sparse/csr_transpose.cu
  • test/spatial/knn.cu
  • test/spatial/epsilon_neighborhood.cu
  • test/stats/selection.cu
  • test/stats/trustworthiness.cu

Requires FAISS via haversine_distance.cuh:

  • test/spatial/haversine.cu
  • test/spatial/ball_cover.cu

Requires cuco:

  • test/sparse/dist_coo_spmv.cu
  • test/sparse/distance.cu
  • test/sparse/knn.cu

@cjnolet
Copy link
Member Author

cjnolet commented Apr 1, 2022

rerun tests

cpp/CMakeLists.txt Outdated Show resolved Hide resolved
@cjnolet
Copy link
Member Author

cjnolet commented Apr 2, 2022

rerun tests

Copy link
Member

@divyegala divyegala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments. Should we also have a standard namespace convention for headers in raft/core? There's some variation amongst them at this moment

cpp/include/raft/common/logger.hpp Show resolved Hide resolved
cpp/include/raft/common/nvtx.hpp Show resolved Hide resolved
cpp/include/raft/core/nvtx.hpp Show resolved Hide resolved
docs/source/cuda_cpp.rst Outdated Show resolved Hide resolved
build.sh Show resolved Hide resolved
conda/recipes/libraft_headers/build.sh Outdated Show resolved Hide resolved
cpp/cmake/thirdparty/get_mdspan.cmake Outdated Show resolved Hide resolved
cpp/cmake/thirdparty/get_thrust.cmake Outdated Show resolved Hide resolved
@cjnolet
Copy link
Member Author

cjnolet commented Apr 19, 2022

rerun tests

@cjnolet
Copy link
Member Author

cjnolet commented Apr 19, 2022

@gpucibot merge

Copy link
Contributor

@msadang msadang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@rapids-bot rapids-bot bot merged commit d0601af into rapidsai:branch-22.06 Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake cpp improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants