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

[gpuCI] Forward-merge branch-0.19 to branch-0.20 [skip ci] #1517

Merged
merged 1 commit into from
Apr 7, 2021
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
11 changes: 6 additions & 5 deletions cpp/include/experimental/graph.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ class graph_t<vertex_t, edge_t, weight_t, store_transposed, multi_gpu, std::enab
offsets,
indices,
weights,
vertex_partition_segment_offsets_,
adj_matrix_partition_segment_offsets_,
partition_,
this->get_number_of_vertices(),
this->get_number_of_edges(),
this->get_graph_properties(),
vertex_partition_segment_offsets_.size() > 0,
adj_matrix_partition_segment_offsets_.size() > 0,
false);
}

Expand All @@ -105,9 +105,10 @@ class graph_t<vertex_t, edge_t, weight_t, store_transposed, multi_gpu, std::enab
partition_t<vertex_t> partition_{};

std::vector<vertex_t>
vertex_partition_segment_offsets_{}; // segment offsets within the vertex partition based on
// vertex degree, relevant only if
// sorted_by_global_degree_within_vertex_partition is true
adj_matrix_partition_segment_offsets_{}; // segment offsets within the vertex partition based
// on vertex degree, relevant only if
// sorted_by_global_degree_within_vertex_partition is
// true
};

// single-GPU version
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/experimental/graph_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ void unrenumber_local_int_vertices(
vertex_t local_int_vertex_last,
bool do_expensive_check = false);

// FIXME: We may add unrenumber_int_rows(or cols) as this will require communication only within a
// sub-communicator and potentially be more efficient.
/**
* @brief Unrenumber (possibly non-local) internal vertices to external vertices based on the
* providied @p renumber_map_labels.
Expand Down
27 changes: 23 additions & 4 deletions cpp/include/experimental/graph_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class graph_view_t<vertex_t,
std::vector<edge_t const*> const& adj_matrix_partition_offsets,
std::vector<vertex_t const*> const& adj_matrix_partition_indices,
std::vector<weight_t const*> const& adj_matrix_partition_weights,
std::vector<vertex_t> const& vertex_partition_segment_offsets,
std::vector<vertex_t> const& adj_matrix_partition_segment_offsets,
partition_t<vertex_t> const& partition,
vertex_t number_of_vertices,
edge_t number_of_edges,
Expand Down Expand Up @@ -431,6 +431,17 @@ class graph_view_t<vertex_t,
: vertex_t{0};
}

std::vector<vertex_t> get_local_adj_matrix_partition_segment_offsets(size_t partition_idx) const
{
return adj_matrix_partition_segment_offsets_.size() > 0
? std::vector<vertex_t>(
adj_matrix_partition_segment_offsets_.begin() +
partition_idx * (detail::num_segments_per_vertex_partition + 1),
adj_matrix_partition_segment_offsets_.begin() +
(partition_idx + 1) * (detail::num_segments_per_vertex_partition + 1))
: std::vector<vertex_t>{};
}

// FIXME: this function is not part of the public stable API. This function is mainly for pattern
// accelerator implementation. This function is currently public to support the legacy
// implementations directly accessing CSR/CSC data, but this function will eventually become
Expand Down Expand Up @@ -499,9 +510,10 @@ class graph_view_t<vertex_t,
partition_t<vertex_t> partition_{};

std::vector<vertex_t>
vertex_partition_segment_offsets_{}; // segment offsets within the vertex partition based on
// vertex degree, relevant only if
// sorted_by_global_degree_within_vertex_partition is true
adj_matrix_partition_segment_offsets_{}; // segment offsets within the vertex partition based
// on vertex degree, relevant only if
// sorted_by_global_degree_within_vertex_partition is
// true
};

// single-GPU version
Expand Down Expand Up @@ -612,6 +624,13 @@ class graph_view_t<vertex_t,
return vertex_t{0};
}

std::vector<vertex_t> get_local_adj_matrix_partition_segment_offsets(
size_t adj_matrix_partition_idx) const
{
assert(adj_matrix_partition_idx == 0);
return segment_offsets_.size() > 0 ? segment_offsets_ : std::vector<vertex_t>{};
}

// FIXME: this function is not part of the public stable API.This function is mainly for pattern
// accelerator implementation. This function is currently public to support the legacy
// implementations directly accessing CSR/CSC data, but this function will eventually become
Expand Down
Loading