###
Journal of Software:2020.31(10):3074-3086

一种神经网络指令集扩展与代码映射机制
娄文启,王超,宫磊,周学海
(中国科学技术大学 计算机科学与技术学院, 安徽 合肥 230027)
Neural Network Instruction Set Extension and Code Mapping Mechanism
LOU Wen-Qi,WANG Chao,GONG Lei,ZHOU Xue-Hai
(School of Computer Science and Technology, University of Science and Technology of China, Hefei 230027, China)
Abstract
Chart / table
Reference
Similar Articles
Article :Browse 791   Download 590
Received:February 16, 2020    Revised:April 04, 2020
> 中文摘要: 近年来,卷积神经网络(CNN)在图像识别和分类领域的高精度表现使其在机器学习领域受到了广泛关注.然而CNN的计算与访存密集特性给需要支持各种负载的通用处理器带来了巨大压力.因此,涌现了大量CNN专用硬件加速器.它们虽然提高了效率但却缺乏灵活性.基于新兴的RISC-V架构设计了包含10条矩阵指令的专用指令集RV-CNN.通过抽象典型CNN中的计算为指令,该指令集可灵活支持CNN推理过程并具有比通用ISA更高的代码密度.在此基础上,提出了代码至指令的映射机制.通过在Xilinx ZC702上使用该指令集构建不同网络模型后发现,相比于x86处理器,RV-CNN平均具有141倍的能效和8.91倍的代码密度;相比于GPU,平均具有1.25倍的能效和1.95倍的代码密度.另外,相比于以往的CNN加速器,该设计在支持典型CNN模型的同时仍具有不错的能效.
Abstract:In recent years, due to the high-accuracy performance of Convolutional Neural Network (CNN) in character recognition and image classification, it has received widespread attention in the field of machine learning. Nevertheless, the compute-intensive and memory-intensive characteristics of CNN have posed huge challenges to the general-purpose processor, which needs to support various workloads. Therefore, a large number of CNN-specific hardware accelerators have emerged to improve efficiency. Whereas, although previous accelerators are significantly efficient, they usually lack flexibility. In this study, classical CNN models are analyzed and a domain-specific instruction set of 10 matrix instructions, called RV-CNN, is design based on the promising RISC-V architecture. By abstracting CNN computation into instructions, the proposed design can provide sufficient flexibility for CNN and possesses a higher code density than the general ISA. Based on this, a code-to-instruction mapping mechanism is proposed. By using the RV-CNN to build different CNN models on the Xilinx ZC702, it was found that compared to x86 processors, RV-CNN has an average of 141 times energy efficiency and 8.91 times the code density; compared to GPU, it has an average of 1.25 times energy efficiency and 1.95 times the code density. Besides, compared to previous CNN accelerators, the design supports typical CNN models while having good energy efficiency.
文章编号:     中图分类号:TP306    文献标志码:
基金项目:国家重点研发计划(2017YFA0700900,2017YFA0700903);国家自然科学基金(61379040);江苏省自然科学基金(BK20181193);中国科学院青年创新促进会资助项目(2017497) 国家重点研发计划(2017YFA0700900,2017YFA0700903);国家自然科学基金(61379040);江苏省自然科学基金(BK20181193);中国科学院青年创新促进会资助项目(2017497)
Foundation items:National Key Research and Development Program of China (2017YFA0700900, 2017YFA0700903); National Natural Science Foundation of China (61379040); Natural Science Foundation of Jiangsu Province, China (BK20181193); Youth Innovation Promotion Association CAS (2017497)
Reference text:

娄文启,王超,宫磊,周学海.一种神经网络指令集扩展与代码映射机制.软件学报,2020,31(10):3074-3086

LOU Wen-Qi,WANG Chao,GONG Lei,ZHOU Xue-Hai.Neural Network Instruction Set Extension and Code Mapping Mechanism.Journal of Software,2020,31(10):3074-3086