Abstract
Gunrock is a high-performance graph-processing library for GPUs that introduces a "frontier-centric" abstraction to simplify development without sacrificing speed. By decoupling high-level algorithm logic from low-level GPU optimizations like load balancing and kernel fusion, it achieves performance comparable to hand-tuned code while remaining as programmable as CPU-based frameworks.
Introduction
Graph analytics are notoriously difficult to accelerate on GPUs. Unlike dense linear algebra, graph workloads are "irregular": data access patterns are unpredictable, and control flow varies wildly depending on the graph's topology (e.g., a celebrity node in a social network having millions of edges while a typical user has only a few hundred).
Historically, developers faced a "performance-programmability" trade-off. One could write "hardwired" GPU code that was incredibly fast but took months to develop and didn't generalize, or use high-level frameworks that were easier to program but suffered from massive overhead and poor load balancing. Gunrock aims to solve this by providing a high-level API that automatically handles the "how" of GPU execution (scheduling, memory access, load balancing) so developers can focus on the "what" (the graph algorithm itself).
The Frontier-Centric Abstraction
The core of Gunrock is its data-centric abstraction focused on the frontier—the subset of vertices or edges currently active in a computation step. This differs from traditional message-passing or Gather-Apply-Scatter (GAS) models by treating the frontier as a first-class citizen, mapping graph problems directly onto the GPU’s strengths in data-parallel processing.
The system provides four primary operators that manipulate these frontiers:
- Advance: Moves from the current frontier to a new one by visiting neighbors.
- Filter: Prunes the frontier based on user-defined criteria (e.g., removing already-visited nodes).
- Compute: Performs a parallel operation on every element in the frontier.
- Segmented Intersection: Efficiently finds common neighbors, primarily for triangle counting.
GPU-Specific Optimizations
To ensure high performance, Gunrock integrates several sophisticated optimizations:
- Dynamic Load Balancing: It uses a hybrid strategy (TWC and merge-based partitioning) to ensure that threads aren't idling while others are bogged down by high-degree nodes.
- Push-Pull Traversal: It can dynamically switch between "pushing" updates to neighbors and "pulling" updates from predecessors, a technique that significantly speeds up traversal on power-law graphs.
- Kernel Fusion: Gunrock fuses multiple logical steps (like Advance and Filter) into a single GPU kernel to reduce expensive memory round-trips.
Evaluation and Results
The authors evaluated Gunrock across a diverse set of nine graphs, spanning real-world social networks (soc-orkut, soc-LiveJournal1), web crawls (indochina-04), and road maps (roadnet_USA), as well as synthetic benchmarks.
Key results include:
- Speed: Gunrock is consistently an order of magnitude faster than CPU-based libraries like Boost and PowerGraph.
- Competitive Performance: It achieves performance comparable to (and sometimes better than) the fastest known hand-optimized GPU implementations for BFS and SSSP.
- Efficiency: It maintains high "warp execution efficiency" (often >90%), meaning the GPU hardware is utilized effectively despite the irregular nature of the data.
- Scalability: The system scales sub-linearly with graph size; doubling the edges in a graph typically only increases runtime by ~1.68x.
Limitations and Future Work
While Gunrock represents a significant leap forward, it currently focuses on single-node execution and requires the entire graph to fit within the GPU's global memory. Future work includes expanding multi-GPU support, handling "streaming" graphs where edges are constantly added or deleted, and implementing automated compiler optimizations to generate fused kernels from high-level ASTs.
Summary updated