TL;DR
Researchers from Georgia Tech have developed a novel "block-wise" allocation strategy for Compute In-Memory (CIM) accelerators that overcomes the performance bottlenecks caused by non-deterministic workloads. By using input data statistics to predict and balance the processing load across memory arrays, they achieved a 7.47× performance improvement on ResNet18 compared to traditional allocation methods.
What Problem Does This Paper Address?
Compute In-Memory (CIM) is a hardware paradigm designed to kill the "memory wall." Instead of moving data between a processor and memory (which consumes the bulk of energy in AI tasks), CIM performs calculations—specifically matrix-vector multiplications—directly inside the memory crossbar using physical laws (Ohm’s Law and Kirchhoff’s Law).
However, CIM has a "rigidity" problem. Unlike standard CPUs or GPUs, CIM weights are often stored in non-volatile memory (eNVM) like RRAM, which is expensive to rewrite. This means weights are effectively "frozen" in place.
The challenge arises with zero-skipping, a technique that speeds up computation by skipping rows where the input is zero. Because the distribution of zeros in a neural network is random and dynamic, some memory arrays finish their work much faster than others. In current designs, the fast arrays must sit idle, waiting for the slowest array to finish before the next step can begin. These "synchronization barriers" lead to poor hardware utilization and wasted performance.
Methods
The authors propose moving away from "weight-based" allocation (where you just give every layer an equal number of resources) to a Performance-based Block-wise Allocation.
- Profiling Input Statistics: The team discovered a linear relationship between the percentage of "1s" in input data and the number of cycles an array takes to finish. By profiling typical activations (e.g., on a GPU beforehand), they can predict which parts of a neural network will be "slow" or "fast."
- Block-wise Allocation: Instead of duplicating entire layers of a neural network, they break layers down into "blocks" (minimal deterministic compute units). They then use a linear-time algorithm to allocate redundant hardware arrays specifically to the "slowest" blocks.
- Flexible Data Flow: To make this work, they moved away from rigid hardware mapping. They implemented a packetized data flow where each block has a unique ID. Partial sums are routed to accumulators based on destination addresses in the data packets, allowing blocks to function as generalized compute units rather than being hard-wired to a specific neighbor.
Datasets
The researchers evaluated their approach using two standard deep learning benchmarks:
- ResNet18 trained on the ImageNet dataset.
- VGG11 trained on the CIFAR10 dataset.
These were tested using a custom cycle-accurate simulator that models RRAM and CMOS components.
Key Insights and Ideas
- The Sparsity Trap: While zero-skipping is intended to save time, in a rigid CIM architecture, it actually creates "bubbles" of inactivity. The slowest block dictates the speed of the entire system.
- Predictable Latency: Even though neural network activations are dynamic, their statistical distribution is remarkably stable. This allows for "static" hardware allocation that performs well on "dynamic" data.
- Granularity Matters: Moving the allocation strategy from the "layer level" to the "block level" is the key. Within a single layer, different blocks might see different input features, causing a 12% to 27% difference in cycle time between blocks that were previously treated as identical.
Key Results
The "Block-wise" approach significantly outperformed all baselines:
- ResNet18: Achieved a 7.47× speedup over the baseline (no zero-skipping) and a 29% improvement over the best previous layer-wise allocation method.
- VGG11: Achieved a 7.04× speedup over the baseline.
- Utilization: As shown in the paper's charts, the block-wise method maintains high array utilization (often above 80-90%) across almost all layers of the network, whereas weight-based methods see utilization tank in later layers.
Limitations and Future Work
- Profiling Dependency: The method relies on having representative input data to profile the network before hardware allocation. If the real-world data differs significantly from the profiling data, the allocation might become sub-optimal.
- Hardware Overhead: The flexible "block-wise" data flow requires more complex routing and packet-handling logic (routers and buffers) compared to a simple, rigid systolic array.
- Write Energy: The paper assumes an "inference-only" scenario where weights are rarely changed due to the high energy cost of writing to eNVM. Future work might explore how to handle "on-device learning" where weights are updated more frequently.
Summary updated