Skip to content

Commit

Permalink
Merge branch 'branch-24.12' into branch-24.12-remove-deprecation-warn…
Browse files Browse the repository at this point in the history
…ings
  • Loading branch information
nv-rliu authored Oct 16, 2024
2 parents afaf820 + 0d0d28a commit 6fa90cb
Show file tree
Hide file tree
Showing 60 changed files with 145 additions and 444 deletions.
146 changes: 0 additions & 146 deletions cpp/include/cugraph_c/graph.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,48 +35,6 @@ typedef struct {
bool_t is_multigraph;
} cugraph_graph_properties_t;

/**
* @brief Construct an SG graph
*
* @deprecated This API will be deleted, use cugraph_graph_create_sg instead
*
* @param [in] handle Handle for accessing resources
* @param [in] properties Properties of the constructed graph
* @param [in] src Device array containing the source vertex ids.
* @param [in] dst Device array containing the destination vertex ids
* @param [in] weights Device array containing the edge weights. Note that an unweighted
* graph can be created by passing weights == NULL.
* @param [in] edge_ids Device array containing the edge ids for each edge. Optional
argument that can be NULL if edge ids are not used.
* @param [in] edge_type_ids Device array containing the edge types for each edge. Optional
argument that can be NULL if edge types are not used.
* @param [in] store_transposed If true create the graph initially in transposed format
* @param [in] renumber If true, renumber vertices to make an efficient data structure.
* If false, do not renumber. Renumbering enables some significant optimizations within
* the graph primitives library, so it is strongly encouraged. Renumbering is required if
* the vertices are not sequential integer values from 0 to num_vertices.
* @param [in] do_expensive_check If true, do expensive checks to validate the input data
* is consistent with software assumptions. If false bypass these checks.
* @param [out] graph A pointer to the graph object
* @param [out] error Pointer to an error object storing details of any error. Will
* be populated if error code is not CUGRAPH_SUCCESS
*
* @return error code
*/
cugraph_error_code_t cugraph_sg_graph_create(
const cugraph_resource_handle_t* handle,
const cugraph_graph_properties_t* properties,
const cugraph_type_erased_device_array_view_t* src,
const cugraph_type_erased_device_array_view_t* dst,
const cugraph_type_erased_device_array_view_t* weights,
const cugraph_type_erased_device_array_view_t* edge_ids,
const cugraph_type_erased_device_array_view_t* edge_type_ids,
bool_t store_transposed,
bool_t renumber,
bool_t do_expensive_check,
cugraph_graph_t** graph,
cugraph_error_t** error);

/**
* @brief Construct an SG graph
*
Expand Down Expand Up @@ -133,51 +91,6 @@ cugraph_error_code_t cugraph_graph_create_sg(
cugraph_graph_t** graph,
cugraph_error_t** error);

/**
* @brief Construct an SG graph from a CSR input
*
* @deprecated This API will be deleted, use cugraph_graph_create_sg_from_csr instead
*
* @param [in] handle Handle for accessing resources
* @param [in] properties Properties of the constructed graph
* @param [in] offsets Device array containing the CSR offsets array
* @param [in] indices Device array containing the destination vertex ids
* @param [in] weights Device array containing the edge weights. Note that an unweighted
* graph can be created by passing weights == NULL.
* @param [in] edge_ids Device array containing the edge ids for each edge. Optional
argument that can be NULL if edge ids are not used.
* @param [in] edge_type_ids Device array containing the edge types for each edge. Optional
argument that can be NULL if edge types are not used.
* @param [in] store_transposed If true create the graph initially in transposed format
* @param [in] renumber If true, renumber vertices to make an efficient data structure.
* If false, do not renumber. Renumbering enables some significant optimizations within
* the graph primitives library, so it is strongly encouraged. Renumbering is required if
* the vertices are not sequential integer values from 0 to num_vertices.
* @param [in] symmetrize If true, symmetrize the edgelist. The symmetrization of edges
* with edge_ids and/or edge_type_ids is currently not supported.
* @param [in] do_expensive_check If true, do expensive checks to validate the input data
* is consistent with software assumptions. If false bypass these checks.
* @param [out] graph A pointer to the graph object
* @param [out] error Pointer to an error object storing details of any error. Will
* be populated if error code is not CUGRAPH_SUCCESS
*
* @return error code
*/
cugraph_error_code_t cugraph_sg_graph_create_from_csr(
const cugraph_resource_handle_t* handle,
const cugraph_graph_properties_t* properties,
const cugraph_type_erased_device_array_view_t* offsets,
const cugraph_type_erased_device_array_view_t* indices,
const cugraph_type_erased_device_array_view_t* weights,
const cugraph_type_erased_device_array_view_t* edge_ids,
const cugraph_type_erased_device_array_view_t* edge_type_ids,
bool_t store_transposed,
bool_t renumber,
bool_t symmetrize,
bool_t do_expensive_check,
cugraph_graph_t** graph,
cugraph_error_t** error);

