Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
42cb4da
define the SCC API (same as WCC)
seunghwak Feb 19, 2026
73f7676
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_scc
seunghwak Feb 24, 2026
a4860ee
initial draft incomplete implementation of SCC
seunghwak Feb 25, 2026
06019fc
add a factory function to create an initialized edge_property_t/edge_…
seunghwak Feb 25, 2026
b1a5097
code cleanup using the new API
seunghwak Feb 25, 2026
59642be
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_e…
seunghwak Feb 25, 2026
70c52e7
fix build errors
seunghwak Feb 25, 2026
ea88d72
Merge branch 'upstream_pr5441' into fea_scc
seunghwak Feb 25, 2026
dbb78fa
code cleanup
seunghwak Feb 25, 2026
c4a7d3e
fix build error
seunghwak Feb 25, 2026
1cde688
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_scc
seunghwak Feb 26, 2026
aad66de
cosmetic updates
seunghwak Feb 26, 2026
2e459d8
add SG SCC tests
seunghwak Feb 26, 2026
c0cd185
update reachable_sets
seunghwak Mar 3, 2026
901ad43
add MG tests
seunghwak Mar 3, 2026
dcc8aac
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_scc
seunghwak Mar 3, 2026
0593553
MG SCC tests to CMakeLists.txt
seunghwak Mar 4, 2026
220aee5
bug fix
seunghwak Mar 4, 2026
08b6165
cosmetic updates
seunghwak Mar 5, 2026
a2117e3
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_scc
seunghwak Mar 5, 2026
972db1f
fix build error
seunghwak Mar 6, 2026
a61de33
bug fixes
seunghwak Mar 9, 2026
13fd969
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_scc
seunghwak Mar 10, 2026
bd0fc93
resolve merge conflicts
seunghwak Mar 11, 2026
51f7045
cosmetic updates
seunghwak Mar 12, 2026
62dcf79
temporarily disable SCC tests (this will be re-enabled in PR 5448, SC…
seunghwak Mar 12, 2026
392dec9
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_scc
seunghwak Mar 12, 2026
94c48ce
copyright year
seunghwak Mar 12, 2026
d1416ae
copyright year
seunghwak Mar 12, 2026
a5567c7
build error fix
seunghwak Mar 12, 2026
5cb586a
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_scc
seunghwak Mar 12, 2026
5e18f69
Merge branch 'main' of https://github.com/rapidsai/cugraph into fea_scc
seunghwak Mar 13, 2026
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
4 changes: 4 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ set(CUGRAPH_SG_SOURCES
src/tree/legacy/mst.cu
src/components/weakly_connected_components_sg_v64_e64.cu
src/components/weakly_connected_components_sg_v32_e32.cu
src/components/strongly_connected_components_sg_v64_e64.cu
src/components/strongly_connected_components_sg_v32_e32.cu
src/components/mis_sg_v64_e64.cu
src/components/mis_sg_v32_e32.cu
src/components/vertex_coloring_sg_v64_e64.cu
Expand Down Expand Up @@ -426,6 +428,8 @@ set(CUGRAPH_MG_SOURCES
src/centrality/betweenness_centrality_mg_v32_e32.cu
src/components/weakly_connected_components_mg_v64_e64.cu
src/components/weakly_connected_components_mg_v32_e32.cu
src/components/strongly_connected_components_mg_v64_e64.cu
src/components/strongly_connected_components_mg_v32_e32.cu
src/components/mis_mg_v64_e64.cu
src/components/mis_mg_v32_e32.cu
src/components/vertex_coloring_mg_v64_e64.cu
Expand Down
25 changes: 24 additions & 1 deletion cpp/include/cugraph/algorithms.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
Expand Down Expand Up @@ -1743,6 +1743,29 @@ void weakly_connected_components(raft::handle_t const& handle,
vertex_t* components,
bool do_expensive_check = false);

/**
.* @ingroup components_cpp
* @brief Finds (strongly-connected-)component IDs of each vertices in the input graph.
*
* Component IDs can be arbitrary integers (they can be non-consecutive and are not ordered by
* component size or any other criterion).
*
* @tparam vertex_t Type of vertex identifiers. Needs to be an integral type.
* @tparam edge_t Type of edge identifiers. Needs to be an integral type.
* @tparam multi_gpu Flag indicating whether template instantiation should target single-GPU (false)
* or multi-GPU (true).
* @param handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and
* handles to various CUDA libraries) to run graph algorithms.
* @param graph_view Graph view object.
* @param do_expensive_check A flag to run expensive checks for input arguments (if set to `true`).
* @return Device vector of stronlgy connected component IDs
*/
template <typename vertex_t, typename edge_t, bool multi_gpu>
rmm::device_uvector<vertex_t> strongly_connected_components(
raft::handle_t const& handle,
graph_view_t<vertex_t, edge_t, false, multi_gpu> const& graph_view,
bool do_expensive_check = false);

/**
.* @ingroup core_cpp
* @brief Identify whether the core number computation should be based off incoming edges,
Expand Down
15 changes: 14 additions & 1 deletion cpp/include/cugraph/utilities/device_functors.cuh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once

#include <cugraph/utilities/packed_bool_utils.hpp>

#include <thrust/binary_search.h>
#include <thrust/iterator/iterator_traits.h>

#include <cstddef>
Expand Down Expand Up @@ -170,6 +171,18 @@ struct divider_t {
__device__ T operator()(T input) const { return input / divisor; }
};

template <typename T>
struct segment_id_t {
raft::device_span<T const> segment_lasts{};

__device__ T operator()(T i) const
{
return static_cast<T>(cuda::std::distance(
segment_lasts.begin(),
thrust::upper_bound(thrust::seq, segment_lasts.begin(), segment_lasts.end(), i)));
}
};

} // namespace detail

} // namespace cugraph
Loading
Loading