Skip to content

Commit

Permalink
[REVIEW] Updates for RMM being header only (rapidsai#69)
Browse files Browse the repository at this point in the history
* FIX Updates for RMM being header only

* DOC Added entry to changelog
  • Loading branch information
dantegd authored Sep 24, 2020
1 parent 53c1e2d commit 3f8a4bf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- PR #64: Remove `cublas_try` from `cusolver_wrappers.h`
- PR #66: Fixing typo `get_stream` to `getStream` in `handle.pyx`
- PR #68: Change the type of recvcounts & displs in allgatherv from size_t[] to size_t* and int[] to size_t*, respectively.
- PR #69: Updates for RMM being header only

# RAFT 0.15.0 (Date TBD)

Expand Down
25 changes: 10 additions & 15 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,14 @@ include(cmake/comms.cmake)
###################################################################################################
# - RMM -------------------------------------------------------------------------------------------

find_path(RMM_INCLUDE "rmm"
HINTS "$ENV{RMM_ROOT}/include")
find_path(RMM_INCLUDE_DIRS "rmm"
HINTS
"$ENV{RMM_ROOT}/include"
"$ENV{CONDA_PREFIX}/include/rmm"
"$ENV{CONDA_PREFIX}/include")

find_library(RMM_LIBRARY "rmm"
HINTS "$ENV{RMM_ROOT}/lib" "$ENV{RMM_ROOT}/build")
message(STATUS "RMM: RMM_INCLUDE_DIRS set to ${RMM_INCLUDE_DIRS}")

message(STATUS "RMM: RMM_LIBRARY set to ${RMM_LIBRARY}")
message(STATUS "RMM: RMM_INCLUDE set to ${RMM_INCLUDE}")

add_library(rmm SHARED IMPORTED ${RMM_LIBRARY})
if(RMM_INCLUDE AND RMM_LIBRARY)
set_target_properties(rmm PROPERTIES IMPORTED_LOCATION ${RMM_LIBRARY})
endif(RMM_INCLUDE AND RMM_LIBRARY)

##############################################################################
# - include paths ------------------------------------------------------------
Expand All @@ -194,7 +189,7 @@ set(RAFT_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE STRING
set(RAFT_INCLUDE_DIRECTORIES
${RAFT_INCLUDE_DIR}
${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
"${RMM_INCLUDE}")
${RMM_INCLUDE_DIRS})

if(DEFINED ENV{CONDA_PREFIX})
message(STATUS "Using RMM installation from $ENV{CONDA_PREFIX}")
Expand All @@ -209,10 +204,10 @@ set(RAFT_LINK_LIBRARIES
${CUDA_cusolver_LIBRARY}
${CUDA_CUDART_LIBRARY}
${CUDA_cusparse_LIBRARY}
${CUDA_curand_LIBRARY}
rmm)
${CUDA_curand_LIBRARY})

set(RAFT_LINK_DIRECTORIES "${RMM_LIBRARY}")
set(RAFT_LINK_DIRECTORIES
${RMM_INCLUDE_DIRS})

if(DEFINED ENV{CONDA_PREFIX})
list(APPEND RAFT_LINK_DIRECTORIES $ENV{CONDA_PREFIX}/lib)
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
# - Cython extensions build and parameters -----------------------------------


libs = ["nccl", "rmm", "cusolver", "cusparse", "cublas"]
libs = ["nccl", "cusolver", "cusparse", "cublas"]

include_dirs = [cuda_include_dir,
numpy.get_include(),
Expand Down

0 comments on commit 3f8a4bf

Please sign in to comment.