Convolutional network quantization method based on in-memory computation

SANG Xianzhen, LI Min, CHENG Hu, WEI Jinghe, ZHAO Wei, WANG Zhengxing

Integrated Circuits and Embedded Systems ›› 2025, Vol. 25 ›› Issue (4) : 30-38.

PDF(6338 KB)
PDF(6338 KB)
Integrated Circuits and Embedded Systems ›› 2025, Vol. 25 ›› Issue (4) : 30-38. DOI: 10.20193/j.ices2097-4191.2024.0087
Research Paper

Convolutional network quantization method based on in-memory computation

Author information +
History +

Abstract

This paper presents a quantization method for convolutional networks based on in-memory computation, to address the network performance degradation typically caused by statistical methods used for calculating analog-to-digital conversion coefficients when deployed on in-memory computing circuits. This method first quantifies the activation values and weight coefficients of the convolutional layer. Then, based on the characteristics of the single Tile data stream in the in-memory computing circuits, we design an analog-to-digital conversion coefficient quantization network. Afterwards, a method based on KL divergence is developed to calculate the analog-to-digital conversion coefficients. Finally, the analog-to-digital conversion coefficients are mapped to conductance values and fused with the activation values and weight quantization coefficients in the convolutional layer. These values are then converted into shift and fixed-point multiplication forms to achieve the deployment of inference in the in-memory computing circuit of the convolutional network. The software simulation rusults show that compared with other methods for calculating analog-to-digital conversion coefficients, the designed quantization method results in less performance degradation and is suitable for multi-bit width mixed quantization in convolutional networks. Due to the software simulation fully simulating the data flow process of in memory computing circuits, the proposed method can be applied in engineering implementations on in-memory computing circuits.

Key words

in-memory computation / convolutional network / analog to digital conversion coefficient / quantitative deployment

Cite this article

Download Citations
SANG Xianzhen , LI Min , CHENG Hu , et al . Convolutional network quantization method based on in-memory computation[J]. Integrated Circuits and Embedded Systems. 2025, 25(4): 30-38 https://doi.org/10.20193/j.ices2097-4191.2024.0087

References

