Skip to content

Commit

Permalink
Fix minor errors in CMake configuration (rapidsai#662)
Browse files Browse the repository at this point in the history
This PR fixes a number of small errors that slipped through in rapidsai#644 and rapidsai#633. None of them materially affect the build (whether a preexisting libraft exists or not) since 1) benchmarks are currently turned off by default anyway in the C++ build, and 2) pyraft only depends on libraft for headers, not for compiled libraries.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#662
  • Loading branch information
vyasr authored May 20, 2022
1 parent 8fcf763 commit 6e8e41d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion python/pylibraft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ if(NOT raft_FOUND)
include("${CMAKE_PROJECT_pylibraft_INCLUDE}")

set(BUILD_TESTS OFF)
set(BUILD_BENCHMARKS OFF)
set(BUILD_BENCH OFF)
set(RAFT_COMPILE_LIBRARIES OFF)
set(RAFT_COMPILE_DIST_LIBRARY ON)
add_subdirectory(../../cpp raft-cpp)

Expand Down
12 changes: 7 additions & 5 deletions python/raft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ if(NOT raft_FOUND)
# pull in the required languages for the C++ project even if this project
# does not require those languges.
include(rapids-cuda)
rapids_cuda_init_architectures(pylibraft)
rapids_cuda_init_architectures(pyraft)
enable_language(CUDA)
# Since pylibraft only enables CUDA optionally we need to manually include the file that
# Since pyraft only enables CUDA optionally we need to manually include the file that
# rapids_cuda_init_architectures relies on `project` including.
include("${CMAKE_PROJECT_pylibraft_INCLUDE}")
include("${CMAKE_PROJECT_pyraft_INCLUDE}")

# pyraft doesn't actually use raft libraries, it just needs the headers, so
# we can turn off all library compilation and we don't need to install
# anything here.
set(BUILD_TESTS OFF)
set(BUILD_BENCHMARKS OFF)
set(BUILD_BENCH OFF)
set(RAFT_COMPILE_LIBRARIES OFF)
set(RAFT_COMPILE_DIST_LIBRARY OFF)
set(RAFT_COMPILE_NN_LIBRARY OFF)
Expand All @@ -62,7 +65,6 @@ endif()
include(rapids-cython)
rapids_cython_init()

# TODO: Figure out which of ucx, nccl, cusolver, cusparse, and cublas I need to add as include directories or linked libraries for which components
add_subdirectory(raft/common)
add_subdirectory(raft/dask/common)
add_subdirectory(raft/include_test)

0 comments on commit 6e8e41d

Please sign in to comment.