Graph processing is a cornerstone of modern data analytics, powering everything from social network analysis to recommendation engines. However, traditional CPU and GPU architectures often struggle with the sparse and irregular nature of graph data, leading to the well-known "memory wall" problem. While Processing-in-Memory (PIM) using Resistive RAM (ReRAM) offers a promising solution by bringing computation closer to data, it introduces significant inter-cube communication overhead.
Published in IEEE Access, the paper "ReGra" introduces a novel ReRAM-based PIM accelerator designed specifically to minimize these communication bottlenecks and maximize traversal efficiency.
Overcoming the Communication Bottleneck
In multi-cube PIM systems, a large graph is partitioned across multiple memory units. During algorithms like Breadth-First Search (BFS), these units must frequently exchange vertex status updates. Conventional partitioning often leads to unbalanced workloads and irregular communication patterns, where some processing units stall while waiting for messages from overloaded neighbors.
ReGra addresses these challenges through a combination of intelligent data organization and structured communication, moving away from the unpredictable nature of standard PIM implementations.
The ReGra Methodology
The core of ReGra's efficiency lies in three primary innovations:
- Interval-Block Hash Balance (IBHB): To ensure a balanced workload, ReGra divides the graph into small blocks of consecutive vertex IDs. These blocks are hashed and distributed across processing cubes. This approach prevents "hotspots" and ensures that both vertices and edges are evenly spread across the hardware.
- Compact ReRAM Organization: ReGra utilizes a modified Compressed Sparse Row (CSR) format optimized for ReRAM crossbars. This allows the system to fetch all neighbors of a vertex in a single high-density read operation, significantly reducing access latency compared to traditional DRAM-based PIM.
- Circular Round Communication: Instead of asynchronous, unpredictable messaging, ReGra implements a structured, round-robin communication phase. Cubes batch their updates and transfer them in predictable rounds (e.g., Cube $i$ to Cube $i+1$). This structure allows the hardware to overlap computation with communication effectively.
Architectural Insights
Beyond the primary methods, the study revealed several critical insights for PIM design:
- Optimal Partitioning Granularity: The authors identified a "sweet spot" for partitioning, finding that dividing the graph into $4 \times N$ blocks (where $N$ is the number of cubes) optimized the trade-off between workload balance and the overhead of managing too many messages.
- Predictability over Immediacy: A counter-intuitive finding was that forcing communication into rigid rounds is more efficient than immediate, asynchronous messaging. This structure eliminates synchronization stalls and the overhead of frequent context switching.
- Area Efficiency: Due to the high density of ReRAM, the crossbars themselves occupy only 14.5% of the chip area, allowing for significant on-chip logic and cache buffers to manage the complex traversal logic.
Performance and Efficiency
The researchers evaluated ReGra against state-of-the-art PIM baselines like Tesseract (HMC-based) and RPBFS (ReRAM-based) using various real-world datasets from the SNAP collection, including social networks and road maps.
- Speedup: ReGra achieved up to a 2.2× speedup in BFS and 2.6× in Single Source Shortest Path (SSSP) compared to RPBFS.
- Communication Reduction: By optimizing the data layout and communication schedule, the system reduced inter-cube communication volume by an average of 60%, reaching up to 76% in the best cases.
- Energy Savings: The reduction in data movement translated directly into energy efficiency, with ReGra consuming 60-70% less energy than its predecessors.
Conclusion
ReGra demonstrates that the key to unlocking the potential of ReRAM-based PIM for graph processing is not just raw compute power, but the orchestration of data and communication. By prioritizing predictability and balance, ReGra offers a scalable path forward for large-scale graph analytics. While currently focused on static graphs, the principles of structured communication and balanced hashing lay the groundwork for future PIM architectures handling even more complex, dynamic datasets.
Summary updated