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

[REVIEW] Spectral clustering functionality in RAFT. #12

Merged
merged 89 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
5efa9be
Spectral partition header.
aschaffer May 28, 2020
f405fee
Updated CHANGELOG.md.
aschaffer May 28, 2020
c5bf538
Adding the main functionality.
aschaffer Jun 2, 2020
cc4be83
Clean-up of matrix definitions and dummy error handling.
aschaffer Jun 3, 2020
f3e8862
Clean-up of some error checking.
aschaffer Jun 3, 2020
56ddbb5
Pulling GraphCSRView from cugraph.
aschaffer Jun 3, 2020
aa058ef
Matrix replacements for nvgraph Matrix types.
aschaffer Jun 4, 2020
61c669c
Refactoring of Lanczos algorithms (except AllocatableVector<T>). More…
aschaffer Jun 4, 2020
9d71cfc
LAPACK dependencies.
aschaffer Jun 4, 2020
22c9f49
Added allocation functionality via raft handle.
aschaffer Jun 5, 2020
0f3617b
Fixed allocator dependencies in Lanczos.
aschaffer Jun 5, 2020
ee3102b
Lapack dependencies.
aschaffer Jun 6, 2020
b0c12aa
Added missing cusparse API.
aschaffer Jun 9, 2020
001eec8
Added cusparsesetpointermode.
aschaffer Jun 9, 2020
48e9d09
Added setpointer mode to cusparse, cublas and clang-formatted.
aschaffer Jun 9, 2020
e311c3e
Added sscal to cublas wrappers.
aschaffer Jun 9, 2020
022948a
Updated cublas calls in Lanczos (partially).
aschaffer Jun 10, 2020
43d3f78
Updated cublas depends. in Lanczos.
aschaffer Jun 10, 2020
e0d6cf6
Kmeans updates.
aschaffer Jun 10, 2020
cca40ea
Update on kmeans and cleanup.
aschaffer Jun 10, 2020
1709155
Updating partition entry calls.
aschaffer Jun 11, 2020
aa7d8ec
Updates on partition and matrix wrappers.
aschaffer Jun 11, 2020
192000c
More partition clan-up. Added sm_utils.
aschaffer Jun 11, 2020
3361dc3
Update partition with eigen solver interface.
aschaffer Jun 11, 2020
0373a52
Format and some comments.
aschaffer Jun 11, 2020
308e893
Added generic cluster solvers. Partition clean-up.
aschaffer Jun 12, 2020
8fb1c04
Fixed tuple.
aschaffer Jun 12, 2020
25756ec
Modularity Maximization refactor. More cleanup in matrix wrappers and…
aschaffer Jun 12, 2020
531bf2b
More refactoring in partition/modularity analysis.
aschaffer Jun 13, 2020
4fa1c76
Removed MPI dependency (for now).
aschaffer Jun 15, 2020
10496de
Fixed sparse matrix cnstr.
aschaffer Jun 15, 2020
38e5ca9
Added test for spectral matrix functionality. Compilation checker for…
aschaffer Jun 15, 2020
86dc155
Heart-beat tests for spectral matrices.
aschaffer Jun 15, 2020
5545543
Fixed lapack dependencies on dense cusolver.
aschaffer Jun 15, 2020
ab4e8a6
Added largest eigenvector heart-beat test.
aschaffer Jun 15, 2020
058aae7
Heart-beat for kmeans.
aschaffer Jun 15, 2020
6103489
Adding higher level solvers to test: cluster solver interface.
aschaffer Jun 16, 2020
7be516e
Adding higher level solvers to test: eigen solver interface.
aschaffer Jun 16, 2020
9dee0b3
Adding higher level solvers to test: cluster solver interface (fixed).
aschaffer Jun 16, 2020
1d4c05d
Higher level API.
aschaffer Jun 16, 2020
4480dd3
Fixes in higher level API.
aschaffer Jun 16, 2020
282c4c9
Added / Fixed higher level modularity API and test.
aschaffer Jun 17, 2020
6211f8d
Addressed CUDA 11 API changes in cusparse (csrmv, csrmm).
aschaffer Jun 17, 2020
4097a72
Fixes in CUDA 11 cusparse interface.
aschaffer Jun 18, 2020
c4130c9
Added raft handle to sparse_matrix cnstr. necessary for mv() memf cal…
aschaffer Jun 18, 2020
87c4984
Sparse MV forking: pre-CUDA 11 step.
aschaffer Jun 18, 2020
2225214
Added CUDA 11 path for SpMV calls. Step 2.
aschaffer Jun 18, 2020
7415eda
Removed constness of some parameters in SpMV, because CUDA 11 require…
aschaffer Jun 18, 2020
6114c0f
Added some pre-conditions in mv().
aschaffer Jun 19, 2020
761cacd
Fixed curand dependencies.
aschaffer Jun 19, 2020
ca240be
More CUDA 11 debt.
aschaffer Jun 19, 2020
b40b702
Added correct version of L1 norm.
aschaffer Jun 19, 2020
2dad70d
Fixes for matrix wrappers and tests.
aschaffer Jun 20, 2020
3f5ec59
Fixed mv() for lapalacian matrix.
aschaffer Jun 20, 2020
ad36433
Fixed mv() for modularity matrix.
aschaffer Jun 20, 2020
8ea5582
Updated CHANGELOG.md.
aschaffer Jun 22, 2020
33c8e42
Merged latest branch-0.15.
aschaffer Jun 22, 2020
5474e99
Integrated raft error control from outer PR.
aschaffer Jun 22, 2020
4175819
Replaced buggy Thrust call with simplified logic.
aschaffer Jun 24, 2020
9fdf4d6
Removed useless graph.hpp dependency in spectral clustering.
aschaffer Jul 1, 2020
28e9d4a
Removed unnecessary graph.hpp.
aschaffer Jul 1, 2020
87f6315
Addressed code reviews on kmeans dox.
aschaffer Jul 6, 2020
98d7af6
Addressed code reviews on kmeans lowercase_t types.
aschaffer Jul 6, 2020
7c79256
Addressed code reviews on kmeans cudaMemcpyAsync().
aschaffer Jul 6, 2020
283fa0b
Addressed code reviews on kmeans use of dim3{} cnstr.
aschaffer Jul 6, 2020
4ff5068
Addressed code reviews on lowercase_t type names.
aschaffer Jul 6, 2020
ff5ad23
Addressed code reviews on replacing cudaDeviceSynchronize().
aschaffer Jul 6, 2020
8b30cda
Addressed comments on @brief in lanczos.
aschaffer Jul 7, 2020
8bf8589
Addressed comments on host memory pointers and constexpr one/zero.
aschaffer Jul 7, 2020
f30e636
Addressed comments on removing stale commented code.
aschaffer Jul 7, 2020
44ff8bf
Addressed comments on removing stale commented code.
aschaffer Jul 7, 2020
04e8790
Addressed comments on removing stale (fixed) FIXME comment.
aschaffer Jul 7, 2020
5de2234
Addressed comment on async copies.
aschaffer Jul 7, 2020
b21d5eb
Addressed comments on removing outdated TODOs.
aschaffer Jul 7, 2020
9df3f9a
Addressed comments on removing dead code.
aschaffer Jul 7, 2020
fb46b77
Addressed comments on using dim3{} cnstr.
aschaffer Jul 7, 2020
d359d1a
Addressed comments on using cleaning-up modularity header.
aschaffer Jul 7, 2020
798cc79
Addressed comments on cleaning-up spectral_util header.
aschaffer Jul 7, 2020
e5ef1a7
Addressed comments on cleaning-up cluster_solvers.cu.
aschaffer Jul 7, 2020
beaa499
Addressed comments on more clean-up in lanczos.
aschaffer Jul 7, 2020
52764ef
Addressed comments on dim3{} and type lowercase_t in spectral_util.
aschaffer Jul 7, 2020
e8fc0fb
Fixed duplicate in CHANGELOG.md.
aschaffer Jul 7, 2020
aeb2e56
Moved lanczos.hpp to linalg.
aschaffer Jul 9, 2020
1502821
Moved sm_utils.hpp to utils.
aschaffer Jul 9, 2020
2b5a6cd
Fixed CHECK_CUDA() calls.
aschaffer Jul 9, 2020
e287350
Fixed CHECK_CUDA() redux.
aschaffer Jul 9, 2020
13aa96e
Addressed comments on in-place initializers and thrust exe policy dox.
aschaffer Jul 13, 2020
d513d21
Addressed comment on replacing 65535 by named constant.
aschaffer Jul 13, 2020
e16b9c4
Fixed a file inclusion style (use brackets) that was rejected in CI (…
aschaffer Jul 14, 2020
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# RAFT 0.15.0 (Date TBD)

## New Features
- PR #12: Spectral clustering.
- PR #7: Migrating cuml comms -> raft comms_t
- PR #15: add exception based error handling macros

Expand Down
6 changes: 5 additions & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ set(RAFT_LINK_LIBRARIES
${CUDA_cusolver_LIBRARY}
${CUDA_CUDART_LIBRARY}
${CUDA_cusparse_LIBRARY}
${CUDA_curand_LIBRARY}
rmm)

set(RAFT_LINK_DIRECTORIES "${RMM_LIBRARY}")
Expand All @@ -224,7 +225,10 @@ if(BUILD_RAFT_TESTS)
test/handle.cpp
test/mr/device/buffer.cpp
test/mr/host/buffer.cpp
test/test.cpp)
test/test.cpp
test/spectral_matrix.cu
test/eigen_solvers.cu
test/cluster_solvers.cu)

