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

suppress expansion of unused raft spectral templates #2739

Merged
merged 12 commits into from
Sep 27, 2022
Merged
1 change: 1 addition & 0 deletions conda/environments/cugraph_dev_cuda11.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- rmm=22.10.*
- librmm=22.10.*
- libraft-headers=22.10.*
- libraft-distance=22.10.*
- raft-dask=22.10.*
- pylibraft=22.10.*
- cuda-python>=11.5,<11.7.1
Expand Down
1 change: 1 addition & 0 deletions conda/environments/cugraph_dev_cuda11.4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- rmm=22.10.*
- librmm=22.10.*
- libraft-headers=22.10.*
- libraft-distance=22.10.*
- raft-dask=22.10.*
- pylibraft=22.10.*
- cuda-python>=11.5,<11.7.1
Expand Down
1 change: 1 addition & 0 deletions conda/environments/cugraph_dev_cuda11.5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- rmm=22.10.*
- librmm=22.10.*
- libraft-headers=22.10.*
- libraft-distance=22.10.*
- raft-dask=22.10.*
- pylibraft=22.10.*
- cuda-python>=11.5,<11.7.1
Expand Down
2 changes: 2 additions & 0 deletions conda/recipes/cugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ requirements:
- scikit-build>=0.13.1
- libcugraph={{ version }}
- libraft-headers {{ minor_version }}
- libraft-distance {{ minor_version }}
- raft-dask {{ minor_version }}
- pylibraft {{ minor_version}}
- cudf={{ minor_version }}
Expand All @@ -50,6 +51,7 @@ requirements:
- pylibcugraph={{ version }}
- libcugraph={{ version }}
- libraft-headers {{ minor_version }}
- libraft-distance {{ minor_version }}
- raft-dask {{ minor_version }}
- pylibraft {{ minor_version }}
- cudf={{ minor_version }}
Expand Down
4 changes: 3 additions & 1 deletion conda/recipes/libcugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ requirements:
host:
- doxygen {{ doxygen_version }}
- cudatoolkit {{ cuda_version }}.*
- libcugraphops {{ minor_version }}.*
- libraft-headers {{ minor_version }}
- libraft-distance {{ minor_version }}
- libcugraphops {{ minor_version }}.*
- librmm {{ minor_version }}.*
- libcudf {{ minor_version }}.*
- boost-cpp {{ boost_cpp_version }}
Expand All @@ -63,6 +63,8 @@ outputs:
- cmake {{ cmake_version }}
run:
- cudatoolkit {{ cuda_spec }}
- libraft-headers {{ minor_version }}
- libraft-distance {{ minor_version }}
- librmm {{ minor_version }}
- nccl {{ nccl_version }}
- ucx-proc=*=gpu
Expand Down
1 change: 1 addition & 0 deletions conda/recipes/pylibcugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ requirements:
- scikit-build>=0.13.1
- libcugraph={{ version }}
- libraft-headers={{ minor_version }}
- libraft-distance {{ minor_version }}
- ucx-py {{ ucx_py_version }}
- ucx-proc=*=gpu
- cudatoolkit {{ cuda_version }}.*
Expand Down
3 changes: 3 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ if (USE_CUGRAPH_OPS)
PUBLIC
cugraph-ops::cugraph-ops++
raft::raft
raft::distance
PRIVATE
cuco::cuco
cugraph::cuHornet
Expand All @@ -313,6 +314,7 @@ else()
target_link_libraries(cugraph
PUBLIC
raft::raft
raft::distance
PRIVATE
cuco::cuco
cugraph::cuHornet
Expand Down Expand Up @@ -383,6 +385,7 @@ target_link_libraries(cugraph_c
CUDA::cusolver
CUDA::cusparse
raft::raft
raft::distance
PRIVATE
cuco::cuco
cugraph::cugraph
Expand Down
2 changes: 2 additions & 0 deletions cpp/cmake/thirdparty/get_raft.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ function(find_and_configure_raft)
GIT_REPOSITORY https://github.com/${PKG_FORK}/raft.git
GIT_TAG ${PKG_PINNED_TAG}
SOURCE_SUBDIR cpp
FIND_PACKAGE_ARGUMENTS "COMPONENTS distance"
OPTIONS
"RAFT_COMPILE_LIBRARIES OFF"
"RAFT_COMPILE_DIST_LIBRARY ON"
"BUILD_TESTS OFF"
"BUILD_BENCH OFF"
"RAFT_ENABLE_cuco_DEPENDENCY OFF"
Expand Down
1 change: 1 addition & 0 deletions cpp/src/community/legacy/spectral_clustering.cu
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <cugraph/legacy/graph.hpp>
#include <cugraph/utilities/error.hpp>

#include <raft/distance/specializations.cuh>
#include <raft/spectral/modularity_maximization.cuh>
#include <raft/spectral/partition.cuh>

Expand Down
21 changes: 21 additions & 0 deletions python/cugraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before de

# If the user requested it, we attempt to find CUGRAPH.
if(FIND_CUGRAPH_CPP)

include(rapids-cpm)
rapids_cpm_init()
include(rapids-cuda)
rapids_cuda_init_architectures(cugraph-python)
enable_language(CUDA)

set(CUGRAPH_VERSION_MAJOR "${cugraph-python_VERSION_MAJOR}")
set(CUGRAPH_VERSION_MINOR "${cugraph-python_VERSION_MINOR}")


# We need to call get_raft due to cuML asking for raft::nn and
# raft::distance targets
# see issue https://github.com/rapidsai/cuml/issues/4843
include(../../cpp/cmake/thirdparty/get_raft.cmake)
Comment on lines +50 to +53
Copy link
Contributor

Choose a reason for hiding this comment

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

@cjnolet good find. The underlying issue here will be fixed by rapidsai/rapids-cmake#154.


find_package(cugraph ${cugraph_version} REQUIRED)
else()
set(cugraph_FOUND OFF)
Expand All @@ -53,6 +69,11 @@ if(NOT cugraph_FOUND)

include("${CMAKE_PROJECT_cugraph-python_INCLUDE}")

set(CUGRAPH_VERSION_MAJOR "${cugraph-python_VERSION_MAJOR}")
set(CUGRAPH_VERSION_MINOR "${cugraph-python_VERSION_MINOR}")

include(../../cpp/cmake/thirdparty/get_raft.cmake)

add_subdirectory(../../cpp cugraph-cpp)

install(TARGETS cugraph DESTINATION cugraph/library)
Expand Down
20 changes: 20 additions & 0 deletions python/pylibcugraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ option(FIND_CUGRAPH_CPP "Search for existing CUGRAPH C++ installations before de

if(FIND_CUGRAPH_CPP)
message(STATUS "Trying to find the package")
include(rapids-cpm)
rapids_cpm_init()
include(rapids-cuda)
rapids_cuda_init_architectures(pylibcugraph-python)
enable_language(CUDA)

set(CUGRAPH_VERSION_MAJOR "${pylibcugraph-python_VERSION_MAJOR}")
set(CUGRAPH_VERSION_MINOR "${pylibcugraph-python_VERSION_MINOR}")


# We need to call get_raft due to cuML asking for raft::nn and
# raft::distance targets
# see issue https://github.com/rapidsai/cuml/issues/4843
include(../../cpp/cmake/thirdparty/get_raft.cmake)

find_package(cugraph ${cugraph_version} REQUIRED)
else()
set(cugraph_FOUND OFF)
Expand All @@ -57,6 +72,11 @@ if(NOT cugraph_FOUND)

include("${CMAKE_PROJECT_pylibcugraph-python_INCLUDE}")

set(CUGRAPH_VERSION_MAJOR "${pylibcugraph-python_VERSION_MAJOR}")
set(CUGRAPH_VERSION_MINOR "${pylibcugraph-python_VERSION_MINOR}")

include(../../cpp/cmake/thirdparty/get_raft.cmake)

add_subdirectory(../../cpp cugraph-cpp)

install(TARGETS cugraph DESTINATION pylibcugraph/library)
Expand Down