Skip to content

Commit

Permalink
Merge pull request #4259 from rapidsai/branch-24.04
Browse files Browse the repository at this point in the history
Forward-merge branch-24.04 into branch-24.06 [skip ci]
  • Loading branch information
AyodeAwe authored Mar 20, 2024
2 parents 6b89508 + d6fa29e commit b2a3890
Show file tree
Hide file tree
Showing 119 changed files with 1,662 additions and 1,570 deletions.
2 changes: 0 additions & 2 deletions cpp/src/cores/core_number_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ void core_number(raft::handle_t const& handle,
{
// check input arguments.

CUGRAPH_EXPECTS(!graph_view.has_edge_mask(), "unimplemented.");

CUGRAPH_EXPECTS(graph_view.is_symmetric(),
"Invalid input argument: core_number currently supports only undirected graphs.");
CUGRAPH_EXPECTS(!graph_view.is_multigraph(),
Expand Down
1 change: 1 addition & 0 deletions cpp/src/prims/transform_reduce_e_by_src_dst_key.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "prims/property_op_utils.cuh"

#include <cugraph/edge_partition_device_view.cuh>
#include <cugraph/edge_partition_edge_property_device_view.cuh>
#include <cugraph/edge_partition_endpoint_property_device_view.cuh>
#include <cugraph/edge_src_dst_property.hpp>
#include <cugraph/graph_view.hpp>
Expand Down
6 changes: 4 additions & 2 deletions cpp/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ rapids_test_init()
add_library(cugraphtestutil STATIC
utilities/matrix_market_file_utilities.cu
utilities/csv_file_utilities.cu
utilities/property_generator_utilities_sg.cu
utilities/thrust_wrapper.cu
utilities/misc_utilities.cpp
utilities/test_utilities_sg.cu
utilities/conversion_utilities_sg.cu
link_prediction/similarity_compare.cpp
centrality/betweenness_centrality_validate.cu
community/egonet_validate.cu
Expand Down Expand Up @@ -438,7 +439,8 @@ if(BUILD_CUGRAPH_MG_TESTS)
add_library(cugraphmgtestutil STATIC
utilities/device_comm_wrapper.cu
utilities/mg_utilities.cpp
utilities/test_utilities_mg.cu
utilities/conversion_utilities_mg.cu
utilities/property_generator_utilities_mg.cu
sampling/random_walks_check_mg.cu
c_api/mg_test_utils.cpp
)
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/c_api/mg_test_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "c_api/array.hpp"
#include "c_api/c_test_utils.h"
#include "c_api/resource_handle.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/partition_manager.hpp>
#include <cugraph/utilities/error.hpp>
Expand Down
2 changes: 0 additions & 2 deletions cpp/tests/centrality/betweenness_centrality_reference.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#pragma once

#include "utilities/test_utilities.hpp"

#include <gtest/gtest.h>

#include <limits>
Expand Down
9 changes: 6 additions & 3 deletions cpp/tests/centrality/betweenness_centrality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "betweenness_centrality_reference.hpp"
#include "betweenness_centrality_validate.hpp"
#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down Expand Up @@ -116,8 +116,11 @@ class Tests_BetweennessCentrality
}

if (betweenness_usecase.check_correctness) {
auto [h_offsets, h_indices, h_wgt] =
cugraph::test::graph_to_host_csr(handle, graph_view, edge_weight_view);
auto [h_offsets, h_indices, h_wgt] = cugraph::test::graph_to_host_csr(
handle,
graph_view,
edge_weight_view,
std::optional<raft::device_span<vertex_t const>>(std::nullopt));
auto h_seeds = cugraph::test::to_host(handle, d_seeds);

auto h_reference_centralities =
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/centrality/betweenness_centrality_validate.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#include "betweenness_centrality_validate.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/check_utilities.hpp"

#include <thrust/sort.h>

Expand Down
20 changes: 15 additions & 5 deletions cpp/tests/centrality/edge_betweenness_centrality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "centrality/betweenness_centrality_reference.hpp"
#include "centrality/betweenness_centrality_validate.hpp"
#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down Expand Up @@ -116,8 +116,11 @@ class Tests_EdgeBetweennessCentrality

if (betweenness_usecase.check_correctness) {
// Compute reference edge betweenness result
auto [h_offsets, h_indices, h_wgt] =
cugraph::test::graph_to_host_csr(handle, graph_view, edge_weight_view);
auto [h_offsets, h_indices, h_wgt] = cugraph::test::graph_to_host_csr(
handle,
graph_view,
edge_weight_view,
std::optional<raft::device_span<vertex_t const>>(std::nullopt));

auto h_seeds = cugraph::test::to_host(handle, d_seeds);

Expand All @@ -133,13 +136,20 @@ class Tests_EdgeBetweennessCentrality
rmm::device_uvector<vertex_t> d_reference_dst_vertex_ids(0, handle.get_stream());

std::tie(d_reference_src_vertex_ids, d_reference_dst_vertex_ids, std::ignore) =
cugraph::test::graph_to_device_coo(handle, graph_view, edge_weight_view);
cugraph::test::graph_to_device_coo(
handle,
graph_view,
edge_weight_view,
std::optional<raft::device_span<vertex_t const>>(std::nullopt));

auto d_reference_centralities = cugraph::test::to_device(handle, h_reference_centralities);

auto [d_cugraph_src_vertex_ids, d_cugraph_dst_vertex_ids, d_cugraph_results] =
cugraph::test::graph_to_device_coo(
handle, graph_view, std::make_optional(d_centralities.view()));
handle,
graph_view,
std::make_optional(d_centralities.view()),
std::optional<raft::device_span<vertex_t const>>(std::nullopt));

cugraph::test::edge_betweenness_centrality_validate(handle,
d_cugraph_src_vertex_ids,
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/centrality/eigenvector_centrality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/centrality/katz_centrality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/centrality/mg_betweenness_centrality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
#include "centrality/betweenness_centrality_validate.hpp"
#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down
12 changes: 9 additions & 3 deletions cpp/tests/centrality/mg_edge_betweenness_centrality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
#include "centrality/betweenness_centrality_validate.hpp"
#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down Expand Up @@ -119,7 +119,10 @@ class Tests_MGEdgeBetweennessCentrality
// Extract MG results
auto [d_cugraph_src_vertex_ids, d_cugraph_dst_vertex_ids, d_cugraph_results] =
cugraph::test::graph_to_device_coo(
*handle_, mg_graph_view, std::make_optional(d_centralities.view()));
*handle_,
mg_graph_view,
std::make_optional(d_centralities.view()),
std::optional<raft::device_span<vertex_t const>>(std::nullopt));

// Create SG graph so we can generate SG results
cugraph::graph_t<vertex_t, edge_t, false, false> sg_graph(*handle_);
Expand Down Expand Up @@ -152,7 +155,10 @@ class Tests_MGEdgeBetweennessCentrality

auto [d_sg_src_vertex_ids, d_sg_dst_vertex_ids, d_sg_reference_centralities] =
cugraph::test::graph_to_device_coo(
*handle_, sg_graph.view(), std::make_optional(d_sg_centralities.view()));
*handle_,
sg_graph.view(),
std::make_optional(d_sg_centralities.view()),
std::optional<raft::device_span<vertex_t const>>(std::nullopt));

cugraph::test::edge_betweenness_centrality_validate(*handle_,
d_cugraph_src_vertex_ids,
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/centrality/mg_eigenvector_centrality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/mg_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/centrality/mg_katz_centrality_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/mg_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down
1 change: 0 additions & 1 deletion cpp/tests/community/egonet_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "community/egonet_validate.hpp"
#include "utilities/base_fixture.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/graph.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/community/egonet_validate.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#include "community/egonet_validate.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/conversion_utilities.hpp"

#include <cugraph/algorithms.hpp>

Expand Down
2 changes: 2 additions & 0 deletions cpp/tests/community/legacy_ecg_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* license agreement from NVIDIA CORPORATION is strictly prohibited.
*
*/
#include "utilities/conversion_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/legacy/graph.hpp>

Expand Down
1 change: 0 additions & 1 deletion cpp/tests/community/leiden_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
#include "utilities/base_fixture.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/graph.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/community/louvain_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
*
*/
#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/graph.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/community/mg_ecg_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/mg_utilities.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/graph_functions.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/community/mg_egonet_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#include "egonet_validate.hpp"
#include "structure/detail/structure_utils.cuh"
#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/mg_utilities.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/detail/shuffle_wrappers.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/community/mg_leiden_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/mg_utilities.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/graph_functions.hpp>
Expand Down
3 changes: 2 additions & 1 deletion cpp/tests/community/mg_louvain_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/check_utilities.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/mg_utilities.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/graph_functions.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/community/mg_triangle_count_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/mg_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/community/triangle_count_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"
#include "utilities/thrust_wrapper.hpp"

#include <cugraph/algorithms.hpp>
Expand Down
2 changes: 0 additions & 2 deletions cpp/tests/components/mg_mis_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

#include "prims/fill_edge_src_dst_property.cuh"
#include "prims/per_v_transform_reduce_incoming_outgoing_e.cuh"
#include "prims/property_generator.cuh"
#include "prims/reduce_op.cuh"
#include "prims/update_edge_src_dst_property.cuh"
#include "utilities/base_fixture.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/edge_partition_view.hpp>
Expand Down
2 changes: 0 additions & 2 deletions cpp/tests/components/mg_vertex_coloring_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@

#include "prims/fill_edge_src_dst_property.cuh"
#include "prims/per_v_transform_reduce_incoming_outgoing_e.cuh"
#include "prims/property_generator.cuh"
#include "prims/reduce_op.cuh"
#include "prims/transform_reduce_e.cuh"
#include "prims/update_edge_src_dst_property.cuh"
#include "utilities/base_fixture.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/edge_partition_view.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "utilities/base_fixture.hpp"
#include "utilities/conversion_utilities.hpp"
#include "utilities/device_comm_wrapper.hpp"
#include "utilities/mg_utilities.hpp"
#include "utilities/test_graphs.hpp"
Expand Down
1 change: 0 additions & 1 deletion cpp/tests/components/mis_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "prims/reduce_op.cuh"
#include "utilities/base_fixture.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/edge_partition_view.hpp>
Expand Down
1 change: 0 additions & 1 deletion cpp/tests/components/scc_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "components/legacy/scc_matrix.cuh"
#include "converters/legacy/COOtoCSR.cuh"
#include "utilities/base_fixture.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/legacy/graph.hpp>
Expand Down
1 change: 0 additions & 1 deletion cpp/tests/components/vertex_coloring_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "prims/transform_reduce_e.cuh"
#include "utilities/base_fixture.hpp"
#include "utilities/test_graphs.hpp"
#include "utilities/test_utilities.hpp"

#include <cugraph/algorithms.hpp>
#include <cugraph/edge_partition_view.hpp>
Expand Down
Loading

0 comments on commit b2a3890

Please sign in to comment.