[论文解读] Mixed Precision Training of Convolutional Neural Networks using Integer Operations
本论文展示基于 INT16 的混合精度 CNN 训练在 ImageNet-1K 上,使用 Dynamic Fixed Point 方案和整数 FMA 内核,在 GP 硬件上实现或超越 FP32 精度,端到端训练吞吐量约提高 1.8x。
The state-of-the-art (SOTA) for mixed precision training is dominated by variants of low precision floating point operations, and in particular, FP16 accumulating into FP32 Micikevicius et al. (2017). On the other hand, while a lot of research has also happened in the domain of low and mixed-precision Integer training, these works either present results for non-SOTA networks (for instance only AlexNet for ImageNet-1K), or relatively small datasets (like CIFAR-10). In this work, we train state-of-the-art visual understanding neural networks on the ImageNet-1K dataset, with Integer operations on General Purpose (GP) hardware. In particular, we focus on Integer Fused-Multiply-and-Accumulate (FMA) operations which take two pairs of INT16 operands and accumulate results into an INT32 output.We propose a shared exponent representation of tensors and develop a Dynamic Fixed Point (DFP) scheme suitable for common neural network operations. The nuances of developing an efficient integer convolution kernel is examined, including methods to handle overflow of the INT32 accumulator. We implement CNN training for ResNet-50, GoogLeNet-v1, VGG-16 and AlexNet; and these networks achieve or exceed SOTA accuracy within the same number of iterations as their FP32 counterparts without any change in hyper-parameters and with a 1.8X improvement in end-to-end training throughput. To the best of our knowledge these results represent the first INT16 training results on GP hardware for ImageNet-1K dataset using SOTA CNNs and achieve highest reported accuracy using half-precision
研究动机与目标
- 展示在通用硬件上使用 INT16 整数运算训练最先进的 CNNs 于 ImageNet-1K。
- 开发用于神经网络训练的 Dynamic Fixed Point (DFP) 表示法,具有共享张量级全局指数。
- 设计高效的基于整数的卷积和 GEMM 内核;在各层之间管理溢出和缩放。
- 表明混合精度 INT16 训练在不改变超参数且带来吞吐量提升的情况下,与 FP32 精度相匹配或超越。
提出的方法
- 提出一种 Dynamic Fixed Point (DFP) 格式,具有每个张量的共享指数和 INT16 数据元素。
- 使用具有共享的 8 位带符号指数的 INT16 张量,通过整数 FMA 指令实现 GEMM/卷积运算。
- 使用基于最大值的缩放和多种舍入策略,从 DFP-32 降到 DFP-16 的实现。
- 在 INT32 中进行部分累积,偶尔使用 FP32 累积以防止在 FMA 链中溢出。
- 保留 FP32 权重主拷贝,同时使用 FP32 梯度更新;为下一层量化激活/权重,使用 DFP-16 基元。
实验结果
研究问题
- RQ1INT16 基混合精度训练在通用硬件上,能否在从头训练的 ImageNet-1K 上的“大型 CNN”达到或超过 FP32 精度?
- RQ2动态定点表示和共享指数对 CNN 训练的准确性与性能有何影响?
- RQ3使用整数 FMA 内核(如 AVX512_4VNNI)在前向/反向传播与权重更新中的潜在加速和硬件效率?
- RQ4如何在卷积和 GEMM 内核中管理溢出与缩放,以在训练期间保持数值稳定性?
主要发现
- DFP16 混合精度训练在 ImageNet-1K 的 ResNet-50、GoogLeNet-v1、VGG-16 和 AlexNet 上达到或超过 FP32 精度。
- ResNet-50 在 DFP16 下达到 75.77% Top-1 和 92.84% Top-5,超过 FP32 基线 75.70% Top-1 和 92.78% Top-5。
- 在测试硬件上,端到端的平均训练吞吐量比 FP32 提高 1.8x。
- 卷积内核:3x3 提速 1.8x,1x1 提速 1.4x;BatchNorm 提速 2x;ReLU/EltWise 与 BN 融合,提升内存带宽利用率。
- GoogLeNet-v1、VGG-16 和 AlexNet 在 INT16 训练下也达到了最先进的精度,且无需改动超参数。
- 展示在 GP 硬件上的 ImageNet-1K 的首批 INT16 CNN 训练结果,使用 SOTA CNN 并达到半精度表示下的最高报告精度。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。