DeepGEMM:基于查找表在CPU架构上加速超低精度推理
DeepGEMM: Accelerated Ultra Low-Precision Inference on CPU Architectures using Lookup Tables
AI总结:
DeepGEMM通过查找表预计算权重与激活的乘积,在仅支持8位及以上精度的SIMD CPU硬件上高效执行超低精度卷积网络,2位实现相比QNNPACK 8位内核在x86平台最高加速1.74倍。
摘要:
近年来,超低位量化取得了大量进展,有望在边缘设备上显著改善延迟、内存占用和能耗。诸如Learned Step Size Quantization等量化方法即使采用亚字节量化,也能达到与全精度浮点基线相当的模型精度。然而,将这类超低位量化模型部署到主流CPU设备上极具挑战性,因为商用SIMD(Single Instruction, Multiple Data,单指令多数据)硬件通常支持不低于8位的精度。为克服这一限制,我们提出DeepGEMM,一种基于查找表的方法,用于在SIMD硬件上执行超低精度卷积神经网络。所提方法预先计算权重与激活的所有可能乘积,将其存储在查找表中,并在推理时高效访问,以避免代价高昂的乘累加运算。我们的2位实现在x86平台上相比QNNPACK框架中对应的8位整数内核,性能提升最高可达1.74倍。
英文摘要:
A lot of recent progress has been made in ultra low-bit quantization, promising significant improvements in latency, memory footprint and energy consumption on edge devices. Quantization methods such as Learned Step Size Quantization can achieve model accuracy that is comparable to full-precision floating-point baselines even with sub-byte quantization. However, it is extremely challenging to deploy these ultra low-bit quantized models on mainstream CPU devices because commodity SIMD (Single Instruction, Multiple Data) hardware typically supports no less than 8-bit precision. To overcome this limitation, we propose DeepGEMM, a lookup table based approach for the execution of ultra low-precision convolutional neural networks on SIMD hardware. The proposed method precomputes all possible products of weights and activations, stores them in a lookup table, and efficiently accesses them at inference time to avoid costly multiply-accumulate operations. Our 2-bit implementation outperforms corresponding 8-bit integer kernels in the QNNPACK framework by up to 1.74x on x86 platforms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。