[Paper Review] Mixed-Precision Training and Compilation for RRAM-based Computing-in-Memory Accelerators
Introduces a mixed-precision quantization and reinforcement-learning–driven compiler framework (CIM-AQ) for RRAM CIM accelerators, achieving substantial latency reductions with minimal accuracy loss, and provides a CIM-capable MPQ compiler built on TVM with Brevitas as QAT backend.
Computing-in-Memory (CIM) accelerators are a promising solution for accelerating Machine Learning (ML) workloads, as they perform Matrix-Vector Multiplications (MVMs) on crossbar arrays directly in memory. Although the bit widths of the crossbar inputs and cells are very limited, most CIM compilers do not support quantization below 8 bit. As a result, a single MVM requires many compute cycles, and weights cannot be efficiently stored in a single crossbar cell. To address this problem, we propose a mixed-precision training and compilation framework for CIM architectures. The biggest challenge is the massive search space, that makes it difficult to find good quantization parameters. This is why we introduce a reinforcement learning-based strategy to find suitable quantization configurations that balance latency and accuracy. In the best case, our approach achieves up to a 2.48x speedup over existing state-of-the-art solutions, with an accuracy loss of only 0.086 %.
Motivation & Objective
- Motivate the need for low-precision quantization on RRAM CIM accelerators due to limited crossbar cell bit-width and DAC/ADC constraints.
- Propose a mixed-precision quantization and training framework (MPQ) tailored for CIM architectures to reduce latency.
- Develop a CIM-aware automated quantization (CIM-AQ) optimizer based on reinforcement learning to explore the MPQ search space efficiently.
- Create an MPQ-capable compiler that maps Brevitas-trained MPQ models to CIM targets within a TVM-based pipeline.
- Demonstrate latency improvements on standard CNN/vision models with controlled accuracy loss on ImageNet.
Proposed method
- Extend the Hardware-aware Automated Quantization (HAQ) framework to CIM targets, forming CIM-AQ which optimizes for latency-accuracy trade-offs on CIM hardware.
- Define a new reward function that targets a minimum accuracy acc_t = acc_8b - acc_loss while penalizing below-target accuracy and prioritizing latency reduction.
- Model CIM latency using crossbar parameters (M×N, cell precision, DAC precision, write and MVM times) and derive a per-layer and per-configuration latency estimate.
- Use MPQ with Brevitas as the QAT backend to enable a wider range of network layers (including transformers) and accelerate RL-based optimization.
- Develop a CIM-oriented compiler on TVM: convert QAT-trained models to ONNX, apply QDQ-style quantization, perform graph transformations (QNNFuse), and partition workloads between CPU and CIM with custom lowering and staging buffers.
- Incorporate a weight-stationary dataflow and layer-wise axis-labeled scheduling to optimize crossbar utilization and minimize writes.
Experimental results
Research questions
- RQ1How can mixed-precision quantization be effectively learned for CIM targets to minimize latency while maintaining target accuracy?
- RQ2What are the best CIM-specific constraints or strategies to guide the search for MPQ parameters (e.g., activation/weight bit widths, cell resolution) for latency-optimized inference?
- RQ3Can a unified CIM-aware reinforcement learning optimizer (CIM-AQ) outperform fixed-8-bit CIM quantization in terms of speedup and accuracy on representative networks?
- RQ4How can Brevitas be integrated into a CIM-focused RL optimization loop to broaden network support and improve runtime performance?
- RQ5What is the effectiveness of a TVM-based CIM compiler in mapping MPQ models to RRAM CIM hardware for CNNs and transformers?
- RQ6How do different crossbar configurations (cell resolution, crossbar size) impact the latency-accuracy trade-off under MPQ?
Key findings
- The framework achieves up to 2.48× speedup over8-bit CIM baselines with an accuracy loss of 0.086%.
- CIM-AQ enables mixed-precision optimization for diverse architectures including transformers, and is approximately 8% faster than previous HAQ-based optimization on GPUs for RL training.
- Activation bit widths are often quantized more aggressively than weights in CIM, driven by latency considerations.
- Constraining the MPQ search space (input/output, weight, or both constraints) improves the speed/accuracy trade-off as measured by an S/AL score, with combined constraints yielding the best results for ResNet-18.
- For ViT-B/32, the MPQ approach yields substantial speedups across layers with acceptable accuracy loss, and across all models tested, speedups of at least 2.20× were observed.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.