diff --git a/docs/cugraph/source/api_docs/index.rst b/docs/cugraph/source/api_docs/index.rst index 1b907165a39..d76902772fb 100644 --- a/docs/cugraph/source/api_docs/index.rst +++ b/docs/cugraph/source/api_docs/index.rst @@ -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:: diff --git a/docs/cugraph/source/basics/nx_transition.rst b/docs/cugraph/source/basics/nx_transition.rst index 9849865814d..07c2ad26ffa 100644 --- a/docs/cugraph/source/basics/nx_transition.rst +++ b/docs/cugraph/source/basics/nx_transition.rst @@ -1,30 +1,20 @@ ************************************** -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 -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: March 7th, 2024 +Release: 24.04 -Information on `NetworkX `_ - -This transition guide in an expansion of the Medium Blog on `NetworkX Compatibility -`_ +**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 +`_ Easy Path – Use NetworkX Graph Objects, Accelerated Algorithms @@ -33,12 +23,11 @@ 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. Again this will be deprecated since networkX dispatching to nx_cugraph +has many advantages. + 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. .. image:: ../images/Nx_Cg_1.png :width: 600 @@ -49,9 +38,6 @@ 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. -| - - Differences in Algorithms ########################## @@ -169,8 +155,8 @@ Graph Building ############## The biggest difference between NetworkX and cuGraph is with how Graph objects -are built. NetworkX, for the most part, stores graph data in a dictionary. -That structure allows easy insertion of new records. Consider the following +are built. NetworkX, for the most part, stores graph data in a dictionary. +That structure allows easy insertion of new records. Consider the following code for building a NetworkX Graph:: # Read the node data diff --git a/docs/cugraph/source/graph_support/property_graph.md b/docs/cugraph/source/graph_support/property_graph.md index ef07be79ba0..94d170c18df 100644 --- a/docs/cugraph/source/graph_support/property_graph.md +++ b/docs/cugraph/source/graph_support/property_graph.md @@ -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 diff --git a/docs/cugraph/source/images/ancestors.png b/docs/cugraph/source/images/ancestors.png new file mode 100644 index 00000000000..37b8e7933a8 Binary files /dev/null and b/docs/cugraph/source/images/ancestors.png differ diff --git a/docs/cugraph/source/images/bfs_tree.png b/docs/cugraph/source/images/bfs_tree.png new file mode 100644 index 00000000000..5bca39ca3bf Binary files /dev/null and b/docs/cugraph/source/images/bfs_tree.png differ diff --git a/docs/cugraph/source/images/conn_component.png b/docs/cugraph/source/images/conn_component.png new file mode 100644 index 00000000000..b7db09657c8 Binary files /dev/null and b/docs/cugraph/source/images/conn_component.png differ diff --git a/docs/cugraph/source/images/descendents.png b/docs/cugraph/source/images/descendents.png new file mode 100644 index 00000000000..8afc38b4ef4 Binary files /dev/null and b/docs/cugraph/source/images/descendents.png differ diff --git a/docs/cugraph/source/images/k_truss.png b/docs/cugraph/source/images/k_truss.png new file mode 100644 index 00000000000..78a1978d103 Binary files /dev/null and b/docs/cugraph/source/images/k_truss.png differ diff --git a/docs/cugraph/source/images/katz.png b/docs/cugraph/source/images/katz.png new file mode 100644 index 00000000000..9f2303a21e3 Binary files /dev/null and b/docs/cugraph/source/images/katz.png differ diff --git a/docs/cugraph/source/images/pagerank.png b/docs/cugraph/source/images/pagerank.png new file mode 100644 index 00000000000..193c0a8bbd1 Binary files /dev/null and b/docs/cugraph/source/images/pagerank.png differ diff --git a/docs/cugraph/source/images/sssp.png b/docs/cugraph/source/images/sssp.png new file mode 100644 index 00000000000..2c9dfc36852 Binary files /dev/null and b/docs/cugraph/source/images/sssp.png differ diff --git a/docs/cugraph/source/images/wcc.png b/docs/cugraph/source/images/wcc.png new file mode 100644 index 00000000000..2d27a3f675c Binary files /dev/null and b/docs/cugraph/source/images/wcc.png differ diff --git a/docs/cugraph/source/index.rst b/docs/cugraph/source/index.rst index b18a79d3396..9ea9e4d65cf 100644 --- a/docs/cugraph/source/index.rst +++ b/docs/cugraph/source/index.rst @@ -46,6 +46,7 @@ the docs and links :caption: Contents: basics/index + nx_cugraph/index installation/index tutorials/index graph_support/index diff --git a/docs/cugraph/source/nx_cugraph/index.rst b/docs/cugraph/source/nx_cugraph/index.rst new file mode 100644 index 00000000000..ef6f51601ab --- /dev/null +++ b/docs/cugraph/source/nx_cugraph/index.rst @@ -0,0 +1,9 @@ +=============================== +nxCugraph as a NetworkX Backend +=============================== + + +.. toctree:: + :maxdepth: 2 + + nx_cugraph.md diff --git a/docs/cugraph/source/nx_cugraph/nx_cugraph.md b/docs/cugraph/source/nx_cugraph/nx_cugraph.md new file mode 100644 index 00000000000..8d497e3a1d7 --- /dev/null +++ b/docs/cugraph/source/nx_cugraph/nx_cugraph.md @@ -0,0 +1,165 @@ +### 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](). +The user now need only [install nx-cugraph]() +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 +``` diff --git a/docs/cugraph/source/tutorials/community_resources.md b/docs/cugraph/source/tutorials/community_resources.md index 1c4362393d1..975f11965de 100644 --- a/docs/cugraph/source/tutorials/community_resources.md +++ b/docs/cugraph/source/tutorials/community_resources.md @@ -1,2 +1,4 @@ # Commmunity Resources [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) diff --git a/docs/cugraph/source/tutorials/cugraph_blogs.rst b/docs/cugraph/source/tutorials/cugraph_blogs.rst index 373e846f6c3..3665f425e3f 100644 --- a/docs/cugraph/source/tutorials/cugraph_blogs.rst +++ b/docs/cugraph/source/tutorials/cugraph_blogs.rst @@ -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 `_ + * `GTC 2023 Ask the Experts Q&A `_ + * `Accelerating NetworkX on NVIDIA GPUs for High Performance Graph Analytics `_ + * `Introduction to Graph Neural Networks with NVIDIA cuGraph-DGL `_ + * `Supercharge Graph Analytics at Scale with GPU-CPU Fusion for 100x Performance `_ 2022 ------ * `GTC: State of cuGraph (video & slides) `_ @@ -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 `_ + * Alex Fender, Brad Rees, Joe Eaton (2022) `Massive Graph Analytics `_ 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 @@ -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 `_ + Other Blogs ========================