arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2209.04161cs.ARcs.AIcs.LG
收藏

ApproxTrain:用于DNN训练和推理的近似乘子的快速模拟

ApproxTrain: Fast Simulation of Approximate Multipliers for DNN Training and Inference

UNSW Sydney(悉尼新南威尔士大学);University of Notre Dame(圣母大学);Garvan Institute of Medical Research(加文医学研究所);AMD(超威半导体)

Jing Gong, Hassaan Saadat, Hasindu Gamaarachchi, Haris Javaid, Xiaobo Sharon Hu, Sri Parameswaran

摘要:

深度神经网络(DNN)的边缘训练是连续学习的理想目标;然而,它受到训练所需的巨大计算能力的阻碍。硬件近似乘法器在DNN推理加速器中显示出其获得资源效率的有效性;然而,使用近似乘法器进行训练在很大程度上尚未探索。为了构建具有支持DNN训练的近似乘法器的资源高效加速器,需要对不同DNN架构和不同近似乘法器的训练收敛性和准确性进行全面评估。本文介绍了ApproxTrain,这是一个开源框架,允许使用模拟近似乘法器快速评估DNN训练和推理。ApproxTrain与TensorFlow(TF)一样用户友好,只需要DNN架构的高级描述以及近似乘法器的C/C++功能模型。我们通过使用一种新的基于LUT的近似浮点(FP)乘法器模拟器在GPU(AMSim),提高了在乘法器级的模拟速度。ApproxTrain利用CUDA并有效地将AMSim集成到TensorFlow库中,以克服商业GPU中缺乏原生硬件近似乘法器的问题。我们使用ApproxTrain来评估DNN训练的收敛性和准确性,其中使用LeNets和ResNets架构的小型和大型数据集(包括ImageNet)的近似乘法器。评估表明,与FP 32和bfloat 16乘法器相比,收敛行为相似,测试精度变化可忽略不计。与基于CPU的近似乘法器模拟相比,GPU加速的ApproxTrain的训练和推理速度快2500倍以上。基于高度优化的闭源cuDNN/cuBLAS库和原生硬件乘法器,原始TensorFlow仅比ApproxTrain快8倍。

英文摘要:

Edge training of Deep Neural Networks (DNNs) is a desirable goal for continuous learning; however, it is hindered by the enormous computational power required by training. Hardware approximate multipliers have shown their effectiveness for gaining resource-efficiency in DNN inference accelerators; however, training with approximate multipliers is largely unexplored. To build resource efficient accelerators with approximate multipliers supporting DNN training, a thorough evaluation of training convergence and accuracy for different DNN architectures and different approximate multipliers is needed. This paper presents ApproxTrain, an open-source framework that allows fast evaluation of DNN training and inference using simulated approximate multipliers. ApproxTrain is as user-friendly as TensorFlow (TF) and requires only a high-level description of a DNN architecture along with C/C++ functional models of the approximate multiplier. We improve the speed of the simulation at the multiplier level by using a novel LUT-based approximate floating-point (FP) multiplier simulator on GPU (AMSim). ApproxTrain leverages CUDA and efficiently integrates AMSim into the TensorFlow library, in order to overcome the absence of native hardware approximate multiplier in commercial GPUs. We use ApproxTrain to evaluate the convergence and accuracy of DNN training with approximate multipliers for small and large datasets (including ImageNet) using LeNets and ResNets architectures. The evaluations demonstrate similar convergence behavior and negligible change in test accuracy compared to FP32 and bfloat16 multipliers. Compared to CPU-based approximate multiplier simulations in training and inference, the GPU-accelerated ApproxTrain is more than 2500x faster. Based on highly optimized closed-source cuDNN/cuBLAS libraries with native hardware multipliers, the original TensorFlow is only 8x faster than ApproxTrain.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