/**
* @brief Construct an SG graph from a CSR input
*
Expand Down Expand Up @@ -221,47 +134,6 @@ cugraph_error_code_t cugraph_graph_create_sg_from_csr(
cugraph_graph_t** graph,
cugraph_error_t** error);

/**
* @brief Construct an MG graph
*
* @deprecated This API will be deleted, use cugraph_graph_create_mg instead
*
* @param [in] handle Handle for accessing resources
* @param [in] properties Properties of the constructed graph
* @param [in] src Device array containing the source vertex ids
* @param [in] dst Device array containing the destination vertex ids
* @param [in] weights Device array containing the edge weights. Note that an unweighted
* graph can be created by passing weights == NULL. If a weighted
* graph is to be created, the weights device array should be created
* on each rank, but the pointer can be NULL and the size 0
* if there are no inputs provided by this rank
* @param [in] edge_ids Device array containing the edge ids for each edge. Optional
argument that can be NULL if edge ids are not used.
* @param [in] edge_type_ids Device array containing the edge types for each edge. Optional
argument that can be NULL if edge types are not used.
* @param [in] store_transposed If true create the graph initially in transposed format
* @param [in] num_edges Number of edges
* @param [in] do_expensive_check If true, do expensive checks to validate the input data
* is consistent with software assumptions. If false bypass these checks.
* @param [out] graph A pointer to the graph object
* @param [out] error Pointer to an error object storing details of any error. Will
* be populated if error code is not CUGRAPH_SUCCESS
* @return error code
*/
cugraph_error_code_t cugraph_mg_graph_create(
const cugraph_resource_handle_t* handle,
const cugraph_graph_properties_t* properties,
const cugraph_type_erased_device_array_view_t* src,
const cugraph_type_erased_device_array_view_t* dst,
const cugraph_type_erased_device_array_view_t* weights,
const cugraph_type_erased_device_array_view_t* edge_ids,
const cugraph_type_erased_device_array_view_t* edge_type_ids,
bool_t store_transposed,
size_t num_edges,
bool_t do_expensive_check,
cugraph_graph_t** graph,
cugraph_error_t** error);

/**
* @brief Construct an MG graph
*
Expand Down Expand Up @@ -332,24 +204,6 @@ cugraph_error_code_t cugraph_graph_create_mg(
*/
void cugraph_graph_free(cugraph_graph_t* graph);

/**
* @brief Destroy an SG graph
*
* @deprecated This API will be deleted, use cugraph_graph_free instead
*
* @param [in] graph A pointer to the graph object to destroy
*/
void cugraph_sg_graph_free(cugraph_graph_t* graph);

/**
* @brief Destroy an MG graph
*
* @deprecated This API will be deleted, use cugraph_graph_free instead
*
* @param [in] graph A pointer to the graph object to destroy
*/
void cugraph_mg_graph_free(cugraph_graph_t* graph);

