Skip to content
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

Starting work on blog links and nx_cugraph docs #4160

Merged
merged 23 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f58be5e
first changes to docs blogs and nx docs
acostadon Feb 9, 2024
d07438b
more new files for docs update
acostadon Feb 9, 2024
58b03e6
added nx_cugraph functions and more description to docs
acostadon Feb 12, 2024
8f28954
adding speedup examples to nx_cugraph page
acostadon Feb 13, 2024
be3d99f
fixed an incomplete sentence
acostadon Feb 13, 2024
1ab631b
Merge branch 'branch-24.04' into docs_0209
acostadon Feb 13, 2024
0c08dab
added sescription of metrics on charts
acostadon Feb 13, 2024
9d1fcde
Merge branch 'branch-24.04' into docs_0209
acostadon Feb 13, 2024
379574c
Merge branch 'docs_0209' of https://github.com/acostadon/cugraph into…
acostadon Feb 13, 2024
8d5aeff
Merge branch 'branch-24.04' into docs_0209
acostadon Feb 15, 2024
3b15a42
added index file to nx_cugraph docs
acostadon Feb 16, 2024
5289b01
Merge branch 'branch-24.04' into docs_0209
acostadon Feb 21, 2024
b09554f
Merge branch 'branch-24.04' into docs_0209
acostadon Feb 23, 2024
eebbb92
removed rst file, the data is now in md file under nx cugraph
acostadon Feb 23, 2024
3702dc9
Merge branch 'branch-24.04' into docs_0209
acostadon Mar 7, 2024
33cdfbe
corrected typo and removed experimantal from dataset example
acostadon Mar 7, 2024
9290932
Update docs/cugraph/source/basics/nx_transition.rst
acostadon Mar 8, 2024
249fc81
Merge branch 'branch-24.04' into docs_0209
acostadon Mar 8, 2024
9621e05
removeed empty line at end of file
acostadon Mar 8, 2024
118fbec
fixing style errors
acostadon Mar 11, 2024
9adfc46
more style fixes...white space/end of file issues
acostadon Mar 11, 2024
c641bf6
let pre-commit make style changes
acostadon Mar 11, 2024
fc0bcd7
Merge branch 'branch-24.04' into docs_0209
acostadon Mar 11, 2024
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
2 changes: 1 addition & 1 deletion docs/cugraph/source/api_docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Core Graph API Documentation
cugraph_c/index.rst
cugraph_cpp/index.rst

Graph Nerual Networks API Documentation
Graph Neural Networks API Documentation
---------------------------------------

.. toctree::
Expand Down
52 changes: 22 additions & 30 deletions docs/cugraph/source/basics/nx_transition.rst
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
**************************************
NetworkX Compatibility and Transition
NetworkX by calling cuGraph Algorithms
**************************************

*Note: this is a work in progress and will be updatred and changed as we better flesh out
compatibility issues*

One of the goals of RAPIDS cuGraph is to mimic the NetworkX API to simplify
the transition to accelerated GPU data science. However, graph analysis,
also called network science, like most other data science workflow, is more
than just running an algorithm. Graph data requires cleaning and prep (ETL)
and then the construction of a graph object; that is all before the execution
*Note: This behavior is still supported but will soon be deprecated. Going forward,
using nx_cugraph as a NetworkX backend will be the the primary method to accelerate
networkX with cuGraph*


One of the goals of RAPIDS cuGraph is to give NetworkX users the most efficient to
acostadon marked this conversation as resolved.
Show resolved Hide resolved
accelerated GPU data science. However, graph analysis,
also called network science, is more than just running algorithms. Graph data requires
cleaning and prep (ETL) and then the construction of a graph object; that is all before the execution
of a graph algorithm. RAPIDS and cuGraph allow a portion or the complete
analytic workflow to be accelerated. To achieve the maximum amount of
acceleration, we encourage fully replacing existing code with cuGraph.
But sometimes it is easier to replace just a portion.

Last Update
###########
Latest Update
#############

Last Update: Oct 14th, 2020
Release: 0.16
Last Update: February 7th, 2024
Release: 24.04

Information on `NetworkX <https://networkx.github.io/documentation/stable/index.html>`_
**CuGraph is now a registered backend for networkX. This is described in the following blog:
`Accelerating NetworkX on NVIDIA GPUs for High Performance Graph Analytics
<https://developer.nvidia.com/blog/accelerating-networkx-on-nvidia-gpus-for-high-performance-graph-analytics/>`_

This transition guide in an expansion of the Medium Blog on `NetworkX Compatibility
<https://medium.com/rapids-ai/rapids-cugraph-networkx-compatibility-d119e417557c>`_


Easy Path – Use NetworkX Graph Objects, Accelerated Algorithms
Expand All @@ -33,23 +34,14 @@ Easy Path – Use NetworkX Graph Objects, Accelerated Algorithms
Rather than updating all of your existing code, simply update the calls to
graph algorithms by replacing the module name. This allows all the complicated
ETL code to be unchanged while still seeing significate performance
improvements.

