-
Notifications
You must be signed in to change notification settings - Fork 310
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
Fix bug in MG Neighborhood sampling #4827
Fix bug in MG Neighborhood sampling #4827
Conversation
cpp/src/c_api/neighbor_sampling.cpp
Outdated
@@ -948,11 +948,13 @@ struct neighbor_sampling_functor : public cugraph::c_api::abstract_functor { | |||
std::exclusive_scan( | |||
recvcounts.begin(), recvcounts.end(), displacements.begin(), size_t{0}); | |||
|
|||
(*label_to_comm_rank) | |||
.resize(displacements.back() + recvcounts.back(), handle_.get_stream()); | |||
rmm::device_uvector<label_t> tmp_label_to_comm_rank( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just use label_to_comm_rank.resize(...)
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an optional which is initialized to std::nullopt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label_to_comm_rank =
rmm::device_uvector<label_t>(displacements.back() + recvcounts.back(), handle_.get_stream());
is sufficient (no need to create a temporary and move).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the above comment, looks good to me.
…2_fix-bug-mg-nbr-sampling
5a1679b
to
1ca214b
Compare
/merge |
Adds support for heterogeneous distributed sampling to the cuGraph distributed sampler. Prerequisite for exposing this functionality to cuGraph-PyG. Has been initially tested with cuGraph-PyG. Updates the distributed sampler to use the new sampling API. Merge after #4775, #4827, #4820 Closes #4773 Closes #4401 Authors: - Alex Barghi (https://github.com/alexbarghi-nv) - Joseph Nke (https://github.com/jnke2016) - Ralph Liu (https://github.com/nv-rliu) Approvers: - Rick Ratzel (https://github.com/rlratzel) URL: #4795
This PR fixes a bug when computing the global start vertex labels