Multi-level intermediate representations (MLIR) show great promise for reducing the cost of building domain-specific compilers by providing a reusable and extensible compiler infrastructure. This work presents TPU-MLIR, an end-to-end compiler based on MLIR that deploys pre-trained neural network (NN) models to a custom ASIC called a Tensor Processing Unit (TPU). TPU-MLIR defines two new dialects to implement its functionality: 1. a Tensor operation (TOP) dialect that encodes the deep learning graph semantics and independent of the deep learning framework and 2. a TPU kernel dialect to provide a standard kernel computation on TPU. A NN model is translated to the TOP dialect and then lowered to the TPU dialect for different TPUs according to the chip's configuration. We demonstrate how to use the MLIR pass pipeline to organize and perform optimization on TPU to generate machine code. The paper also presents a verification procedure to ensure the correctness of each transform stage.


翻译:多层次中间代表机构(MLIR)通过提供可重复使用和可扩展的编译基础设施,为降低建设特定域的编译员的成本展现出巨大的希望。这项工作展示了TPU-MLIR,这是基于MLIR的端到端的编译器,将预先培训的神经网络模型部署到称为Tensor处理股(TPU)的定制ASIC系统。TPU-MLIR定义了两种新的方言来实施其功能:1. 一种是记录深层学习图解语和独立于深层学习框架的代言(TOP)方言(TOP),和2. 一种是提供在TPU上标准内核计算法的双核方言。 NN模型被翻译成TOP方言,然后根据芯片的配置,降为不同的TPU方言方言。我们演示如何使用MLIR通过管道在TPU上组织和实施优化生成机器代码。文件还提出了一个核查程序,以确保每个转换阶段的正确性。

0
下载
关闭预览

相关内容

剑桥大学《数据科学: 原理与实践》课程,附PPT下载
专知会员服务
54+阅读 · 2021年1月20日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
105+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
41+阅读 · 2019年10月9日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
15+阅读 · 2017年11月16日
【推荐】免费书(草稿):数据科学的数学基础
机器学习研究会
20+阅读 · 2017年10月1日
【推荐】SVM实例教程
机器学习研究会
17+阅读 · 2017年8月26日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2008年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Arxiv
19+阅读 · 2022年10月6日
Arxiv
23+阅读 · 2022年2月24日
Arxiv
16+阅读 · 2020年2月6日
VIP会员
相关VIP内容
剑桥大学《数据科学: 原理与实践》课程,附PPT下载
专知会员服务
54+阅读 · 2021年1月20日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
【哈佛大学商学院课程Fall 2019】机器学习可解释性
专知会员服务
105+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
41+阅读 · 2019年10月9日
相关资讯
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
15+阅读 · 2017年11月16日
【推荐】免费书(草稿):数据科学的数学基础
机器学习研究会
20+阅读 · 2017年10月1日
【推荐】SVM实例教程
机器学习研究会
17+阅读 · 2017年8月26日
相关论文
相关基金
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2008年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员