FQA:一种面向硬件高效非线性激活函数分段近似的全空间量化驱动架构
FQA: A Full-Space Quantization-Driven Architecture for Hardware-Efficient Piecewise Approximation of Nonlinear Activation Functions
AI总结:
提出全空间量化驱动架构FQA,通过精确确定最优系数、解耦分数位宽和设计TBW加速方法,在减少分段数量的同时实现最优最大绝对误差,并显著降低Sigmoid函数硬件实现的面积和功耗。
摘要:
在本文中,我们提出了一种全空间量化驱动架构(FQA),用于硬件高效的非线性激活函数分段多项式近似(PPA)。FQA综合考虑了导致最优近似系数偏差的分数位截断误差和量化误差。关键的是,FQA能够精确确定并搜索最优系数的完整范围。基于所提出的FQA,我们开发了两种不同的硬件实现方案,以适应不同的资源-性能权衡。此外,我们解耦了计算过程中涉及的所有分数位长(FWL),以便探索更优的硬件架构。为了缓解量化空间扩大导致的软件计算时间增加,我们设计了一种名为TBW(目标引导二分窗口)的加速方法,以加速分段计算和搜索过程。实验结果表明,与现有架构相比,FQA能够在实现最优最大绝对误差(MAE)的同时显著减少所需分段数量。对于Sigmoid函数的硬件设计,与最先进的PPA架构相比,我们的方法在面积和功耗上实现了超过50%的降低。最后,我们提出了一个完整的在可配置硬件上部署PPA的设计流程,最大化现有硬件资源的利用率并最小化MAE。
英文摘要:
In this paper, we propose a full-space quantization-driven architecture (FQA) for the hardware-efficient piecewise polynomial approximations (PPAs) of nonlinear activation functions. FQA comprehensively considers both fractional-bit truncation error and quantization error that cause the deviation of the optimal approximation coefficients. Crucially, FQA can precisely determine and search the complete range of optimal coefficients. Based on the proposed FQA, we develop two distinct hardware implementation schemes to cater to different resource-performance trade-offs. Furthermore, we decouple all the fractional word lengths (FWLs) involved in the calculation process to enable the exploration of superior hardware architectures. To mitigate the increased software computation time caused by the expanded quantization space, we design an acceleration method named TBW (target-guided bisection window) to expedite the piecewise calculation and searching process. Experimental results demonstrate that, compared to existing architectures, FQA can significantly reduce the number of required segments while achieving the optimal Maximum Absolute Error (MAE). For the hardware design of the Sigmoid function, our approach achieves over 50% reduction in area and power consumption compared to the state-of-the-art PPA architecture. Finally, we present a complete design workflow for deploying PPA on configurable hardware, maximizing the utilization of existing hardware resources and minimizing MAE.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。