Skip to content

Commit

Permalink
enalbe edge masking in compute_in|out_weight_sums
Browse files Browse the repository at this point in the history
  • Loading branch information
seunghwak committed Jan 30, 2024
1 parent 0f7860e commit f22e31b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
10 changes: 0 additions & 10 deletions cpp/src/structure/graph_weight_utils_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ rmm::device_uvector<weight_t> compute_in_weight_sums(
graph_view_t<vertex_t, edge_t, store_transposed, multi_gpu> const& graph_view,
edge_property_view_t<edge_t, weight_t const*> edge_weight_view)
{
CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented.");

if (store_transposed) {
return compute_weight_sums<true>(handle, graph_view, edge_weight_view);
} else {
Expand All @@ -108,8 +106,6 @@ rmm::device_uvector<weight_t> compute_out_weight_sums(
graph_view_t<vertex_t, edge_t, store_transposed, multi_gpu> const& graph_view,
edge_property_view_t<edge_t, weight_t const*> edge_weight_view)
{
CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented.");

if (store_transposed) {
return compute_weight_sums<false>(handle, graph_view, edge_weight_view);
} else {
Expand All @@ -127,8 +123,6 @@ weight_t compute_max_in_weight_sum(
graph_view_t<vertex_t, edge_t, store_transposed, multi_gpu> const& graph_view,
edge_property_view_t<edge_t, weight_t const*> edge_weight_view)
{
CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented.");

auto in_weight_sums = compute_in_weight_sums(handle, graph_view, edge_weight_view);
auto it =
thrust::max_element(handle.get_thrust_policy(), in_weight_sums.begin(), in_weight_sums.end());
Expand All @@ -153,8 +147,6 @@ weight_t compute_max_out_weight_sum(
graph_view_t<vertex_t, edge_t, store_transposed, multi_gpu> const& graph_view,
edge_property_view_t<edge_t, weight_t const*> edge_weight_view)
{
CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented.");

auto out_weight_sums = compute_out_weight_sums(handle, graph_view, edge_weight_view);
auto it =
thrust::max_element(handle.get_thrust_policy(), out_weight_sums.begin(), out_weight_sums.end());
Expand All @@ -179,8 +171,6 @@ weight_t compute_total_edge_weight(
graph_view_t<vertex_t, edge_t, store_transposed, multi_gpu> const& graph_view,
edge_property_view_t<edge_t, weight_t const*> edge_weight_view)
{
CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented.");

return transform_reduce_e(
handle,
graph_view,
Expand Down
6 changes: 3 additions & 3 deletions cpp/tests/structure/weight_sum_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ INSTANTIATE_TEST_SUITE_P(
Tests_WeightSum_File,
::testing::Combine(
// enable correctness checks
::testing::Values(WeightSum_Usecase{false}),
::testing::Values(WeightSum_Usecase{false}, WeightSum_Usecase{true}),
::testing::Values(cugraph::test::File_Usecase("test/datasets/karate.mtx"),
cugraph::test::File_Usecase("test/datasets/web-Google.mtx"),
cugraph::test::File_Usecase("test/datasets/ljournal-2008.mtx"),
Expand All @@ -247,7 +247,7 @@ INSTANTIATE_TEST_SUITE_P(
Tests_WeightSum_Rmat,
::testing::Combine(
// enable correctness checks
::testing::Values(WeightSum_Usecase{false}),
::testing::Values(WeightSum_Usecase{false}, WeightSum_Usecase{true}),
::testing::Values(cugraph::test::Rmat_Usecase(10, 16, 0.57, 0.19, 0.19, 0, false, false))));

INSTANTIATE_TEST_SUITE_P(
Expand All @@ -259,7 +259,7 @@ INSTANTIATE_TEST_SUITE_P(
Tests_WeightSum_Rmat,
::testing::Combine(
// disable correctness checks for large graphs
::testing::Values(WeightSum_Usecase{false, false}),
::testing::Values(WeightSum_Usecase{false, false}, WeightSum_Usecase{true, false}),
::testing::Values(cugraph::test::Rmat_Usecase(20, 32, 0.57, 0.19, 0.19, 0, false, false))));

CUGRAPH_TEST_PROGRAM_MAIN()

0 comments on commit f22e31b

Please sign in to comment.