TL;DR
Compute-in-SRAM architectures promise massive energy savings by eliminating the traditional separation between processor and memory, but real-world hardware evaluations remain rare. This paper presents a comprehensive evaluation of a commercial compute-in-SRAM device (the GSI APU), introducing an analytical framework and three data-layout optimizations. By applying these techniques to Retrieval-Augmented Generation (RAG), the authors match the performance of an NVIDIA A6000 GPU while slashing energy consumption by up to 117×.
What Problem Does This Paper Address?
As data-intensive workloads like Large Language Models (LLMs) scale, traditional architectures suffer from the "von Neumann bottleneck"—the energy and time spent endlessly moving data between the CPU/GPU and memory. Compute-in-Memory (CIM), particularly compute-in-SRAM, solves this by embedding processing elements directly inside the memory array.
However, most research in this space relies on architectural simulators or small academic prototypes. This leaves a massive gap in our understanding of how commercial, large-scale compute-in-SRAM hardware behaves under realistic workloads. Furthermore, these architectures utilize ultra-long vector registers where standard data layouts can inadvertently trigger severe internal routing bottlenecks, turning an "in-memory" accelerator back into a bandwidth-starved system.
Methods
The authors evaluate the GSI APU (Associative Processing Unit), a commercial general-purpose compute-in-SRAM chip featuring 2 million bit-processors embedded within 12T SRAM cells.
To systematically tackle the device's unique constraints, they developed:
- An Analytical Framework: A parameterizable latency model that maps data movement (DMA vs. Programmable I/O) and hardware-level bit-serial/bit-parallel operations to predict performance.
- Three Key Hardware Optimizations:
- Communication-Aware Reduction Mapping: Traditional vectorization unrolls loops spatially across a vector register, requiring expensive intra-vector reduction trees. The authors flip this, mapping reductions temporally across successive instructions to leverage fast, element-wise parallel operations.
- Coalesced DMA: Combines fragmented data transfers into single, bulk Direct Memory Access (DMA) transactions using hardware subgroup copying, minimizing transaction initiation overhead.
- Broadcast-Friendly Data Layouts: Restructures data dimensions and strides to minimize the size of the lookup tables required to broadcast scalar values across the massive vector arrays.
For large-scale workloads like RAG, the authors augmented the real APU measurements with a simulated High Bandwidth Memory (HBM2e) model to project performance on next-generation balanced hardware.
Datasets
The paper evaluates its framework and optimizations using two primary targets:
- The Phoenix Benchmark Suite: A collection of data-intensive MapReduce applications including Histogram, Linear Regression, Matrix Multiply, K-means, Reverse Index, String Match, and Word Count.
- Natural Questions (NQ) Dataset: Used to evaluate Exact Nearest Neighbor Search (ENNS) for Retrieval-Augmented Generation (RAG). The text embeddings were scaled across three corpus sizes: 10 GB, 50 GB, and 200 GB, and paired with a Llama 3.1-8B generative model.
Key Insights and Ideas
- "In-Memory" Doesn't Mean Bottleneck-Free: Even when computing directly inside memory arrays, poor data alignment can force the system to rely on slow, sequential Programmable I/O (PIO) rather than bulk DMA, destroying the architecture's inherent advantages.
- The Spatial vs. Temporal Flip: On standard CPUs/GPUs, spatial parallelization is king. In compute-in-SRAM, intra-vector register communication is highly restrictive. Mapping reductions temporally across time steps rather than spatially across the vector register yields massive speedups.
- Optimization Synergy: The proposed optimizations are highly interdependent. For example, changing the reduction mapping naturally results in a contiguous output layout, which is the exact prerequisite needed to unlock Coalesced DMA.
Key Results
- GPU Performance at 1% Energy: For RAG workloads over a 200 GB corpus, the optimized compute-in-SRAM system matched the end-to-end latency of an NVIDIA A6000 GPU while delivering a 54.4× to 117.9× reduction in energy consumption.
- CPU Speedups: The optimized APU accelerated the RAG retrieval stage by 4.8× to 6.6× over a highly optimized multi-threaded CPU baseline running FAISS with AVX512 primitives.
- Phoenix Benchmarks: The optimized hardware achieved an average 41.8× speedup over a single-threaded CPU and a 12.5× speedup over a 16-threaded CPU baseline.
- Model Accuracy: The authors' analytical framework proved highly accurate, predicting real hardware execution times with an average accuracy of 97.3%.
Limitations and Future Work
- Off-Chip Bandwidth Constraints: The current commercial GSI APU chip is bottlenecked by its legacy 23.8 GB/s DDR4 interface. The authors had to simulate an HBM2e memory subsystem to demonstrate the chip's true potential for large-scale RAG. Future commercial iterations must integrate higher-bandwidth off-chip memory.
- Algorithmic Sensitivity: Compute-in-SRAM excels at embarrassingly parallel, element-wise tasks (like String Match and K-means). However, algorithms that inherently require complex, fine-grained data shuffling (like Histogram or standard Matrix Multiplication) still face hardware routing bottlenecks that limit acceleration.
Summary updated