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)模型的代码生成已经得到了广泛的研究,但是对于高度约束的多核神经处理单元(NPUs)进行有效的数据切片和并行化仍然是一个具有挑战性的问题。由于卷积的输入/输出张量大小和NPU芯片上内存的小占用,最小化内存事务并最大化并行性和MAC利用是任何有效解决方案的核心。本文提出了一种基于TensorFlow XLA/LLVM编译器优化的多核NPUs的Tensor Slicing Optimization(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
专知会员服务
41+阅读 · 2021年4月7日
【ACML2020】张量网络机器学习:最近的进展和前沿,109页ppt
专知会员服务
54+阅读 · 2020年12月15日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
动手实现推荐系统评价指标
机器学习与推荐算法
1+阅读 · 2022年6月1日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
基于PyTorch/TorchText的自然语言处理库
专知
27+阅读 · 2019年4月22日
SIGIR2019 接收论文列表
专知
18+阅读 · 2019年4月20日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 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会员
相关VIP内容
【干货书】面向计算科学和工程的Python导论,167页pdf
专知会员服务
41+阅读 · 2021年4月7日
【ACML2020】张量网络机器学习:最近的进展和前沿,109页ppt
专知会员服务
54+阅读 · 2020年12月15日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
相关资讯
动手实现推荐系统评价指标
机器学习与推荐算法
1+阅读 · 2022年6月1日
Transferring Knowledge across Learning Processes
CreateAMind
26+阅读 · 2019年5月18日
基于PyTorch/TorchText的自然语言处理库
专知
27+阅读 · 2019年4月22日
SIGIR2019 接收论文列表
专知
18+阅读 · 2019年4月20日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 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会员