In the following example, the cuGraph module is being imported as “cnx”.
While module can be assigned any name can be used, we picked cnx to reduce
the amount of text to be changed. The text highlighted in yellow indicates
changes.
improvements. Again this will be deprecated since networkX dispatching to nx_cugraph
has many advantages.

.. image:: ../images/Nx_Cg_1.png
:width: 600

It is that easy. All algorithms in cuGraph support a NetworkX graph object as
input and match the NetworkX API list of arguments.

Currently, cuGraph accepts both NetworkX Graph and DiGraph objects. We will be
adding support for Bipartite graph and Multigraph over the next few releases.
However, this functionality will also be deprecated since using nx_cugraph is a
far easier transition for users who have existing NetworkX code and want GPU speedups
with support going forward.

|


Differences in Algorithms
Expand Down
2 changes: 1 addition & 1 deletion docs/cugraph/source/graph_support/property_graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import cugraph
from cugraph.experimental import PropertyGraph

# Import a built-in dataset
from cugraph.experimental.datasets import karate
from cugraph.datasets import karate

# Read edgelist data into a DataFrame, load into PropertyGraph as edge data.
# Create a graph using the imported Dataset object
Expand Down
Binary file added docs/cugraph/source/images/ancestors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/cugraph/source/images/bfs_tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/cugraph/source/images/conn_component.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/cugraph/source/images/descendents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/cugraph/source/images/k_truss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/cugraph/source/images/katz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/cugraph/source/images/pagerank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/cugraph/source/images/sssp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/cugraph/source/images/wcc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/cugraph/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ the docs and links
:caption: Contents:

basics/index
nx_cugraph/index
installation/index
tutorials/index
graph_support/index
Expand Down
9 changes: 9 additions & 0 deletions docs/cugraph/source/nx_cugraph/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
===============================
nxCugraph as a NetworkX Backend
===============================


.. toctree::
:maxdepth: 2

nx_cugraph.md
170 changes: 170 additions & 0 deletions docs/cugraph/source/nx_cugraph/nx_cugraph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
### nx_cugraph


