Tensor kernels in machine learning (ML) often correspond to pure mathematical expressions, making term rewriting an attractive strategy for optimization and mapping to specialized hardware accelerators. However, existing ML intermediate representations (IRs) tend to either be \textit{pure but high-level}, making low-level rewrites to hardware targets inexpressible, or \textit{low-level but impure}, hampering the use of term rewriting altogether. This paper introduces Glenside, a pure IR whose core abstraction -- the \textit{access pattern} -- enables low-level, layout-aware, hardware-centric program rewrites. We demonstrate how term rewriting in Glenside can be used to map program fragments to hardware accelerator invocations and automatically discover classic data layout transformations like \texttt{im2col}. Glenside establishes a new foundation for exploring further term rewriting techniques in optimizing low-level tensor programs.


翻译:机器学习( ML) 中的电锯内核往往与纯数学表达式相对应, 使得术语重写为优化和绘制专业硬件加速器的有吸引力的战略。 但是, 现有的 ML 中间表示器( IR) 往往要么是\ textit{ pure but high }, 使低层次重写到硬件目标无法表达, 要么是\ textit{ low- level but impure}, 阻碍术语重写。 本文引入了 Glenside, 一个纯的 IR, 其核心抽象性 -- \ textit{ access typed} -- 使得低级别、 版式、 硬件中心程序重写程序成为。 我们演示了如何在 Gleside 中重新写术语可以用来绘制程序碎片成硬件加速器, 并自动发现经典的数据布局转换, 如\ textt{ im2col} 。 Glenside 为探索新的术语重写技术以优化低层次的 Ex 。

0
下载
关闭预览

相关内容

【ACML2020】张量网络机器学习:最近的进展和前沿,109页ppt
专知会员服务
54+阅读 · 2020年12月15日
专知会员服务
61+阅读 · 2020年3月4日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
学术报告|港科大助理教授宋阳秋博士
科技创新与创业
7+阅读 · 2019年7月19日
已删除
将门创投
3+阅读 · 2019年4月25日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
美国化学会 (ACS) 北京代表处招聘
知社学术圈
11+阅读 · 2018年9月4日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
【计算机类】期刊专刊/国际会议截稿信息6条
Call4Papers
3+阅读 · 2017年10月13日
Financial Time Series Representation Learning
Arxiv
10+阅读 · 2020年3月27日
VIP会员
相关资讯
学术报告|港科大助理教授宋阳秋博士
科技创新与创业
7+阅读 · 2019年7月19日
已删除
将门创投
3+阅读 · 2019年4月25日
无监督元学习表示学习
CreateAMind
26+阅读 · 2019年1月4日
美国化学会 (ACS) 北京代表处招聘
知社学术圈
11+阅读 · 2018年9月4日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
【计算机类】期刊专刊/国际会议截稿信息6条
Call4Papers
3+阅读 · 2017年10月13日
Top
微信扫码咨询专知VIP会员