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

Move edge triangle count to the stable API #4382

Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
be543b1
enable k-1 core
jnke2016 Apr 25, 2024
327a07e
perform edge triangle count in chunk
jnke2016 Apr 26, 2024
c623465
perform edge triangle count in chunks
jnke2016 Apr 30, 2024
7cbb61f
enable k-1 core optimization and unroll intersection edges in chunks
jnke2016 Apr 30, 2024
6dbe157
fix style
jnke2016 Apr 30, 2024
3e12f02
fix style
jnke2016 Apr 30, 2024
1f00dd6
add edge triangle count tests
jnke2016 May 4, 2024
da330b3
move edge triangle count to the stable API
jnke2016 May 4, 2024
913283d
fix style
jnke2016 May 4, 2024
d758071
update branch
jnke2016 May 4, 2024
ce3ff47
fix style
jnke2016 May 4, 2024
0ebb7f5
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
jnke2016 May 4, 2024
9d2d4f7
update function definition
jnke2016 May 5, 2024
2019d99
fix style
jnke2016 May 5, 2024
701e33d
update test
jnke2016 May 5, 2024
9a12994
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 5, 2024
0d74246
return edge_property_t
jnke2016 May 7, 2024
c103e52
fix style
jnke2016 May 7, 2024
686a214
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 7, 2024
50798d5
add edge mask tests
jnke2016 May 8, 2024
86fd201
fix style
jnke2016 May 8, 2024
9ca7f5e
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 8, 2024
aad7590
add mg implementation of edge triangle count
jnke2016 May 11, 2024
28149f7
add reference for mg edge triangle count
jnke2016 May 11, 2024
0e69382
add mg edge triangle count tests
jnke2016 May 12, 2024
f893d24
remove debug print and unused import
jnke2016 May 12, 2024
30f891a
add edge mask test
jnke2016 May 12, 2024
be7ed1a
update 'mg_graph_to_sg_graph' to support 'edge_ids'
jnke2016 May 12, 2024
e705eca
add fixme
jnke2016 May 12, 2024
2453a6f
add doxygen documentation
jnke2016 May 12, 2024
e69f862
explicitly provide template parameter types
jnke2016 May 12, 2024
2bb9cba
rename variable
jnke2016 May 12, 2024
6a02f03
remove unnecessary sort
jnke2016 May 12, 2024
17017ec
round with the raft util function
jnke2016 May 12, 2024
13501fe
update fixme
jnke2016 May 12, 2024
e5a0f2d
rename variable
jnke2016 May 12, 2024
ca30c84
fix style
jnke2016 May 12, 2024
ba48f90
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
jnke2016 May 12, 2024
50231b6
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 12, 2024
b5d069a
fix typo
jnke2016 May 12, 2024
5a03431
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 12, 2024
8ca19cd
fix improper cast
jnke2016 May 14, 2024
0ca2953
remove temporary variable
jnke2016 May 14, 2024
56118f3
remove weights test
jnke2016 May 14, 2024
3463723
add edge mask test for rmat benchmark
jnke2016 May 14, 2024
f047a41
update mg tests
jnke2016 May 14, 2024
52bc273
fix style
jnke2016 May 14, 2024
02e15e4
update branch
jnke2016 May 14, 2024
2030ed8
fix style
jnke2016 May 14, 2024
3385690
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 14, 2024
1c4ee11
update tests
jnke2016 May 14, 2024
5b1c248
fix style
jnke2016 May 14, 2024
b8e21c3
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 14, 2024
fefddc5
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
jnke2016 May 14, 2024
9e9a198
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 14, 2024
0ab7906
update fixme
jnke2016 May 16, 2024
6439274
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 16, 2024
a3e041e
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
jnke2016 May 16, 2024
d4217b2
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
jnke2016 May 21, 2024
1c175dc
fix typo and function call
jnke2016 May 22, 2024
095d561
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
rlratzel May 24, 2024
2408a95
Fixes style.
rlratzel May 24, 2024
03a2790
fix style
jnke2016 May 24, 2024
cf39539
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
jnke2016 May 24, 2024
a62ad7a
Merge remote-tracking branch 'upstream/branch-24.06_stable-edge_trian…
jnke2016 May 24, 2024
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 cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ set(CUGRAPH_SOURCES
src/community/detail/refine_sg.cu
src/community/detail/refine_mg.cu
src/community/edge_triangle_count_sg.cu
src/community/edge_triangle_count_mg.cu
src/community/detail/maximal_independent_moves_sg.cu
src/community/detail/maximal_independent_moves_mg.cu
src/detail/utility_wrappers.cu
Expand Down
18 changes: 18 additions & 0 deletions cpp/include/cugraph/algorithms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2007,6 +2007,24 @@ void triangle_count(raft::handle_t const& handle,
raft::device_span<edge_t> counts,
bool do_expensive_check = false);

/*
* @brief Compute edge triangle counts.
*
* Compute edge triangle counts for the entire set of edges.
*
* @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)
* @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.
*
* @return edge_property_t containing the edge triangle count
*/
template <typename vertex_t, typename edge_t, bool multi_gpu>
jnke2016 marked this conversation as resolved.
Show resolved Hide resolved
edge_property_t<graph_view_t<vertex_t, edge_t, false, multi_gpu>, edge_t> edge_triangle_count(
raft::handle_t const& handle, graph_view_t<vertex_t, edge_t, false, multi_gpu> const& graph_view);

/*
* @brief Compute K-Truss.
*
Expand Down
362 changes: 291 additions & 71 deletions cpp/src/community/edge_triangle_count_impl.cuh

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions cpp/src/community/edge_triangle_count_mg.cu
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2024, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "community/edge_triangle_count_impl.cuh"

namespace cugraph {

// SG instantiation
template edge_property_t<graph_view_t<int32_t, int32_t, false, true>, int32_t> edge_triangle_count(
raft::handle_t const& handle,
cugraph::graph_view_t<int32_t, int32_t, false, true> const& graph_view);

template edge_property_t<graph_view_t<int32_t, int64_t, false, true>, int64_t> edge_triangle_count(
raft::handle_t const& handle,
cugraph::graph_view_t<int32_t, int64_t, false, true> const& graph_view);

template edge_property_t<graph_view_t<int64_t, int64_t, false, true>, int64_t> edge_triangle_count(
raft::handle_t const& handle,
cugraph::graph_view_t<int64_t, int64_t, false, true> const& graph_view);

} // namespace cugraph
18 changes: 6 additions & 12 deletions cpp/src/community/edge_triangle_count_sg.cu
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,16 @@
namespace cugraph {

// SG instantiation
template rmm::device_uvector<int32_t> edge_triangle_count(
template edge_property_t<graph_view_t<int32_t, int32_t, false, false>, int32_t> edge_triangle_count(
raft::handle_t const& handle,
cugraph::graph_view_t<int32_t, int32_t, false, false> const& graph_view,
raft::device_span<int32_t> edgelist_srcs,
raft::device_span<int32_t> edgelist_dsts);
cugraph::graph_view_t<int32_t, int32_t, false, false> const& graph_view);

template rmm::device_uvector<int64_t> edge_triangle_count(
template edge_property_t<graph_view_t<int32_t, int64_t, false, false>, int64_t> edge_triangle_count(
raft::handle_t const& handle,
cugraph::graph_view_t<int32_t, int64_t, false, false> const& graph_view,
raft::device_span<int32_t> edgelist_srcs,
raft::device_span<int32_t> edgelist_dsts);
cugraph::graph_view_t<int32_t, int64_t, false, false> const& graph_view);

template rmm::device_uvector<int64_t> edge_triangle_count(
template edge_property_t<graph_view_t<int64_t, int64_t, false, false>, int64_t> edge_triangle_count(
raft::handle_t const& handle,
cugraph::graph_view_t<int64_t, int64_t, false, false> const& graph_view,
raft::device_span<int64_t> edgelist_srcs,
raft::device_span<int64_t> edgelist_dsts);
cugraph::graph_view_t<int64_t, int64_t, false, false> const& graph_view);

} // namespace cugraph
Loading
Loading