cugraph
cugraph copied to clipboard
[FEA] Optimize cugraph.uniform_neighbor_sample
Describe the solution you'd like and any additional context
We should optimize cugraph.uniform_neighbor_sample
.
import cudf
import cugraph
df = cudf.read_parquet('/datasets/graph_nn/ogbn_products.parquet')
G = cugraph.Graph(directed=True)
G.from_cudf_edgelist(df,source='src',destination='dst',edge_attr='weight')
batch = G.nodes()[0:4096]
%%timeit
sampled_g_cugraph = cugraph.uniform_neighbor_sample(G,
start_list=batch,
fanout_vals=[10],
with_replacement=False
332 ms ± 847
Expected Performance : I would expect the performance to be around 8-9x
better. More details in internal thread.
Will be optimized by 50x 332 ms
to 25 ms
by https://github.com/rapidsai/cugraph/pull/2394 .
Of that 25 ms
only 6.61 ms
seems to spent in the pylibcugraph_uniform_neighbor_sample call so we have more scope there.
This issue has been labeled inactive-30d
due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d
if there is no activity in the next 60 days.
@seunghwak or @VibhuJawa
Can you confirm if this is complete? Does anything else need to occur to close this?
https://github.com/rapidsai/cugraph/pull/3269 might be related to this issue no other issue tracking uniform neighbor sampling performance.
@VibhuJawa can you confirm whether or not #3269 fixes your issue?
Lets close this issue. https://github.com/rapidsai/cugraph/pull/3269 fixed most things