Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce peak memory requirement in graph creation (part 1/2) #2070

Merged
merged 13 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpp/include/cugraph/detail/shuffle_wrappers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ rmm::device_uvector<vertex_t> shuffle_vertices_by_gpu_id(
* @param[in/out] d_edgelist_minors Vertex IDs for columns (if the graph adjacency matrix is stored
* as is) or rows (if the graph adjacency matrix is stored transposed)
* @param[in/out] d_edgelist_weights Optional edge weights
* @param[in] groupby_and_count_local_partition If set to true, groupby and count edges based on
* (local partition ID, GPU ID) pairs (where GPU IDs are computed by applying the
* @param[in] groupby_and_count_local_partition_by_minor If set to true, groupby and count edges
* based on (local partition ID, GPU ID) pairs (where GPU IDs are computed by applying the
* compute_gpu_id_from_vertex_t function to the minor vertex ID). If set to false, groupby and count
* edges by just local partition ID.
*
Expand All @@ -91,7 +91,7 @@ rmm::device_uvector<size_t> groupby_and_count_edgelist_by_local_partition_id(
rmm::device_uvector<vertex_t>& d_edgelist_majors,
rmm::device_uvector<vertex_t>& d_edgelist_minors,
std::optional<rmm::device_uvector<weight_t>>& d_edgelist_weights,
bool groupby_and_count_local_partition = false);
bool groupby_and_count_local_partition_by_minor = false);

} // namespace detail
} // namespace cugraph
5 changes: 1 addition & 4 deletions cpp/include/cugraph/graph_functions.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,9 +37,6 @@ struct renumber_meta_t<vertex_t, edge_t, multi_gpu, std::enable_if_t<multi_gpu>>
edge_t number_of_edges{};
partition_t<vertex_t> partition{};
std::vector<vertex_t> segment_offsets{};

vertex_t num_local_unique_edge_majors{};
vertex_t num_local_unique_edge_minors{};
};

template <typename vertex_t, typename edge_t, bool multi_gpu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ void copy_v_transform_reduce_key_aggregated_out_nbr(
rmm::device_uvector<weight_t> rx_key_aggregated_edge_weights(0, handle.get_stream());
std::forward_as_tuple(
std::tie(rx_major_vertices, rx_minor_keys, rx_key_aggregated_edge_weights), std::ignore) =
groupby_gpuid_and_shuffle_values(
groupby_gpu_id_and_shuffle_values(
col_comm,
triplet_first,
triplet_first + tmp_major_vertices.size(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -505,7 +505,7 @@ transform_reduce_by_adj_matrix_row_col_key_e(
rmm::device_uvector<vertex_t> rx_unique_keys(0, handle.get_stream());
auto rx_value_for_unique_key_buffer = allocate_dataframe_buffer<T>(0, handle.get_stream());
std::tie(rx_unique_keys, rx_value_for_unique_key_buffer, std::ignore) =
groupby_gpuid_and_shuffle_kv_pairs(
groupby_gpu_id_and_shuffle_kv_pairs(
comm,
tmp_keys.begin(),
tmp_keys.end(),
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cugraph/utilities/collect_comm.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ collect_values_for_keys(raft::comms::comms_t const& comm,
{
rmm::device_uvector<vertex_t> rx_unique_keys(0, stream_view);
std::vector<size_t> rx_value_counts{};
std::tie(rx_unique_keys, rx_value_counts) = groupby_gpuid_and_shuffle_values(
std::tie(rx_unique_keys, rx_value_counts) = groupby_gpu_id_and_shuffle_values(
comm,
unique_keys.begin(),
unique_keys.end(),
Expand Down Expand Up @@ -228,7 +228,7 @@ collect_values_for_unique_keys(raft::comms::comms_t const& comm,
{
rmm::device_uvector<vertex_t> rx_unique_keys(0, stream_view);
std::vector<size_t> rx_value_counts{};
std::tie(rx_unique_keys, rx_value_counts) = groupby_gpuid_and_shuffle_values(
std::tie(rx_unique_keys, rx_value_counts) = groupby_gpu_id_and_shuffle_values(
comm,
unique_keys.begin(),
unique_keys.end(),
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cugraph/utilities/cython.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -588,7 +588,7 @@ template <typename vertex_t, typename edge_t, typename weight_t>
std::unique_ptr<major_minor_weights_t<vertex_t, edge_t, weight_t>> call_shuffle(
raft::handle_t const& handle,
vertex_t*
edgelist_major_vertices, // [IN / OUT]: groupby_gpuid_and_shuffle_values() sorts in-place
edgelist_major_vertices, // [IN / OUT]: groupby_gpu_id_and_shuffle_values() sorts in-place
vertex_t* edgelist_minor_vertices, // [IN / OUT]
weight_t* edgelist_weights, // [IN / OUT]
edge_t num_edgelist_edges);
Expand Down
Loading