[1]
HAO X, WANG L, ZHANG Y, et al. A review of convolutional neural networks in computer vision[J]. Artifcial Intelligence Review, 2024, 57(99):1-43.
[2]
SUN Z, KVATINSKY S, SI X, et al. A full spectrum of computing-in-memory technologies[J]. Nature Electronics, 2023(6):823-835.
[3]
LIU J, HUANG K. A novel scheme to map convolutional networks to Network-on-Chip with Computing-In-Memory nodes[C]//2020 International SoC Design Conference (ISOCC),2020:126-127.
[4]
LIU Y Y, GAO B, TANG J S, et al. Architecture-circuit-technology co-optimization for resistive random access memory-based computation-in-memory chips[J]. Science China Information Sciences, 2023,66:1-10.
[5]
杨茜, 王远博, 王承智, 等. 基于MRAM的新型存内计算范式[J]. 集成电路与嵌入式系统, 2024, 24(6):29-40.
Abstract
存内计算(CIM,Computing-in Memory)是一种为缓解“内存墙”和“功耗墙”而出现的新兴架构。因CPU处理器和存储器速度发展不均衡性,冯·诺依曼架构这类中央处理器与存储器分离的结构逐渐失去其优越性。存内计算提出以计算和存储相结合的方式来减少数据的搬移,极大地提升了计算效率。MRAM作为最有潜力的新一代非易失存储器件,被视为构建高效存内计算架构的有力候选者。以MRAM为基础构建的存内计算根据计算过程的不同可分为MRAM模拟存内计算和MRAM数字存内计算。数字存内计算又可以根据数字逻辑产生的方式分为MRAM写入式存内计算、MRAM读取式存内计算以及MRAM近存计算。MRAM模拟存内计算利用高并行度摊销能耗,在单位面积上,吞吐量和能效都具有数字存内计算无法比拟的优势,但也因其易受PVT影响等特征在实际应用中有所限制。MRAM数字存内计算实现方式多样,写入式存内计算几乎消除了存储器外的数据搬移,虽然当前工艺下的MRAM所需的翻转能耗和时延过大,导致该方式一直停留在仿真阶段,但不妨碍该存内计算是缓解“内存墙”最有效的手段之一;读取式存内计算严重依赖于读取放大器的功能设计,在相关领域有所发展,但所受限制较大;近存计算是当前MRAM非易失器件和CMOS电路在计算速度和计算能效差异较大的情况下,融合两者优势的优解,在实际应用中具有巨大的益处。
YANG X, WANG Y B, WANG C Z, et al. Novel computing-in memory methodology based on MRAM[J]. Integrated Circuits and Embedded Systems, 2024, 24(6):29-40 (in Chinese).
[6]
NING H K, YU Z H, ZHANG Q T, et al. An in-memory computing architecture based on a duplex two-dimensional material structure for in situ machine learning[J]. Nature Nanotechnology, 2023,18:493-500.
[7]
黄合磊, 佴宇飞, 虞致国, 等. 基于开关电容放大器的低面积开销ADC[J]. 电子与封装, 2023, 23(8):080301.
HUANG H L, NAI Y F, YU Z G, et al. Area-efficient ADC based on switched-capacitor amplifier[J]. Electronics & Packaging, 2023, 23(8):080301 (in Chinese).
[8]
WANG M Z, SSUN H X, SHI J, et al. Q-YOLO: Efficient inference for Real-time object detection[C]//The 7th Asian Conference on Pattern Recognition (ACPR 2023),2023:307-321.
[9]
KRESTINSKAYA O, ZHANG L, SALAMA K N. Towards efficient In-memory computing hardware for quantized neural networks:State-of-the-art, open challenges and perspectives[J]. IEEE Transactions on Nanotechnology, 2023,22:377-386.
[10]
WAN W E, KUBENDRAN R, SCHAEFER C, et al. A compute-in-memory chip based on resistive random-access memory[J]. Nature, 2022,608:504-512.
[11]
郭文斌, 汪泽清, 吴祖恒, 等. 忆阻器基神经形态计算器件与系统研究进展[J]. 电子与封装, 2024, 24(4):040401.
GUO W B, WANG Z Q, WU Z H, et al. Research progress of memristor-based neuromorphic computing devices and systems[J]. Electronics & Packaging, 2024, 24(4):040401 (in Chinese).
[12]
WANG J, WANG X, ECKERT C, et al. A 28-nm compute sram with bit-serial logic/arithmetic operations for programmable in-memory vector computing[J]. IEEE Journal of Solid-State Circuits, 2019, 55(1):76-86.
[13]
唐成峰, 胡炜. 应用于忆阻器阵列存内计算的低延时低能耗新型感知放大器[J]. 微电子学与计算机, 2024, 41(2):58-66.
TANG C F, HU W. A multi-bit current-mode sense amplifier with delay-power optimization for computing-in-memory of memristor arrays[J]. Microelec- tronics & Computer, 2024, 41(2):58-66 (in Chinese).
[14]
KRESTINSKAYA O, ZHANG L, SALAMA K N. Towards Effcient RRAM-based Quantized Neural Networks Hardware: State-of-the-art and Open Issues[C]// 2022 IEEE 22nd International Conference on Nanotechnology (NANO),2022: 465-468.
[15]
VANHOUCKE V, SENIOR A, MAO M Z. Improving the speed of neural networks on cpus[C]// In deep learning and unsupervised feature learning workshop, NIPS,2011:1-8.
[16]
NAGEL M, BAALEN M V, BLANKEVOORT T, et al. Data-free quantization through weight equalization and bias correction[C]// In Proceedings of the IEEE International Conference on Computer Vision,2019:1325-1334.
[17]
MCKINSTRY J L, ESSER S K, APPUSWAMY R, et al. Discovering low-precision networks close to full-precision networks for efficient embedded inference[C]// arXiv preprint arXiv:1809.04191,2018.
[18]
陈畅, 黄均才, 刘鉴栋, 等. 卷积神经网络定点化设计及FPGA实现[J]. 集成电路与嵌入式系统, 2022, 22(2):41-45.
Abstract
卷积神经网络优异的性能使其在图像处理领域占有重要地位, 然而模型的实际应用多依赖于GPU, 难以部署在对功耗敏感的嵌入式设备上。为了使模型能够高效部署在以FPGA为基础的平台上, 本文提出一种卷积神经网络定点化方法, 以数据精度与资源消耗为设计指标, 根据模型中数据分布的统计以及数据类型的划分, 确定不同的定点化策略, 并给出了不同量化方法与溢出模式和硬件资源消耗的关系。使用Xilinx定点化库进行测试, 实验结果表明, 使用16位定点数对模型进行统一量化, 能够在较小的精度损失下降低硬件资源消耗, 且不同的量化模式下硬件资源消耗相同, 不同的溢出模式下硬件资源消耗区别较大。
CHEN C, HUANG J C, LIU J D, et al. Fixed-point Design of Convolutional Neural Network and FPGA Implementation for Substation Video Surveillance[J]. Integrated Circuits and Embedded Systems, 2022, 22(2):41-45 (in Chinese).
[19]
SAKR C, DAI S, VENKATESAN R, et al. Optimal clipping and magnitude aware differentiation for improved quantization-aware training[C]// arXiv:2206.06501,2022.
[20]
HE K M, ZHANG X, REN S, et al. Deep residual learning for image recognition[C]// 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR),2016:770-778.
PDF(6338 KB)

Accesses

Citation

Detail

Sections
Recommended

/

〈 〉