target_include_directories(test_raft
PRIVATE
Expand Down
46 changes: 46 additions & 0 deletions cpp/include/raft/linalg/cublas_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,5 +578,51 @@ inline cublasStatus_t cublasdot(cublasHandle_t handle, int n, const double *x,
}
/** @} */

/**
* @defgroup setpointermode cublas set pointer mode method
* @{
*/
// no T dependency...
// template <typename T>
// cublasStatus_t cublassetpointermode( // NOLINT
// cublasHandle_t handle,
// cublasPointerMode_t mode,
// cudaStream_t stream);

// template<>
inline cublasStatus_t cublassetpointermode(cublasHandle_t handle,
cublasPointerMode_t mode,
cudaStream_t stream) {
CUBLAS_CHECK(cublasSetStream(handle, stream));
return cublasSetPointerMode(handle, mode);
}
/** @} */

/**
* @defgroup scal cublas dot calls
* @{
*/
template <typename T>
cublasStatus_t cublasscal(cublasHandle_t handle, int n, const T *alpha, T *x,
int incx, cudaStream_t stream);

template <>
inline cublasStatus_t cublasscal(cublasHandle_t handle, int n,
const float *alpha, float *x, int incx,
cudaStream_t stream) {
CUBLAS_CHECK(cublasSetStream(handle, stream));
return cublasSscal(handle, n, alpha, x, incx);
}

template <>
inline cublasStatus_t cublasscal(cublasHandle_t handle, int n,
const double *alpha, double *x, int incx,
cudaStream_t stream) {
CUBLAS_CHECK(cublasSetStream(handle, stream));
return cublasDscal(handle, n, alpha, x, incx);
}

/** @} */

} // namespace linalg
} // namespace raft
Loading