From f22e31b37a50fc6b1087e0a0ba56d52f193f9d47 Mon Sep 17 00:00:00 2001 From: Seunghwa Kang Date: Tue, 30 Jan 2024 14:46:02 -0800 Subject: [PATCH] enalbe edge masking in compute_in|out_weight_sums --- cpp/src/structure/graph_weight_utils_impl.cuh | 10 ---------- cpp/tests/structure/weight_sum_test.cpp | 6 +++--- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/cpp/src/structure/graph_weight_utils_impl.cuh b/cpp/src/structure/graph_weight_utils_impl.cuh index 1e386792b21..e97266c557a 100644 --- a/cpp/src/structure/graph_weight_utils_impl.cuh +++ b/cpp/src/structure/graph_weight_utils_impl.cuh @@ -89,8 +89,6 @@ rmm::device_uvector compute_in_weight_sums( graph_view_t const& graph_view, edge_property_view_t edge_weight_view) { - CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented."); - if (store_transposed) { return compute_weight_sums(handle, graph_view, edge_weight_view); } else { @@ -108,8 +106,6 @@ rmm::device_uvector compute_out_weight_sums( graph_view_t const& graph_view, edge_property_view_t edge_weight_view) { - CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented."); - if (store_transposed) { return compute_weight_sums(handle, graph_view, edge_weight_view); } else { @@ -127,8 +123,6 @@ weight_t compute_max_in_weight_sum( graph_view_t const& graph_view, edge_property_view_t 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()); @@ -153,8 +147,6 @@ weight_t compute_max_out_weight_sum( graph_view_t const& graph_view, edge_property_view_t 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()); @@ -179,8 +171,6 @@ weight_t compute_total_edge_weight( graph_view_t const& graph_view, edge_property_view_t edge_weight_view) { - CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented."); - return transform_reduce_e( handle, graph_view, diff --git a/cpp/tests/structure/weight_sum_test.cpp b/cpp/tests/structure/weight_sum_test.cpp index 916a5c51ecb..d53ddeb4e48 100644 --- a/cpp/tests/structure/weight_sum_test.cpp +++ b/cpp/tests/structure/weight_sum_test.cpp @@ -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"), @@ -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( @@ -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()