Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
[RAPIDS](https://rapids.ai) cuGraph GNN is a monorepo containing packages for GPU-accelerated graph neural networks (GNNs).
cuGraph-GNN supports the creation and manipulation of graphs followed by the execution of scalable fast graph algorithms.

<div align="center">

[GNN Support](./readme_pages/gnn_support.md)

</div>

-----
## News

Expand Down
48 changes: 35 additions & 13 deletions readme_pages/cugraph_pyg.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
# cugraph_pyg

[RAPIDS](https://rapids.ai) cugraph_pyg enables the ability to use cugraph Property Graphs with PyTorch Geometric (PyG). PyG users will have access to cuGraph and cuGraph-Service through the PyG GraphStore, FeatureStore, and Sampler interfaces. Through cugraph_pyg, PyG users have the full power of cuGraph's GPU-accelerated algorithms for graph analytics, such as sampling, centrality computation, and community detection.
## Overview
**cugraph_pyg** brings GPU-accelerated graph processing from [RAPIDS](https://rapids.ai) cuGraph to PyTorch Geometric (PyG), enabling seamless integration of cuGraph's high-performance capabilities into the PyG ecosystem. By providing native implementations of PyG's `GraphStore`, `FeatureStore`, and `Loader` interfaces, cugraph_pyg unlocks powerful GPU-accelerated graph analytics—including neighborhood sampling, centrality metrics, and community detection—directly within your PyG workflows.


The goal of `cugraph_pyg` is to enable accelerated single-GPU and multi-node, multi-GPU cugraph accelerated graphs to help train large-scale Graph Neural Networks (GNN) on PyG by providing duck-typed drop-in replacements of the `GraphStore`, `FeatureStore`, and `Sampler` interfaces backed by either cuGraph or cuGraph-Service.

Users of cugraph_pyg have the option of installing either the cugraph or cugraph_service_client packages. Only one is required.
Designed for scalability, cugraph_pyg supports both single-GPU and multi-node, multi-GPU configurations, making it ideal for training large-scale Graph Neural Networks (GNNs). Simply use cugraph_pyg as a drop-in replacement for standard PyG components to accelerate your graph learning pipelines with minimal code changes.

## Usage
```
G = cuGraph.PropertyGraph()
...
feature_store, graph_store = to_pyg(G)
sampler = CuGraphSampler(
data=(feature_store, graph_store),
shuffle=True,
num_neighbors=[10,25],
batch_size=50,
edge_index = torch.tensor([
[0, 3, 2, 8, 1, 8, 5, 0, 7, 3],
[4, 1, 1, 2, 7, 6, 4, 7, 8, 5]
])
x = torch.tensor([
[0.6, 0.5, 0.4],
[0.0, 0.1, 1.1],
[0.1, 0.2, 0.3],
[0.5, 0.1, 0.1],
[0.8, 0.8, 0.7],
[1.1, 0.1, 0.1],
[1.2, 0.2, 0.3],
[0.2, 0.1, 0.2],
[0.3, 0.2, 0.5],
])
y = torch.tensor([0, 1, 0, 0, 1, 0, 0, 1, 1])

graph_store = cugraph_pyg.data.GraphStore()
feature_store = cugraph_pyg.data.FeatureStore()

graph_store[('n', 'to', 'n'), 'coo', False, (9, 9)] = edge_index
feature_store['n', 'x', None] = x
feature_store['n', 'y', None] = y

loader = cugraph_pyg.data.NeighborLoader(
(feature_store, graph_store),
input_nodes=torch.arange(9),
num_neighbors=[2, 2],
batch_size=2,
)

for batch in loader:
...
...
```
32 changes: 0 additions & 32 deletions readme_pages/gnn_support.md

This file was deleted.

7 changes: 0 additions & 7 deletions readme_pages/performance/performance.md

This file was deleted.