-
Notifications
You must be signed in to change notification settings - Fork 309
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
Define and Implement C API for biased sampling #4535
Define and Implement C API for biased sampling #4535
Conversation
const cugraph_graph_t * graph, | ||
const cugraph_lookup_container_t* lookup_container, | ||
const cugraph_type_erased_device_array_t* edge_ids, | ||
const cugraph_type_erased_device_array_t* properties, |
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.
What happens if edge IDs are provided only for a subset of edges? Will those edges have undefined values? Should we ask for default values?
And no need for an update function? (e.g. update bias values only for a small subset of edges).
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.
Reasonable ideas. I'll look at defining update functions and a mechanism for a default value. I'll add it to both vertex and edge functions.
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.
Just fyi. In the C++ primitives level, we have fill_edge_property_value
(which sets edge property values for the entire set of edges, we may add a function that works on a subset of the edges in the future) and update_edge_property
function that works either on a subset of the edges or the entire set of edges. Following this may make implementing the API easier.
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.
I pushed an update that adds these functions. Plan is to implement them at some point in the future.
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.
👍
/merge |
Defined and implements C API for biased sampling.
API includes a parameter for handling edge bias input that is not the weight of the edge. However, there is currently no mechanism to create the
cugraph_edge_property_view_t *
value that would need to be passed in. There are some proposed functions to support that included inproperty.h
, but they are inside an#ifdef 0
block so that they won't be compiled.