Abstract
Deploying deep neural networks (DNNs) on resource-constrained edge devices requires balancing high performance with strict energy and latency limits. Resistive Random-Access Memory (RRAM) based Computing-in-Memory (CIM) architectures offer a solution to the "memory wall" by performing computations directly within memory arrays. However, mapping efficient, mobile-friendly architectures like MobileNetV3 onto RRAM crossbars remains a significant challenge due to low hardware utilization. This paper introduces RNC, a co-design framework that integrates a specialized edge compiler with RRAM-aware Neural Architecture Search (NAS). By treating hardware mapping as a bin-packing problem and optimizing for depthwise convolutions, RNC achieves up to 30x speedups and over 80% hardware utilization, significantly bridging the gap between mobile AI and RRAM accelerators.
Introduction
The demand for sophisticated AI on edge devices—such as wearables, smart sensors, and autonomous drones—is growing rapidly. These devices are often constrained by limited battery life and the need for real-time processing. Traditional von Neumann architectures, which separate processing units from memory, suffer from the "memory wall," where the energy cost of moving data exceeds the cost of computation itself.
Computing-in-Memory (CIM) using RRAM is a transformative alternative. By using RRAM crossbar arrays to perform matrix-vector multiplications in the analog domain, CIM minimizes data movement. Despite this potential, a significant gap exists: modern, efficient neural networks often use depthwise convolutions that do not map cleanly onto the rigid, grid-like structure of RRAM crossbars. This mismatch leads to fragmented hardware usage and sub-optimal performance.
The Mapping Challenge: Depthwise Convolutions
Mobile-friendly architectures like MobileNetV3 rely heavily on depthwise separable convolutions to reduce parameters and FLOPs. However, in an RRAM context, these layers are "crossbar-unfriendly." Unlike standard convolutions, depthwise layers do not share inputs across channels, meaning they cannot effectively fill the rows and columns of a standard RRAM crossbar. Previous mapping strategies often resulted in hardware utilization as low as 45%, wasting precious silicon area and increasing latency.
The RNC Framework
RNC addresses these inefficiencies through a two-pronged approach: an RRAM-optimized Edge Compiler and a hardware-aware NAS.
1. The Edge Compiler
The RNC compiler introduces three key innovations to optimize the mapping of DNNs to RRAM:
- Layer Partitioning with Depth Splitting: RNC flattens weights into 2D "boxes." For depthwise convolutions, it introduces a "depth split factor" ($S_{DW}$). This allows the compiler to tune how many channels are processed per hardware cycle, balancing the trade-off between execution speed and physical area.
- Layer Box Duplication: To ensure a balanced pipeline, RNC identifies bottleneck layers—those that take the most cycles to compute—and duplicates their weight boxes across multiple crossbars. This increases parallelism and prevents a single slow layer from stalling the entire network.
- Global Bin-Packing: Rather than mapping layers in isolation, RNC treats the entire hardware layout as a Bin-Packing Problem (BPP). Using heuristics like Empty Maximal Space (EMS) and Deepest-First-Then-Right-most-Corner (DFTRC), the compiler packs multiple layer boxes into RRAM crossbars with high density, maximizing utilization.
2. RRAM-aware NAS
To find the best architecture for a specific RRAM chip, RNC employs a "one-shot supernet" NAS. The framework trains a large supernet containing various sub-architectures. It then uses the NSGA-II genetic algorithm to search for "Pareto-optimal" models. Crucially, the search is guided by precise feedback from the RNC compiler and a cycle-accurate simulator, ensuring that the selected models are optimized for actual hardware metrics (latency and crossbar count) rather than just theoretical FLOPs.
Experimental Results
The researchers evaluated RNC using CIFAR-10 and standard architectures including ResNet18, Squeezenet, and MobileNetV3.
- Hardware Efficiency: RNC achieved over 80% crossbar utilization for Squeezenet and MobileNetV3, nearly doubling the efficiency of traditional ISAAC-like mapping techniques.
- Performance Gains: The combination of the optimized compiler and NAS-generated architectures resulted in speedups ranging from 5x to 30x compared to baseline mapping methods.
- Accuracy and Robustness: NAS-optimized models were 2-3% more accurate than manually designed baselines under identical hardware constraints. Furthermore, RNC demonstrated superior robustness; it successfully mapped models even when hardware resources were reduced to 80% of the baseline, a scenario where traditional methods failed to find a valid mapping.
Conclusion
RNC demonstrates that the key to unlocking the potential of RRAM-based CIM for edge AI lies in the tight integration of compilation and architecture search. By rethinking layer mapping as a geometric packing problem and incorporating hardware-specific constraints into the NAS loop, RNC enables the deployment of high-performance, mobile-friendly DNNs on resource-constrained hardware. Future work will look toward addressing peripheral circuit noise and extending these techniques to other emerging memory technologies.
Summary updated