RAPIDS Graph documentation#

_images/cugraph_logo_2.png

Introduction#

cuGraph is a library of graph algorithms that seamlessly integrates into the RAPIDS data science ecosystem and allows the data scientist to easily call graph algorithms using data stored in cuDF/Pandas DataFrames or CuPy/SciPy sparse matrices.

cuGraph Using NetworkX Code#

cuGraph is now available as a NetworkX backend using nx-cugraph. Our major integration effort with NetworkX offers NetworkX users a zero code change option to accelerate their existing NetworkX code using an NVIDIA GPU and cuGraph.

Check out zero code change accelerated NetworkX. If you would like to continue using standard cuGraph, then continue down below.

Getting started with cuGraph#

Required hardware/software for cuGraph and RAPIDS
  • NVIDIA GPU, Volta architecture or later, with compute capability 7.0+

  • CUDA 11.2-11.8, 12.0-12.5

  • Python version 3.10, 3.11, or 3.12

Installation#

Please see the latest RAPIDS System Requirements documentation.

This includes several ways to set up cuGraph

Note: Windows use of RAPIDS depends on prior installation of WSL2.

Cugraph API Example

import cugraph
import cudf

# Create an instance of the popular Zachary Karate Club graph
from cugraph.datasets import karate
G = karate.get_graph()

# Call cugraph.degree_centrality
vertex_bc = cugraph.degree_centrality(G)

There are several resources containing cuGraph examples, the cuGraph notebook repository has many examples of loading graph data and running algorithms in Jupyter notebooks. The cuGraph test code contains script examples of setting up and calling cuGraph algorithms.

A simple example of testing the degree centrality algorithm is a good place to start. There are also multi-GPU examples with larger data sets as well.


Table of Contents#

Indices and tables#