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

Optimize K-Truss #4375

Merged
merged 105 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 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
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
9d2d4f7
update function definition
jnke2016 May 5, 2024
2019d99
fix style
jnke2016 May 5, 2024
701e33d
update test
jnke2016 May 5, 2024
0d74246
return edge_property_t
jnke2016 May 7, 2024
c103e52
fix style
jnke2016 May 7, 2024
50798d5
add edge mask tests
jnke2016 May 8, 2024
86fd201
fix style
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
b5d069a
fix typo
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
1c4ee11
update tests
jnke2016 May 14, 2024
5b1c248
fix style
jnke2016 May 14, 2024
fefddc5
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
jnke2016 May 14, 2024
0ab7906
update fixme
jnke2016 May 16, 2024
29ed50c
update ktruss implementation
jnke2016 May 24, 2024
f09b930
Merge remote-tracking branch 'upstream/branch-24.06' into branch-24.0…
jnke2016 May 24, 2024
1f3f0dc
add mg ktruss
jnke2016 May 29, 2024
f7d67b6
fetch latest chnages
jnke2016 May 29, 2024
1d52c84
undo changes to triangle count tests
jnke2016 May 29, 2024
9892314
make a copy of the invalid edgelist
jnke2016 May 29, 2024
1e26021
Merge branch 'branch-24.06' into branch-24.06_optimize-k-truss
BradReesWork May 29, 2024
42a1b2a
unroll remaining edges
jnke2016 May 29, 2024
2dfbaa4
Merge remote-tracking branch 'upstream/branch-24.06_optimize-k-truss'…
jnke2016 May 29, 2024
bdac0aa
update cmake
jnke2016 May 29, 2024
03edaa9
fix style
jnke2016 May 29, 2024
910075e
undo changes to k-truss tests
jnke2016 May 29, 2024
31162ec
undo changes
jnke2016 May 29, 2024
566eb22
fix style
jnke2016 May 29, 2024
1996afa
fix style
jnke2016 May 29, 2024
287cd16
rename variable
jnke2016 Jun 4, 2024
df1fb0e
restructure k-truss implementation
jnke2016 Jun 7, 2024
b86697a
unroll (q, r) edges for MG
jnke2016 Jun 10, 2024
b0d63bb
unroll (p, r) edges for MG
jnke2016 Jun 10, 2024
c1d18ab
Merge remote-tracking branch 'upstream/branch-24.08' into branch-24.0…
jnke2016 Jun 12, 2024
b34dc41
remove unsued variables
jnke2016 Jun 12, 2024
9d7e976
add 'fixme'
jnke2016 Jun 12, 2024
811237c
update docstrings
jnke2016 Jun 12, 2024
1fde802
update docstrings
jnke2016 Jun 12, 2024
707ee27
reorder stopping condition
jnke2016 Jun 12, 2024
e486492
return rx_counts
jnke2016 Jul 7, 2024
97609c4
update cmake
jnke2016 Jul 7, 2024
09b0b96
rename functor
jnke2016 Jul 7, 2024
8eec691
rename variable
jnke2016 Jul 7, 2024
f88f8b0
rename variable
jnke2016 Jul 8, 2024
e5f0762
update branch
jnke2016 Jul 8, 2024
463ad7c
remove unnecessary and unused variables
jnke2016 Jul 10, 2024
05873bc
update thrust function used
jnke2016 Jul 10, 2024
83bca54
update fixme
jnke2016 Jul 10, 2024
f4c2fcf
fix bug by using major comms
jnke2016 Jul 11, 2024
d956d22
fix typo
jnke2016 Jul 11, 2024
dc6136b
unroll edges without using global comms
jnke2016 Jul 13, 2024
a83971d
decompress the edges with the renumber_map
jnke2016 Jul 15, 2024
bc558ff
remove unnecessary shuffle function
jnke2016 Jul 17, 2024
c76746b
update mg tests for ktruss
jnke2016 Jul 18, 2024
3c817bd
undo changes to test
jnke2016 Jul 18, 2024
b16e37c
add fixme and remove unused arguments
jnke2016 Jul 18, 2024
e4c6ce0
instantiate type combinations
jnke2016 Jul 18, 2024
e6698f3
update cmake list
jnke2016 Jul 18, 2024
1cd35c0
fix style
jnke2016 Jul 18, 2024
a0eb24f
update branch
jnke2016 Jul 18, 2024
a34cef3
enable edge masking for k-core and k-truss and add tests
jnke2016 Jul 22, 2024
b1aeab4
enable int64 type for 'd_values' in 'shuffle_int_vertex_value_pairs_t…
jnke2016 Jul 22, 2024
533f374
fix type bug
jnke2016 Jul 22, 2024
ae17245
update benchmark tests and simplify initial k-truss implementation
jnke2016 Jul 24, 2024
2733cec
reset chunk parameter
jnke2016 Jul 25, 2024
6de56d5
remove debug statement
jnke2016 Jul 25, 2024
5892e44
update CMake file
jnke2016 Jul 25, 2024
c639b76
describe rx_count in documentation
jnke2016 Jul 25, 2024
48078e9
update copyright
jnke2016 Jul 25, 2024
f88efb9
fix copyright
jnke2016 Jul 25, 2024
f743122
remove outdated fixme
jnke2016 Jul 25, 2024
0c2f042
update docs
jnke2016 Jul 26, 2024
94a4c89
add fixme
jnke2016 Jul 26, 2024
4476d8d
enable MG CAPI k_truss
jnke2016 Jul 29, 2024
ed78d32
add CAPI tests for MG k_truss
jnke2016 Jul 29, 2024
6de5304
fix style
jnke2016 Jul 29, 2024
61c6797
Merge remote-tracking branch 'upstream/branch-24.08' into branch-24.0…
jnke2016 Jul 29, 2024
3743208
Merge remote-tracking branch 'upstream/branch-24.08' into branch-24.0…
jnke2016 Jul 29, 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
3 changes: 3 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ set(CUGRAPH_SOURCES
src/community/k_truss_sg_v64_e64.cu
src/community/k_truss_sg_v32_e32.cu
src/community/k_truss_sg_v32_e64.cu
src/community/k_truss_mg_v64_e64.cu
src/community/k_truss_mg_v32_e32.cu
src/community/k_truss_mg_v32_e64.cu
src/lookup/lookup_src_dst_mg_v32_e32.cu
src/lookup/lookup_src_dst_mg_v32_e64.cu
src/lookup/lookup_src_dst_mg_v64_e64.cu
Expand Down
8 changes: 5 additions & 3 deletions cpp/include/cugraph/detail/shuffle_wrappers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ std::tuple<rmm::device_uvector<vertex_t>,
rmm::device_uvector<vertex_t>,
std::optional<rmm::device_uvector<weight_t>>,
std::optional<rmm::device_uvector<edge_t>>,
std::optional<rmm::device_uvector<edge_type_id_t>>>
std::optional<rmm::device_uvector<edge_type_id_t>>,
std::vector<size_t>>
shuffle_ext_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning(
raft::handle_t const& handle,
rmm::device_uvector<vertex_t>&& majors,
Expand Down Expand Up @@ -86,14 +87,15 @@ shuffle_ext_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning(
* (exclusive) vertex ID.
*
* @return Tuple of vectors storing shuffled major vertices, minor vertices and optional weights,
* edge ids and edge types
* edge ids and edge types and rx counts
*/
template <typename vertex_t, typename edge_t, typename weight_t, typename edge_type_id_t>
std::tuple<rmm::device_uvector<vertex_t>,
rmm::device_uvector<vertex_t>,
std::optional<rmm::device_uvector<weight_t>>,
std::optional<rmm::device_uvector<edge_t>>,
std::optional<rmm::device_uvector<edge_type_id_t>>>
std::optional<rmm::device_uvector<edge_type_id_t>>,
std::vector<size_t>>
jnke2016 marked this conversation as resolved.
Show resolved Hide resolved
shuffle_int_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning(
raft::handle_t const& handle,
rmm::device_uvector<vertex_t>&& majors,
Expand Down
3 changes: 2 additions & 1 deletion cpp/include/cugraph/mtmg/detail/per_device_edgelist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ class per_device_edgelist_t {
store_transposed ? src_[0] : dst_[0],
tmp_wgt,
tmp_edge_id,
tmp_edge_type) =
tmp_edge_type,
std::ignore) =
cugraph::detail::shuffle_ext_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning(
handle.raft_handle(),
store_transposed ? std::move(dst_[0]) : std::move(src_[0]),
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/c_api/graph_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct create_vertex_pairs_functor : public cugraph::c_api::abstract_functor {
second_copy.data(), second_->as_type<vertex_t>(), second_->size_, handle_.get_stream());

if constexpr (multi_gpu) {
std::tie(first_copy, second_copy, std::ignore, std::ignore, std::ignore) =
std::tie(first_copy, second_copy, std::ignore, std::ignore, std::ignore, std::ignore) =
cugraph::detail::shuffle_ext_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning<
vertex_t,
edge_t,
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/c_api/graph_mg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ struct create_graph_functor : public cugraph::c_api::abstract_functor {
store_transposed ? edgelist_srcs : edgelist_dsts,
edgelist_weights,
edgelist_edge_ids,
edgelist_edge_types) =
edgelist_edge_types,
std::ignore) =
cugraph::detail::shuffle_ext_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning(
handle_,
std::move(store_transposed ? edgelist_dsts : edgelist_srcs),
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/c_api/k_truss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ struct k_truss_functor : public cugraph::c_api::abstract_functor {
{
if constexpr (!cugraph::is_candidate<vertex_t, edge_t, weight_t>::value) {
unsupported();
} else if constexpr (multi_gpu) {
unsupported();
} else {
// k_truss expects store_transposed == false
if constexpr (store_transposed) {
error_code_ = cugraph::c_api::
transpose_storage<vertex_t, edge_t, weight_t, store_transposed, multi_gpu>(
Expand Down
1 change: 1 addition & 0 deletions cpp/src/community/detail/refine_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ refine_clustering(
store_transposed ? d_srcs : d_dsts,
d_weights,
std::ignore,
std::ignore,
std::ignore) =
cugraph::detail::shuffle_ext_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning<
vertex_t,
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/community/edge_triangle_count_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ edge_property_t<graph_view_t<vertex_t, edge_t, false, multi_gpu>, edge_t> edge_t
handle.get_stream());

// There are still multiple copies here but is it worth sorting and reducing again?
std::tie(pair_srcs, pair_dsts, std::ignore, pair_count, std::ignore) =
std::tie(pair_srcs, pair_dsts, std::ignore, pair_count, std::ignore, std::ignore) =
shuffle_int_vertex_pairs_with_values_to_local_gpu_by_edge_partitioning<vertex_t,
edge_t,
weight_t,
Expand Down
Loading
Loading