Although code generation for Convolution Neural Network (CNN) models has been extensively studied, performing efficient data slicing and parallelization for highly-constrai\-ned Multicore Neural Processor Units (NPUs) is still a challenging problem. Given the size of convolutions' input/output tensors and the small footprint of NPU on-chip memories, minimizing memory transactions while maximizing parallelism and MAC utilization are central to any effective solution. This paper proposes a TensorFlow XLA/LLVM compiler optimization pass for Multicore NPUs, called Tensor Slicing Optimization (TSO), which: (a) maximizes convolution parallelism and memory usage across NPU cores; and (b) reduces data transfers between host and NPU on-chip memories by using DRAM memory burst time estimates to guide tensor slicing. To evaluate the proposed approach, a set of experiments was performed using the NeuroMorphic Processor (NMP), a multicore NPU containing 32 RISC-V cores extended with novel CNN instructions. Experimental results show that TSO is capable of identifying the best tensor slicing that minimizes execution time for a set of CNN models. Speed-ups of up to 21.7\% result when comparing the TSO burst-based technique to a no-burst data slicing approach. To validate the generality of the TSO approach, the algorithm was also ported to the Glow Machine Learning framework. The performance of the models were measured on both Glow and TensorFlow XLA/LLVM compilers, revealing similar results.


翻译:尽管卷积神经网络(CNN)模型的代码生成已被广泛研究,但在高度约束的多核神经处理单元(NPU)上实现高效的数据切片与并行化仍具挑战性。鉴于卷积输入/输出张量的规模以及NPU片上存储器的有限容量,如何在最大化并行性与MAC利用率的同时最小化内存事务,是任何有效解决方案的核心问题。本文提出一种面向多核NPU的TensorFlow XLA/LLVM编译器优化步骤,称为张量切片优化(TSO),该方案能够:(a)最大化跨NPU核的卷积并行性与内存使用效率;(b)通过利用DRAM突发传输时间估计指导张量切片,减少主机与NPU片上存储器间的数据传输。为评估所提方法,我们使用神经形态处理器(NMP)——一种包含32个扩展了新型CNN指令的RISC-V核的多核NPU——开展了一系列实验。实验结果表明,TSO能够识别最佳张量切片方案,从而最小化一组CNN模型的执行时间。与无突发数据切片方法相比,基于TSO突发传输的技术可实现高达21.7%的加速比。为验证TSO方法的普适性,该算法还被移植至Glow机器学习框架。在Glow与TensorFlow XLA/LLVM两种编译器上对模型性能进行测量,结果显示两者性能表现相似。

0
下载
关闭预览

相关内容

【干货书】面向计算科学和工程的Python导论,167页pdf
专知会员服务
42+阅读 · 2021年4月7日
【ACML2020】张量网络机器学习:最近的进展和前沿,109页ppt
专知会员服务
55+阅读 · 2020年12月15日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
41+阅读 · 2019年10月9日
动手实现推荐系统评价指标
机器学习与推荐算法
1+阅读 · 2022年6月1日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
基于PyTorch/TorchText的自然语言处理库
专知
28+阅读 · 2019年4月22日
SIGIR2019 接收论文列表
专知
18+阅读 · 2019年4月20日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Arxiv
0+阅读 · 2023年5月24日
Arxiv
0+阅读 · 2023年5月24日
VIP会员
最新内容
无人机已改变战场,但并未解决指挥问题
专知会员服务
2+阅读 · 今天15:00
驱动军事决策变革的顶尖人工智能指挥系统
专知会员服务
10+阅读 · 8月11日
非对称防御中的自组织临界性:俄乌战争
专知会员服务
10+阅读 · 8月10日
《战争中的大语言模型监管》
专知会员服务
15+阅读 · 8月10日
《边缘计算关键技术分析及美军作战实践应用》
相关VIP内容
【干货书】面向计算科学和工程的Python导论,167页pdf
专知会员服务
42+阅读 · 2021年4月7日
【ACML2020】张量网络机器学习:最近的进展和前沿,109页ppt
专知会员服务
55+阅读 · 2020年12月15日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
41+阅读 · 2019年10月9日
相关资讯
动手实现推荐系统评价指标
机器学习与推荐算法
1+阅读 · 2022年6月1日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
基于PyTorch/TorchText的自然语言处理库
专知
28+阅读 · 2019年4月22日
SIGIR2019 接收论文列表
专知
18+阅读 · 2019年4月20日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员