Skip to content

Commit

Permalink
Don't compile int32_t/int64_t vertex_t/edge_t combinations
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuckHastings committed Oct 14, 2024
1 parent 4bb5494 commit edf5d25
Show file tree
Hide file tree
Showing 207 changed files with 16 additions and 7,679 deletions.
106 changes: 0 additions & 106 deletions cpp/CMakeLists.txt

Large diffs are not rendered by default.

22 changes: 0 additions & 22 deletions cpp/src/c_api/graph_helper_mg.cu
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ create_constant_edge_property(
cugraph::graph_view_t<int32_t, int32_t, false, true> const& graph_view,
float constant_value);

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

template edge_property_t<cugraph::graph_view_t<int64_t, int64_t, false, true>, float>
create_constant_edge_property(
raft::handle_t const& handle,
Expand All @@ -42,11 +36,6 @@ create_constant_edge_property(raft::handle_t const& handle,
cugraph::graph_view_t<int32_t, int32_t, true, true> const& graph_view,
float constant_value);

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

template edge_property_t<cugraph::graph_view_t<int64_t, int64_t, true, true>, float>
create_constant_edge_property(raft::handle_t const& handle,
cugraph::graph_view_t<int64_t, int64_t, true, true> const& graph_view,
Expand All @@ -58,12 +47,6 @@ create_constant_edge_property(
cugraph::graph_view_t<int32_t, int32_t, false, true> const& graph_view,
double constant_value);

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

template edge_property_t<cugraph::graph_view_t<int64_t, int64_t, false, true>, double>
create_constant_edge_property(
raft::handle_t const& handle,
Expand All @@ -75,11 +58,6 @@ create_constant_edge_property(raft::handle_t const& handle,
cugraph::graph_view_t<int32_t, int32_t, true, true> const& graph_view,
double constant_value);

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

template edge_property_t<cugraph::graph_view_t<int64_t, int64_t, true, true>, double>
create_constant_edge_property(raft::handle_t const& handle,
cugraph::graph_view_t<int64_t, int64_t, true, true> const& graph_view,
Expand Down
24 changes: 0 additions & 24 deletions cpp/src/c_api/graph_helper_sg.cu
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ create_constant_edge_property(
cugraph::graph_view_t<int32_t, int32_t, false, false> const& graph_view,
float constant_value);

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

template edge_property_t<cugraph::graph_view_t<int64_t, int64_t, false, false>, float>
create_constant_edge_property(
raft::handle_t const& handle,
Expand All @@ -66,12 +60,6 @@ create_constant_edge_property(
cugraph::graph_view_t<int32_t, int32_t, true, false> const& graph_view,
float constant_value);

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

template edge_property_t<cugraph::graph_view_t<int64_t, int64_t, true, false>, float>
create_constant_edge_property(
raft::handle_t const& handle,
Expand All @@ -84,12 +72,6 @@ create_constant_edge_property(
cugraph::graph_view_t<int32_t, int32_t, false, false> const& graph_view,
double constant_value);

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

template edge_property_t<cugraph::graph_view_t<int64_t, int64_t, false, false>, double>
create_constant_edge_property(
raft::handle_t const& handle,
Expand All @@ -102,12 +84,6 @@ create_constant_edge_property(
cugraph::graph_view_t<int32_t, int32_t, true, false> const& graph_view,
double constant_value);

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

template edge_property_t<cugraph::graph_view_t<int64_t, int64_t, true, false>, double>
create_constant_edge_property(
raft::handle_t const& handle,
Expand Down
16 changes: 8 additions & 8 deletions cpp/src/c_api/graph_mg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,14 @@ extern "C" cugraph_error_code_t cugraph_graph_create_mg(
raft::comms::op_t::SUM,
p_handle->handle_->get_stream());

cugraph_data_type_id_t edge_type{vertex_type};

if (vertex_type == cugraph_data_type_id_t::INT32)
CAPI_EXPECTS(num_edges < int32_threshold,
CUGRAPH_INVALID_INPUT,
"Number of edges won't fit in 32-bit integer, using 32-bit type",
*error);

auto vertex_types = cugraph::host_scalar_allgather(
p_handle->handle_->get_comms(), static_cast<int>(vertex_type), p_handle->handle_->get_stream());

Expand Down Expand Up @@ -434,14 +442,6 @@ extern "C" cugraph_error_code_t cugraph_graph_create_mg(
"different weight type used on different GPUs",
*error);

cugraph_data_type_id_t edge_type;

if (num_edges < int32_threshold) {
edge_type = static_cast<cugraph_data_type_id_t>(vertex_types[0]);
} else {
edge_type = cugraph_data_type_id_t::INT64;
}

if (weight_type == cugraph_data_type_id_t::NTYPES) {
weight_type = cugraph_data_type_id_t::FLOAT32;
}
Expand Down
14 changes: 7 additions & 7 deletions cpp/src/c_api/graph_sg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,14 +609,14 @@ extern "C" cugraph_error_code_t cugraph_graph_create_sg(
"Invalid input arguments: src size != weights size.",
*error);

cugraph_data_type_id_t edge_type;
cugraph_data_type_id_t weight_type;
if (p_src->type_ == cugraph_data_type_id_t::INT32)
CAPI_EXPECTS(p_src->size_ < int32_threshold,
CUGRAPH_INVALID_INPUT,
"Number of edges won't fit in 32-bit integer, using 32-bit type",
*error);

if (p_src->size_ < int32_threshold) {
edge_type = p_src->type_;
} else {
edge_type = cugraph_data_type_id_t::INT64;
}
cugraph_data_type_id_t edge_type = p_src->type_;
cugraph_data_type_id_t weight_type;

if (weights != nullptr) {
weight_type = p_weights->type_;
Expand Down
58 changes: 0 additions & 58 deletions cpp/src/centrality/betweenness_centrality_mg_v32_e64.cu

This file was deleted.

58 changes: 0 additions & 58 deletions cpp/src/centrality/betweenness_centrality_sg_v32_e64.cu

This file was deleted.

40 changes: 0 additions & 40 deletions cpp/src/centrality/eigenvector_centrality_mg_v32_e64.cu

This file was deleted.

40 changes: 0 additions & 40 deletions cpp/src/centrality/eigenvector_centrality_sg_v32_e64.cu

This file was deleted.

Loading

0 comments on commit edf5d25

Please sign in to comment.