Machine Learning Inference Framework on Multi-Core Processor
-
摘要: 近年来,深度神经网络被广泛应用于各个领域并取得了极大的成功.由于神经网络模型的尺寸和计算量的不断增加,为了能够高效迅速地完成神经网络的计算,包括GPU和专用加速器在内的很多新型硬件处理器被用于深度学习的计算.尽管如此,通用处理器作为目前最为常见和易于获得的计算平台,探究如何高效地在其上运行神经网络算法同样具有重要意义.多核处理器在训练阶段可以采用数据并行的方式来提高数据吞吐量,加快训练速度.然而在推理阶段,相比吞吐量场景,端到端的时延往往更加重要,因为这决定了处理器在某个场景下的可用性.传统的数据并行方案不能满足推理场景下对处理器小数据、低延迟的要求.因此,对于多核的处理器结构,需要在算子内部对计算进行拆分,才能够充分利用多核结构的硬件资源.考虑到处理器的计算特点,需要一种精细的方法来对计算图中的算子进行合理的拆分,才能真正有效地发挥出多核处理器的计算潜能.提出一种基于算子拆分的并行框架,可以用较小的开销实现处理器由单核向多核结构上的扩展,并且能够针对给定的网络和底层处理器特点给出一种高效的拆分方案.实验结果表明:该方法能有效降低各种网络在多核处理器上的端到端时延.Abstract: In recent years, deep neural network has been widely used in many domains and got huge success. Since the size and computation workload for neural network model is increasing rapidly, GPU and many new-designed domain-specific accelerators have been used in order to complete computing neural networks as soon as possible. However, the traditional general-purpose processor should not be ignored. Considering it is common and easy to get, exploring efficient way for using general-purpose processor in deep learning is meaningful. In training phase, the multi-core architecture is suitable for data parallelism which helps to increase system throughput. However, in inference phase, end-to-end latency is much more important than throughput, and traditional data parallelism could not fulfill the requirement of small batch and low latency. In order to utilize hardware resource of multi-core architecture, it is necessary to split the computation task into smaller parts which can be executed on multi-core processor in parallel. Besides, a sophisticated strategy is necessary to make sure the split plan will not affect computing efficiency on each core. In this paper, we propose a parallel framework for the multi-core general-purpose processor. It divides each operation in the neural network into smaller ones and executes them on the multiple cores in parallel. By offering some necessary assistant operations, this framework can be easily transplanted to support potential multi-core processors. Also, the framework can automatically generate an effective splitting plan for the given neural networks. The plan is designed with enough consideration of both network architecture and low-level hardware. The experimental results show that this framework can give an efficient splitting plan which substantially reduces the end-to-end latency of inference task on multi-core processor.
-
-
期刊类型引用(18)
1. 苏小红,郑伟宁,蒋远,魏宏巍,万佳元,魏子越. 基于学习的源代码漏洞检测研究与进展. 计算机学报. 2024(02): 337-374 . 百度学术
2. 刘忠鑫,唐郅杰,夏鑫,李善平. 代码变更表示学习及其应用研究进展. 软件学报. 2023(12): 5501-5526 . 百度学术
3. 奚建飞,王志英,邹文景,甘莹. 基于深度学习的非结构化表格文档数据抽取方法. 微型电脑应用. 2022(02): 102-105 . 百度学术
4. 钱忠胜,宋佳,俞情媛,成轶伟,孙志旺. 利用函数影响力的相似程序间测试用例重用与生成. 电子学报. 2022(07): 1696-1707 . 百度学术
5. 张祥平,刘建勋. 基于深度学习的代码表征及其应用综述. 计算机科学与探索. 2022(09): 2011-2029 . 百度学术
6. 魏敏,张丽萍,闫盛. 基于程序向量树和聚类的学生程序算法识别方法. 计算机工程与设计. 2022(10): 2790-2798 . 百度学术
7. 汶东震,张帆,刘海峰,杨亮,徐博,林原,林鸿飞. 深度程序理解视角下代码搜索研究综述. 计算机工程与应用. 2022(20): 63-72 . 百度学术
8. 王一凡,赵逢禹,艾均. 面向基本路径学习的代码自动命名. 小型微型计算机系统. 2022(11): 2302-2307 . 百度学术
9. 杨静宜,崔建弘,庞雅静. 基于特征深度学习的机器人协调操作感知控制. 计算机仿真. 2021(01): 307-311 . 百度学术
10. 赵乐乐,张丽萍. 代码注释自动生成研究进展. 计算机应用研究. 2021(04): 982-989 . 百度学术
11. 陈翔,杨光,崔展齐,孟国柱,王赞. 代码注释自动生成方法综述. 软件学报. 2021(07): 2118-2141 . 百度学术
12. 谢春丽,梁瑶,王霞. 深度学习在代码表征中的应用综述. 计算机工程与应用. 2021(20): 53-63 . 百度学术
13. 魏敏,张丽萍. 代码搜索方法研究进展. 计算机应用研究. 2021(11): 3215-3221+3230 . 百度学术
14. 李眩,吴晓兵,童百利. 基于动态模糊聚类的数据挖掘研究——以安徽城市综合实力分析为例. 贵阳学院学报(自然科学版). 2020(01): 52-57 . 百度学术
15. 池昊宇,陈长波. 基于神经网络的循环分块大小预测. 计算机科学. 2020(08): 62-70 . 百度学术
16. 景艳娥. 基于深度学习技术的语法纠错算法模型构建分析. 信息技术. 2020(09): 143-147+152 . 百度学术
17. 霍丽春,张丽萍. 代码注释演化及分类研究综述. 内蒙古师范大学学报(自然科学汉文版). 2020(05): 423-432 . 百度学术
18. 何后裕,王炳鑫. 基于深度学习的综合性共享数据匹配算法研究. 电子设计工程. 2020(20): 111-115 . 百度学术
其他类型引用(29)
计量
- 文章访问数: 1337
- HTML全文浏览量: 9
- PDF下载量: 938
- 被引次数: 47