Skip to main content

cugraph extensions for DGL

Project description

cugraph_dgl

Description

RAPIDS cugraph_dgl provides a duck-typed version of the DGLGraph class, which uses cugraph for storing graph structure and node/edge feature data. Using cugraph as the backend allows DGL users to access a collection of GPU accelerated algorithms for graph analytics, such as centrality computation and community detection.

Conda

Install and update cugraph-dgl and the required dependencies using the command:

# CUDA 11
conda install -c rapidsai -c pytorch -c conda-forge -c nvidia -c dglteam/label/th23_cu118 cugraph-dgl

# CUDA 12
conda install -c rapidsai -c pytorch -c conda-forge -c nvidia -c dglteam/label/th23_cu121 cugraph-dgl

Build from Source

Create the conda development environment

mamba env create -n cugraph_dgl_dev --file conda/cugraph_dgl_dev_11.6.yml

Install in editable mode

pip install -e .

Run tests

pytest tests/*

Usage

+from cugraph_dgl.convert import cugraph_storage_from_heterograph
+cugraph_g = cugraph_storage_from_heterograph(dgl_g)

sampler = dgl.dataloading.NeighborSampler(
        [15, 10, 5], prefetch_node_feats=['feat'], prefetch_labels=['label'])

train_dataloader = dgl.dataloading.DataLoader(
- dgl_g,
+ cugraph_g,
train_idx,
sampler,
device=device,
batch_size=1024,
shuffle=True,
drop_last=False,
num_workers=0)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cugraph_dgl_cu12-24.10.0.tar.gz (1.4 kB view details)

Uploaded Source

File details

Details for the file cugraph_dgl_cu12-24.10.0.tar.gz.

File metadata

  • Download URL: cugraph_dgl_cu12-24.10.0.tar.gz
  • Upload date:
  • Size: 1.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for cugraph_dgl_cu12-24.10.0.tar.gz
Algorithm Hash digest
SHA256 ff29bdb3ba771b17087cb7baee8d8bbb6dd7de751a73d30df4d4cd5d433d5cf4
MD5 d69179ec295dc00f6f2a9153e3ef6b03
BLAKE2b-256 a50715fc5049639b542f09efe873c4ca68ed6d8d5ac186e83033a2e41795d0a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page