-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add an RGCNConv
model using the primitives in cugraph-ops
#6278
Conversation
…Gs, num_out_nodes is always num_nodes
Codecov Report
@@ Coverage Diff @@
## master #6278 +/- ##
==========================================
- Coverage 86.25% 86.25% -0.01%
==========================================
Files 417 418 +1
Lines 22779 22791 +12
==========================================
+ Hits 19649 19659 +10
- Misses 3130 3132 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This PR adds a GraphSAGE model `torch_geometric.nn.SAGEConvCuGraph` that leverages the optimized aggregation function in cugraph-ops, similar to #6278. Fixes rapidsai/cugraph-ops#178. --------- Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
@rusty1s I have updated RGCNConv and tested it locally. Feel free to give it a go. |
This PR adds a GAT model `torch_geometric.nn.GATConvCuGraph` that leverages the optimized aggregation function in cugraph-ops, similar to #6278. Fixes rapidsai/cugraph-ops#182. --------- Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
This PR adds an RGCN model
torch_geometric.nn.RGCNConvCuGraph
that leverages the optimized aggregation functions in cugraph-ops.Fixes https://github.com/rapidsai/cugraph-ops/issues/180.
It requires the package
pylibcugraphops >= 23.02
, which is going to be released by next February. I have tested it using the nightly build.The user interface largely resembles
RGCNConv
. Our aggregation function has two modes: full-graph and message flow graph (MFG) mode, with the latter being more performant. That's why ourforward
function has to have extra arguments likenum_nodes
,from_neighbor_sampler
andmax_num_neighbors
, to help convert PyG edge_index to cugraph-ops graph type and specify which mode to opt for.Here are some preliminary performance results using MAG dataset and 2-layer RGCN model, with batch_size=1024, num_neighbors=[25,20] in NeighborLoader. I set feature dim to 16 and did not use the provided paper features, as this is just a synthetic benchmark.
Right now, since cugraph-ops requires csc/csr representation of the graph, the forward time is dominated by the coo-to-csc conversion using the utility for
SparseTensor
, taking 50~70% of the forward time. We can expect a higher speedup if 1). dataloader can emit csc graph and 2). dataloader can output a list of MFG, instead of a fused subgraph.