{"id":13424533,"url":"https://github.com/gunrock/gunrock","last_synced_at":"2026-01-18T00:28:12.895Z","repository":{"id":11589311,"uuid":"14079956","full_name":"gunrock/gunrock","owner":"gunrock","description":"Programmable CUDA/C++ GPU Graph Analytics","archived":false,"fork":false,"pushed_at":"2024-07-30T16:23:36.000Z","size":78244,"stargazers_count":1017,"open_issues_count":171,"forks_count":205,"subscribers_count":75,"default_branch":"main","last_synced_at":"2025-04-12T08:23:48.194Z","etag":null,"topics":["algorithm","algorithms","cpp","cuda","cxx","essentials","gnn","gpu","graph","graph-algorithms","graph-analytics","graph-engine","graph-neural-networks","graph-primitives","graph-processing","gunrock","hpc","parallel-computing","sparse-matrix"],"latest_commit_sha":null,"homepage":"https://gunrock.github.io/gunrock/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gunrock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2013-11-03T04:08:40.000Z","updated_at":"2025-04-05T01:17:21.000Z","dependencies_parsed_at":"2023-02-12T18:30:46.556Z","dependency_job_id":"8751951b-660f-4d79-85d8-e58a348a8d85","html_url":"https://github.com/gunrock/gunrock","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fgunrock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fgunrock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fgunrock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gunrock%2Fgunrock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gunrock","download_url":"https://codeload.github.com/gunrock/gunrock/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442854,"owners_count":22071878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","algorithms","cpp","cuda","cxx","essentials","gnn","gpu","graph","graph-algorithms","graph-analytics","graph-engine","graph-neural-networks","graph-primitives","graph-processing","gunrock","hpc","parallel-computing","sparse-matrix"],"created_at":"2024-07-31T00:00:55.761Z","updated_at":"2026-01-18T00:28:12.885Z","avatar_url":"https://github.com/gunrock.png","language":"C++","funding_links":[],"categories":["Cuda"],"sub_categories":[],"readme":"# Gunrock: CUDA/C++ GPU Graph Analytics\n[![Ubuntu](https://github.com/gunrock/gunrock/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/gunrock/gunrock/actions/workflows/ubuntu.yml) [![Windows](https://github.com/gunrock/gunrock/actions/workflows/windows.yml/badge.svg)](https://github.com/gunrock/gunrock/actions/workflows/windows.yml) [![Code Quality](https://github.com/gunrock/gunrock/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/gunrock/gunrock/actions/workflows/codeql-analysis.yml) [![Documentation](https://github.com/gunrock/gunrock/actions/workflows/pages.yml/badge.svg)](https://github.com/gunrock/gunrock/actions/workflows/pages.yml)\n\n| [**Examples**](https://github.com/gunrock/gunrock/tree/main/examples/algorithms) | [**Project Template**](https://github.com/gunrock/template) | [**Documentation**](https://gunrock.github.io/gunrock/) | [**Deprecated Documentation**](https://gunrock.github.io/docs/#/) | [**GitHub Actions**](https://github.com/gunrock/gunrock/actions) |\n|--------------|----------------------|-------------------|-------------------|---------------|\n\n**Gunrock**[^1] is a CUDA library for graph-processing designed specifically for the GPU. It uses a **high-level**, **bulk-synchronous/asynchronous**, **data-centric abstraction** focused on operations on vertex or edge frontiers. Gunrock achieves a balance between performance and expressiveness by coupling high-performance GPU computing primitives and optimization strategies, particularly in the area of fine-grained load balancing, with a high-level programming model that allows programmers to quickly develop new graph primitives that scale from one to many GPUs on a node with small code size and minimal GPU programming knowledge.\n\n| Branch    | Purpose                                                                                                                            | Version        | Status     |\n|-----------|------------------------------------------------------------------------------------------------------------------------------------|----------------|------------|\n| `main`    | Default branch, ported from [`gunrock/essentials`](https://github.com/gunrock/essentials), serves as the official release branch.  | $\\geq$ `2.x.x` | Active     |\n| `master`  | Previous release branch for `gunrock/gunrock` version `1.x.x` interface, preserves all commit history.                             | $\\leq$ `1.x.x` | Deprecated |\n\n\n## Quick Start Guide\nBefore building Gunrock make sure you have **CUDA Toolkit (NVIDIA)** or **ROCm/HIP (AMD)**[^2] installed on your system. Other external dependencies such as `thrust`, `cub`, etc. are automatically fetched using `cmake`.\n\n\u003e [!WARNING]\n\u003e We're working on downloading other rocm dependencies automatically as well, for now you may have to also install rocprim-dev, rocthrust-dev, hipcub-dev, hiprand-dev, hipsparse-dev, rocrand and roctracer. All of them typically gets installed with ROCm.\n\n```shell\ngit clone https://github.com/gunrock/gunrock.git\ncd gunrock\nmkdir build \u0026\u0026 cd build\n# For [AMD] MI350 or MI355 (or adjust the CMAKE_HIP_ARCHITECTURES for your GPU)\ncmake -DCMAKE_BUILD_TYPE=Release -DESSENTIALS_AMD_BACKEND=ON -DESSENTIALS_NVIDIA_BACKEND=OFF -DCMAKE_HIP_ARCHITECTURES=gfx950 .. \n# For [NVIDIA] H100 (or adjust the CMAKE_CUDA_ARCHITECTURES for your GPU)\ncmake -DCMAKE_BUILD_TYPE=Release -DESSENTIALS_AMD_BACKEND=OFF -DESSENTIALS_NVIDIA_BACKEND=ON -DCMAKE_CUDA_ARCHITECTURES=90 .. \nmake sssp # or for all algorithms, use: make -j$(nproc)\nbin/sssp --market ../datasets/chesapeake/chesapeake.mtx\n```\n\n## Implementing Graph Algorithms\nFor a detailed explanation, please see the full [documentation](https://github.com/gunrock/gunrock/wiki/How-to-write-a-new-graph-algorithm). The following example shows simple APIs using Gunrock's data-centric, bulk-synchronous programming model, we implement Breadth-First Search on GPUs. This example skips the setup phase of creating a `problem_t` and `enactor_t` struct and jumps straight into the actual algorithm.\n\nWe first prepare our frontier with the initial source vertex to begin\npush-based BFS traversal. A simple `f-\u003epush_back(source)` places\nthe initial vertex we will use for our first iteration.\n```cpp\nvoid prepare_frontier(frontier_t* f,\n                      gcuda::multi_context_t\u0026 context) override {\n  auto P = this-\u003eget_problem();\n  f-\u003epush_back(P-\u003eparam.single_source);\n}\n```\nWe then begin our iterative loop, which iterates until a convergence condition has been met. If no condition has been specified, the loop converges when the frontier is empty.\n```cpp\nvoid loop(gcuda::multi_context_t\u0026 context) override {\n  auto E = this-\u003eget_enactor();   // Pointer to enactor interface.\n  auto P = this-\u003eget_problem();   // Pointer to problem (data) interface.\n  auto G = P-\u003eget_graph();        // Graph that we are processing.\n\n  auto single_source = P-\u003eparam.single_source;  // Initial source node.\n  auto distances = P-\u003eresult.distances;         // Distances array for BFS.\n  auto visited = P-\u003evisited.data().get();       // Visited map.\n  auto iteration = this-\u003eiteration;             // Iteration we are on.\n\n  // Following lambda expression is applied on every source,\n  // neighbor, edge, weight tuple during the traversal.\n  // Our intent here is to find and update the minimum distance when found.\n  // And return which neighbor goes in the output frontier after traversal.\n  auto search = [=] __host__ __device__(\n                      vertex_t const\u0026 source,    // ... source\n                      vertex_t const\u0026 neighbor,  // neighbor\n                      edge_t const\u0026 edge,        // edge\n                      weight_t const\u0026 weight     // weight (tuple).\n                      ) -\u003e bool {\n    auto old_distance =\n      math::atomic::min(\u0026distances[neighbor], iteration + 1);\n    return (iteration + 1 \u003c old_distance);\n  };\n\n  // Execute advance operator on the search lambda expression.\n  // Uses load_balance_t::block_mapped algorithm (try others for perf. tuning.)\n  operators::advance::execute\u003coperators::load_balance_t::block_mapped\u003e(\n    G, E, search, context);\n}\n```\n[include/gunrock/algorithms/bfs.hxx](include/gunrock/algorithms/bfs.hxx)\n\n## How to Cite Gunrock \u0026 Essentials\nThank you for citing our work.\n\n```bibtex\n@article{Wang:2017:GGG,\n  author =\t {Yangzihao Wang and Yuechao Pan and Andrew Davidson\n                  and Yuduo Wu and Carl Yang and Leyuan Wang and\n                  Muhammad Osama and Chenshan Yuan and Weitang Liu and\n                  Andy T. Riffel and John D. Owens},\n  title =\t {{G}unrock: {GPU} Graph Analytics},\n  journal =\t {ACM Transactions on Parallel Computing},\n  year =\t 2017,\n  volume =\t 4,\n  number =\t 1,\n  month =\t aug,\n  pages =\t {3:1--3:49},\n  doi =\t\t {10.1145/3108140},\n  ee =\t\t {http://arxiv.org/abs/1701.01170},\n  acmauthorize = {https://dl.acm.org/doi/10.1145/3108140?cid=81100458295},\n  url =\t\t {http://escholarship.org/uc/item/9gj6r1dj},\n  code =\t {https://github.com/gunrock/gunrock},\n  ucdcite =\t {a115},\n}\n```\n\n```bibtex\n@InProceedings{Osama:2022:EOP,\n  author =\t {Muhammad Osama and Serban D. Porumbescu and John D. Owens},\n  title =\t {Essentials of Parallel Graph Analytics},\n  booktitle =\t {Proceedings of the Workshop on Graphs,\n                  Architectures, Programming, and Learning},\n  year =\t 2022,\n  series =\t {GrAPL 2022},\n  month =\t may,\n  pages =\t {314--317},\n  doi =\t\t {10.1109/IPDPSW55747.2022.00061},\n  url =          {https://escholarship.org/uc/item/2p19z28q},\n}\n```\n\n## Copyright \u0026 License\n\nGunrock is copyright The Regents of the University of California. The library, examples, and all source code are released under [Apache 2.0](https://github.com/gunrock/gunrock/blob/main/LICENSE).\n\n[^1]: This repository has been moved from https://github.com/gunrock/essentials and the previous history is preserved with tags and under `master` branch. Read more about gunrock and essentials in our vision paper: [Essentials of Parallel Graph Analytics](https://escholarship.org/content/qt2p19z28q/qt2p19z28q_noSplash_38a658bccc817ba025517311a776840f.pdf).\n[^2]: Recommended **CUDA v12.4 or higher** and **ROCm 6.4 or higher**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunrock%2Fgunrock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgunrock%2Fgunrock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgunrock%2Fgunrock/lists"}