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

Updates for recent RAFT API changes #2065

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions cpp/src/community/legacy/spectral_clustering.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,6 +30,7 @@
#include <cugraph/legacy/graph.hpp>
#include <cugraph/utilities/error.hpp>

#include <raft/spectral/eigen_solvers.hpp>
#include <raft/spectral/modularity_maximization.hpp>
#include <raft/spectral/partition.hpp>

Expand Down Expand Up @@ -94,13 +95,13 @@ void balancedCutClustering_impl(legacy::GraphCSRView<vertex_t, edge_t, weight_t>

raft::matrix::sparse_matrix_t<index_type, value_type> const r_csr_m{handle, graph};

raft::eigen_solver_config_t<index_type, value_type> eig_cfg{
raft::spectral::eigen_solver_config_t<index_type, value_type> eig_cfg{
n_eig_vects, evs_max_it, restartIter_lanczos, evs_tol, reorthog, seed};
raft::lanczos_solver_t<index_type, value_type> eig_solver{eig_cfg};
raft::spectral::lanczos_solver_t<index_type, value_type> eig_solver{eig_cfg};

raft::cluster_solver_config_t<index_type, value_type> clust_cfg{
raft::spectral::cluster_solver_config_t<index_type, value_type> clust_cfg{
n_clusters, kmean_max_it, kmean_tol, seed};
raft::kmeans_solver_t<index_type, value_type> cluster_solver{clust_cfg};
raft::spectral::kmeans_solver_t<index_type, value_type> cluster_solver{clust_cfg};

raft::spectral::partition(
handle, r_csr_m, eig_solver, cluster_solver, clustering, eig_vals, eig_vects);
Expand Down Expand Up @@ -162,13 +163,13 @@ void spectralModularityMaximization_impl(

raft::matrix::sparse_matrix_t<index_type, value_type> const r_csr_m{handle, graph};

raft::eigen_solver_config_t<index_type, value_type> eig_cfg{
raft::spectral::eigen_solver_config_t<index_type, value_type> eig_cfg{
n_eig_vects, evs_max_it, restartIter_lanczos, evs_tol, reorthog, seed};
raft::lanczos_solver_t<index_type, value_type> eig_solver{eig_cfg};
raft::spectral::lanczos_solver_t<index_type, value_type> eig_solver{eig_cfg};

raft::cluster_solver_config_t<index_type, value_type> clust_cfg{
raft::spectral::cluster_solver_config_t<index_type, value_type> clust_cfg{
n_clusters, kmean_max_it, kmean_tol, seed};
raft::kmeans_solver_t<index_type, value_type> cluster_solver{clust_cfg};
raft::spectral::kmeans_solver_t<index_type, value_type> cluster_solver{clust_cfg};

// not returned...
// auto result =
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/linear_assignment/hungarian.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
#include <cugraph/legacy/graph.hpp>
#include <cugraph/utilities/error.hpp>

#include <raft/lap/lap.cuh>
#include <raft/lap/lap.hpp>

#include <rmm/cuda_stream_view.hpp>
#include <rmm/device_uvector.hpp>
Expand Down
4 changes: 3 additions & 1 deletion cpp/src/utilities/spmv_1D.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
* limitations under the License.
*/
#include "spmv_1D.cuh"
#include <raft/spectral/matrix_wrappers.hpp>

// TODO: Need to fix this once we establish shared formats in RAFT
#include <raft/spectral/detail/matrix_wrappers.cuh>

namespace cugraph {
namespace mg {
Expand Down