arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.08892cs.LGcs.AI
收藏

用于精确硬件仿真的量化DNN库的开发

Development of Quantized DNN Library for Exact Hardware Emulation

Kumamoto University(熊本大学)

Masato Kiyama, Motoki Amagasaki, Masahiro Iida

摘要:

量化用于在AI芯片等边缘设备上运行深度神经网络(DNN)时加快执行时间并节省功耗。为了研究量化的效果,我们需要在以32位浮点精度量化DNN的权重后执行推理,然后将它们量化回32位浮点精度。这是因为DNN库只能处理浮点数。然而,仿真的准确性并不提供准确的精度。我们需要精确的精度来检测MAC操作中的溢出或验证边缘设备上的操作。我们已经开发了PyParch,这是一个DNN库,它可以执行与硬件完全相同的量化DNN(QNN)。在本文中,我们描述了一个新的PyParch的建议和实现。作为评估的结果,可以针对诸如YOLOv5的大型和复杂DNN估计具有任意位宽的QNN的准确性,并且可以检测溢出。我们评估了仿真时间的开销,发现与正常DNN执行时间相比,QNN慢5.6倍,QNN慢42倍。

英文摘要:

Quantization is used to speed up execution time and save power when runnning Deep neural networks (DNNs) on edge devices like AI chips. To investigate the effect of quantization, we need performing inference after quantizing the weights of DNN with 32-bit floating-point precision by a some bit width, and then quantizing them back to 32-bit floating-point precision. This is because the DNN library can only handle floating-point numbers. However, the accuracy of the emulation does not provide accurate precision. We need accurate precision to detect overflow in MAC operations or to verify the operation on edge de vices. We have developed PyParch, a DNN library that executes quantized DNNs (QNNs) with exactly the same be havior as hardware. In this paper, we describe a new proposal and implementation of PyParch. As a result of the evaluation, the accuracy of QNNs with arbitrary bit widths can be estimated for la rge and complex DNNs such as YOLOv5, and the overflow can be detected. We evaluated the overhead of the emulation time and found that it was 5.6 times slower for QNN and 42 times slower for QNN with overflow detection compared to the normal DNN execution time.

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

↑