Skip to content

Commit

Permalink
Fix bug discovered in Jaccard testing (#3758)
Browse files Browse the repository at this point in the history
A customer identified an issue trying to run Jaccard.  In MG calls they were seeing failed memory allocation calls.

Vertices were being shuffled incorrectly in the C API, so we were getting vertices processed on the wrong GPU, resulting in out-of-bounds memory references.

Moved the shuffle before renumbering, which puts vertices to be on proper GPU

Closes #3746

Authors:
  - Chuck Hastings (https://github.com/ChuckHastings)

Approvers:
  - Seunghwa Kang (https://github.com/seunghwak)

URL: #3758
  • Loading branch information
ChuckHastings authored Jul 31, 2023
1 parent 14862c6 commit b6de267
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cpp/src/c_api/graph_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ struct two_hop_neighbors_functor : public cugraph::c_api::abstract_functor {
start_vertices_->size_,
handle_.get_stream());

if constexpr (multi_gpu) {
start_vertices =
cugraph::detail::shuffle_ext_vertices_to_local_gpu_by_vertex_partitioning(
handle_, std::move(start_vertices));
}

cugraph::renumber_ext_vertices<vertex_t, multi_gpu>(
handle_,
start_vertices.data(),
Expand All @@ -155,11 +161,6 @@ struct two_hop_neighbors_functor : public cugraph::c_api::abstract_functor {
graph_view.local_vertex_partition_range_last(),
do_expensive_check_);

if constexpr (multi_gpu) {
start_vertices =
cugraph::detail::shuffle_ext_vertices_to_local_gpu_by_vertex_partitioning(
handle_, std::move(start_vertices));
}
} else {
start_vertices.resize(graph_view.local_vertex_partition_range_size(), handle_.get_stream());
cugraph::detail::sequence_fill(handle_.get_stream(),
Expand Down

0 comments on commit b6de267

Please sign in to comment.