Whereas previous versions of cuGraph have included mechanisms to make it
trivial to plug in cuGraph algorithm calls. Beginning with version 24.02, nx-cuGraph
is now a [networkX backend](<https://networkx.org/documentation/stable/reference/utils.html#backends>).
The user now need only [install nx-cugraph](<https://github.com/rapidsai/cugraph/blob/branch-24.04/python/nx-cugraph/README.md#install>)
to experience GPU speedups.

Lets look at some examples of algorithm speedups comparing CPU based NetworkX to dispatched versions run on GPU with nx_cugraph.

Each chart has three measurements.
* NX - running the algorithm natively with networkX on CPU.
* nx-cugraph - running with GPU accelerated networkX achieved by simply calling the cugraph backend. This pays the overhead of building the GPU resident object for each algorithm called. This achieves significant improvement but stil isn't compleltely optimum.
* nx-cugraph (preconvert) - This is a bit more complicated since it involves building (precomputing) the GPU resident graph ahead and reusing it for each algorithm.




![Ancestors](../images/ancestors.png)
![BFS Tree](../images/bfs_tree.png)
![Connected Components](../images/conn_component.png)
![Descendents](../images/descendents.png)
![Katz](../images/katz.png)
![Pagerank](../images/pagerank.png)
![Single Source Shortest Path](../images/sssp.png)
![Weakly Connected Components](../images/wcc.png)


The following algorithms are supported and automatically dispatched to nx-cuGraph for acceleration.

#### Algorithms
```
bipartite
├─ basic
│ └─ is_bipartite
└─ generators
└─ complete_bipartite_graph
centrality
├─ betweenness
│ ├─ betweenness_centrality
│ └─ edge_betweenness_centrality
├─ degree_alg
│ ├─ degree_centrality
│ ├─ in_degree_centrality
│ └─ out_degree_centrality
├─ eigenvector
│ └─ eigenvector_centrality
└─ katz
└─ katz_centrality
cluster
├─ average_clustering
├─ clustering
├─ transitivity
└─ triangles
community
└─ louvain
└─ louvain_communities
components
├─ connected
│ ├─ connected_components
│ ├─ is_connected
│ ├─ node_connected_component
│ └─ number_connected_components
└─ weakly_connected
├─ is_weakly_connected
├─ number_weakly_connected_components
└─ weakly_connected_components
core
├─ core_number
└─ k_truss
dag
├─ ancestors
└─ descendants
isolate
├─ is_isolate
├─ isolates
└─ number_of_isolates
link_analysis
├─ hits_alg
│ └─ hits
└─ pagerank_alg
└─ pagerank
operators
└─ unary
├─ complement
└─ reverse
reciprocity
├─ overall_reciprocity
└─ reciprocity
shortest_paths
└─ unweighted
├─ single_source_shortest_path_length
└─ single_target_shortest_path_length
traversal
└─ breadth_first_search
├─ bfs_edges
├─ bfs_layers
├─ bfs_predecessors
├─ bfs_successors
├─ bfs_tree
├─ descendants_at_distance
└─ generic_bfs_edges
tree
└─ recognition
├─ is_arborescence
├─ is_branching
├─ is_forest
└─ is_tree
```

#### Generators
```
classic
├─ barbell_graph
├─ circular_ladder_graph
├─ complete_graph
├─ complete_multipartite_graph
├─ cycle_graph
├─ empty_graph
├─ ladder_graph
├─ lollipop_graph
├─ null_graph
├─ path_graph
├─ star_graph
├─ tadpole_graph
├─ trivial_graph
├─ turan_graph
└─ wheel_graph
community
└─ caveman_graph
small
├─ bull_graph
├─ chvatal_graph
├─ cubical_graph
├─ desargues_graph
├─ diamond_graph
├─ dodecahedral_graph
├─ frucht_graph
├─ heawood_graph
├─ house_graph
├─ house_x_graph
├─ icosahedral_graph
├─ krackhardt_kite_graph
├─ moebius_kantor_graph
├─ octahedral_graph
├─ pappus_graph
├─ petersen_graph
├─ sedgewick_maze_graph
├─ tetrahedral_graph
├─ truncated_cube_graph
├─ truncated_tetrahedron_graph
└─ tutte_graph
social
├─ davis_southern_women_graph
├─ florentine_families_graph
├─ karate_club_graph
└─ les_miserables_graph
```

#### Other

```
convert_matrix
├─ from_pandas_edgelist
└─ from_scipy_sparse_array
```



4 changes: 3 additions & 1 deletion docs/cugraph/source/tutorials/community_resources.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Commmunity Resources
[Rapids Community Repository](https://github.com/rapidsai-community/notebooks-contrib)
[Rapids Community Repository](https://github.com/rapidsai-community/notebooks-contrib)
[RAPIDS Containers on Docker Hub](https://catalog.ngc.nvidia.com/containers)
[RAPIDS PyTorch Container in Docker](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pyg)
15 changes: 15 additions & 0 deletions docs/cugraph/source/tutorials/cugraph_blogs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ Here, we've selected just a few that are of particular interest to cuGraph users

Blogs & Conferences
====================
2024
------
Coming Soon

2023
------
* `Intro to Graph Neural Networks with cuGraph-DGL <https://medium.com/rapids-ai/introduction-to-graph-neural-networks-with-cugraph-dgl-64c632e9cc52>`_
* `GTC 2023 Ask the Experts Q&A <https://forums.developer.nvidia.com/c/blogs-events/connect-with-experts/ama-cugraph/652?ncid=em-even-260150-vt33#cid=dev03_em-even_en-us>`_
* `Accelerating NetworkX on NVIDIA GPUs for High Performance Graph Analytics <https://developer.nvidia.com/blog/accelerating-networkx-on-nvidia-gpus-for-high-performance-graph-analytics/>`_
* `Introduction to Graph Neural Networks with NVIDIA cuGraph-DGL <https://developer.nvidia.com/blog/introduction-to-graph-neural-networks-with-nvidia-cugraph-dgl/>`_
* `Supercharge Graph Analytics at Scale with GPU-CPU Fusion for 100x Performance <https://developer.nvidia.com/blog/supercharge-graph-analytics-at-scale-with-gpu-cpu-fusion-for-100x-performance/>`_
2022
------
* `GTC: State of cuGraph (video & slides) <https://www.nvidia.com/gtc/session-catalog/?search=cuGraph&tab.scheduledorondemand=1583520458947001NJiE&search=cuGraph#/session/1635793340204001n4p2>`_
Expand Down Expand Up @@ -50,6 +61,8 @@ Media
Academic Papers
===============

* Seunghwa Kang, Chuck Hastings, Joe Eaton, Brad Rees `cuGraph C++ primitives: vertex/edge-centric building blocks for parallel graph computing <https://ieeexplore.ieee.org/abstract/document/10196665>`_

* Alex Fender, Brad Rees, Joe Eaton (2022) `Massive Graph Analytics <https://books.google.com/books?hl=en&lr=&id=QspxEAAAQBAJ&oi=fnd&pg=PT8&dq=book:%22Massive+Graph+Analytics%22&ots=3HAGJ0njKO&sig=8e4v0azmzA6LTQNUNgPw-uTLkoc#v=onepage&q&f=false>`_ Bader, D. (Editor) CRC Press

* S Kang, A. Fender, J. Eaton, B. Rees:`Computing PageRank Scores of Web Crawl Data Using DGX A100 Clusters`. In IEEE HPEC, Sep. 2020
Expand All @@ -58,6 +71,8 @@ Academic Papers

* Richardson, B., Rees, B., Drabas, T., Oldridge, E., Bader, D. A., & Allen, R. (2020, August). Accelerating and Expanding End-to-End Data Science Workflows with DL/ML Interoperability Using RAPIDS. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (pp. 3503-3504).

* A Gondhalekar, P Sathre, W Feng `Hybrid CPU-GPU Implementation of Edge-Connected Jaccard Similarity in Graph Datasets <https://sc23.supercomputing.org/proceedings/tech_poster/poster_files/rpost221s3-file3.pdf>`_


Other Blogs
========================
Expand Down
Loading