-
Notifications
You must be signed in to change notification settings - Fork 304
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
Heterogeneous renumbering implementation #4602
Heterogeneous renumbering implementation #4602
Conversation
…to fea_heterogeneous_renumbering_impl
…to fea_heterogeneous_renumbering_impl
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.
A few minor things. Looks good.
@@ -576,7 +582,8 @@ if(BUILD_CUGRAPH_MG_TESTS) | |||
############################################################################################### | |||
# - MG BETWEENNESS CENTRALITY tests ----------------------------------------------------------- | |||
ConfigureTestMG(MG_BETWEENNESS_CENTRALITY_TEST centrality/mg_betweenness_centrality_test.cpp) | |||
ConfigureTestMG(MG_EDGE_BETWEENNESS_CENTRALITY_TEST centrality/mg_edge_betweenness_centrality_test.cpp) | |||
ConfigureTestMG(MG_EDGE_BETWEENNESS_CENTRALITY_TEST |
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.
This seems like an odd edit.
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.
This exceeded the line length limit :-) Should we allow long lines in CMakeLists.txt?
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 didn't realize we had one.
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 guess we don't have one officially, but I implicitly consider the end of ###############################################################################################
as the line limit.
@@ -0,0 +1,828 @@ | |||
/* | |||
* Copyright (c) 2022-2024, NVIDIA CORPORATION. |
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 2024?
…to fea_heterogeneous_renumbering_impl
@@ -510,6 +514,11 @@ renumber_and_sort_sampled_edgelist( | |||
* true. | |||
* 2. Edges in each label are sorted independently if @p edgelist_label_offsets.has_value() is true. | |||
* | |||
* This function assumes that there is a single edge source vertex type and a single edge | |||
* destination vertex type for each edge. If @p edgelist_edge_types.has_value() is false (i.e. there | |||
* is only one edge type), there shouldb be only one edge source vertex type and only one edge |
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.
typo here
* is only one edge type), there shouldb be only one edge source vertex type and only one edge | |
* is only one edge type), there should be only one edge source vertex type and only one edge |
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.
Looks good. I assume you're delegating updating the C API sampling function to properly handle heterogeneous renumbering to me.
"Invalid input arguments: num_labels should be 0 if the input edge list is empty."); | ||
CUGRAPH_EXPECTS( | ||
"num_hops == 0", | ||
num_hops == 0, |
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.
This fixed a bug in the C++ layer (the old check always passed because of the quotes), but adding this check causes a failure in a python test.
Is there a reason to fail with an exception if num_hops is 0? If the input edge list is empty, couldn't we just return an empty result? I'm unfamiliar with the logic.
This is failing in CI, we should either modify the python code or remove this check.
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.
Yeah... I guess you're right. We can check only for nun_labels == 0 for an empty edge list and allow num_hops & num_vertex_types to have a non zero value.
Do you have time to do that @alexbarghi-nv ? We can do that as a separate PR if you are busy with other things. Would you want to always use this new heterogeneous renumbering logic, add an option for it, or detect it in some other way? |
We only want to use it for heterogeneous graphs. I think we can just add an optional parameter for the edge type mappings, and if they are present, then the C API sampling function will call the heterogeneous renumbering with the mappings instead of the homogeneous renumbering. |
@seunghwak it looks like your PR changed the way we're handling empty start lists which is causing CI to fail:
|
@ChuckHastings I assume this is also due to the fix in "num_hops == 0," right? |
…to fea_heterogeneous_renumbering_impl
…to fea_heterogeneous_renumbering_impl
…to fea_heterogeneous_renumbering_impl
…to fea_heterogeneous_renumbering_impl
…to fea_heterogeneous_renumbering_impl
/merge |
This PR implements heterogeneous renumbering for GNN.
In addition,
renumber_sampled_edgelist
function (breaking because this function is removed)stride_fill
utility function (thrust wrapper)Closes #4412