/**
* @brief Create a data mask
*
Expand Down
37 changes: 0 additions & 37 deletions cpp/src/c_api/graph_mg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -536,40 +536,3 @@ extern "C" cugraph_error_code_t cugraph_graph_create_mg(

return CUGRAPH_SUCCESS;
}

extern "C" cugraph_error_code_t cugraph_mg_graph_create(
cugraph_resource_handle_t const* handle,
cugraph_graph_properties_t const* properties,
cugraph_type_erased_device_array_view_t const* src,
cugraph_type_erased_device_array_view_t const* dst,
cugraph_type_erased_device_array_view_t const* weights,
cugraph_type_erased_device_array_view_t const* edge_ids,
cugraph_type_erased_device_array_view_t const* edge_type_ids,
bool_t store_transposed,
size_t num_edges,
bool_t do_expensive_check,
cugraph_graph_t** graph,
cugraph_error_t** error)
{
return cugraph_graph_create_mg(handle,
properties,
NULL,
&src,
&dst,
(weights == nullptr) ? nullptr : &weights,
(edge_ids == nullptr) ? nullptr : &edge_ids,
(edge_type_ids == nullptr) ? nullptr : &edge_type_ids,
store_transposed,
1,
FALSE,
FALSE,
FALSE,
do_expensive_check,
graph,
error);
}

extern "C" void cugraph_mg_graph_free(cugraph_graph_t* ptr_graph)
{
if (ptr_graph != NULL) { cugraph_graph_free(ptr_graph); }
}
64 changes: 0 additions & 64 deletions cpp/src/c_api/graph_sg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,38 +680,6 @@ extern "C" cugraph_error_code_t cugraph_graph_create_sg(
return CUGRAPH_SUCCESS;
}

extern "C" cugraph_error_code_t cugraph_sg_graph_create(
const cugraph_resource_handle_t* handle,
const cugraph_graph_properties_t* properties,
const cugraph_type_erased_device_array_view_t* src,
const cugraph_type_erased_device_array_view_t* dst,
const cugraph_type_erased_device_array_view_t* weights,
const cugraph_type_erased_device_array_view_t* edge_ids,
const cugraph_type_erased_device_array_view_t* edge_type_ids,
bool_t store_transposed,
bool_t renumber,
bool_t do_expensive_check,
cugraph_graph_t** graph,
cugraph_error_t** error)
{
return cugraph_graph_create_sg(handle,
properties,
NULL,
src,
dst,
weights,
edge_ids,
edge_type_ids,
store_transposed,
renumber,
FALSE,
FALSE,
FALSE,
do_expensive_check,
graph,
error);
}

cugraph_error_code_t cugraph_graph_create_sg_from_csr(
const cugraph_resource_handle_t* handle,
const cugraph_graph_properties_t* properties,
Expand Down Expand Up @@ -819,36 +787,6 @@ cugraph_error_code_t cugraph_graph_create_sg_from_csr(
return CUGRAPH_SUCCESS;
}

cugraph_error_code_t cugraph_sg_graph_create_from_csr(
const cugraph_resource_handle_t* handle,
const cugraph_graph_properties_t* properties,
const cugraph_type_erased_device_array_view_t* offsets,
const cugraph_type_erased_device_array_view_t* indices,
const cugraph_type_erased_device_array_view_t* weights,
const cugraph_type_erased_device_array_view_t* edge_ids,
const cugraph_type_erased_device_array_view_t* edge_type_ids,
bool_t store_transposed,
bool_t renumber,
bool_t symmetrize,
bool_t do_expensive_check,
cugraph_graph_t** graph,
cugraph_error_t** error)
{
return cugraph_graph_create_sg_from_csr(handle,
properties,
offsets,
indices,
weights,
edge_ids,
edge_type_ids,
store_transposed,
renumber,
symmetrize,
do_expensive_check,
graph,
error);
}

extern "C" void cugraph_graph_free(cugraph_graph_t* ptr_graph)
{
if (ptr_graph != NULL) {
Expand All @@ -871,5 +809,3 @@ extern "C" void cugraph_graph_free(cugraph_graph_t* ptr_graph)
delete internal_pointer;
}
}

extern "C" void cugraph_sg_graph_free(cugraph_graph_t* ptr_graph) { cugraph_graph_free(ptr_graph); }
2 changes: 1 addition & 1 deletion cpp/tests/c_api/betweenness_centrality_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int generic_betweenness_centrality_test(vertex_t* h_src,

cugraph_type_erased_device_array_view_free(seeds_view);
cugraph_type_erased_device_array_free(seeds);
cugraph_sg_graph_free(p_graph);
cugraph_graph_free(p_graph);
cugraph_free_resource_handle(handle);
cugraph_error_free(ret_error);

Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/c_api/bfs_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ int generic_bfs_test(vertex_t* h_src,

cugraph_type_erased_device_array_free(p_sources);
cugraph_paths_result_free(p_result);
cugraph_sg_graph_free(p_graph);
cugraph_graph_free(p_graph);
cugraph_free_resource_handle(p_handle);
cugraph_error_free(ret_error);

Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/c_api/biased_neighbor_sample_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ int generic_biased_neighbor_sample_test(const cugraph_resource_handle_t* handle,
cugraph_sample_result_free(result);
#endif

cugraph_sg_graph_free(graph);
cugraph_graph_free(graph);
cugraph_error_free(ret_error);
return test_ret_value;
}
Expand Down Expand Up @@ -680,7 +680,7 @@ int test_biased_neighbor_sample_with_labels(const cugraph_resource_handle_t* han
cugraph_sampling_options_free(sampling_options);
#endif

cugraph_sg_graph_free(graph);
cugraph_graph_free(graph);
cugraph_error_free(ret_error);
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/c_api/core_number_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int generic_core_number_test(vertex_t* h_src,
}

cugraph_core_result_free(p_result);
cugraph_sg_graph_free(p_graph);
cugraph_graph_free(p_graph);
cugraph_free_resource_handle(p_handle);
cugraph_error_free(ret_error);

Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/c_api/create_graph_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int test_create_sg_graph_csr()
handle, wgt_view, (byte_t*)h_wgt, &ret_error);
TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed.");

ret_code = cugraph_sg_graph_create_from_csr(handle,
ret_code = cugraph_graph_create_sg_from_csr(handle,
&properties,
offsets_view,
indices_view,
Expand Down Expand Up @@ -669,7 +669,7 @@ int test_create_sg_graph_csr_with_isolated()
handle, wgt_view, (byte_t*)h_wgt, &ret_error);
TEST_ASSERT(test_ret_value, ret_code == CUGRAPH_SUCCESS, "wgt copy_from_host failed.");

ret_code = cugraph_sg_graph_create_from_csr(handle,
ret_code = cugraph_graph_create_sg_from_csr(handle,
&properties,
offsets_view,
indices_view,
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/c_api/ecg_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int generic_ecg_test(vertex_t* h_src,
cugraph_hierarchical_clustering_result_free(result);
}

cugraph_sg_graph_free(graph);
cugraph_graph_free(graph);
cugraph_free_resource_handle(handle);
cugraph_error_free(ret_error);

Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/c_api/edge_betweenness_centrality_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int generic_edge_betweenness_centrality_test(vertex_t* h_src,
}

cugraph_edge_centrality_result_free(result);
cugraph_sg_graph_free(graph);
cugraph_graph_free(graph);
cugraph_free_resource_handle(handle);
cugraph_error_free(ret_error);

Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/c_api/egonet_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ int generic_egonet_test(vertex_t* h_src,
cugraph_induced_subgraph_result_free(result);
}

cugraph_sg_graph_free(graph);
cugraph_graph_free(graph);
cugraph_free_resource_handle(resource_handle);
cugraph_error_free(ret_error);

Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/c_api/eigenvector_centrality_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int generic_eigenvector_centrality_test(vertex_t* h_src,
}

cugraph_centrality_result_free(p_result);
cugraph_sg_graph_free(p_graph);
cugraph_graph_free(p_graph);
cugraph_free_resource_handle(p_handle);
cugraph_error_free(ret_error);

Expand Down
Loading

0 comments on commit 6fa90cb

Please sign in to comment.