We introduce a learning-based framework to optimize tensor programs for deep learning workloads. Efficient implementations of tensor operators, such as matrix multiplication and high dimensional convolution, are key enablers of effective deep learning systems. However, existing systems rely on manually optimized libraries such as cuDNN where only a narrow range of server class GPUs are well-supported. The reliance on hardware-specific operator libraries limits the applicability of high-level graph optimizations and incurs significant engineering costs when deploying to new hardware targets. We use learning to remove this engineering burden. We learn domain-specific statistical cost models to guide the search of tensor operator implementations over billions of possible program variants. We further accelerate the search by effective model transfer across workloads. Experimental results show that our framework delivers performance competitive with state-of-the-art hand-tuned libraries for low-power CPU, mobile GPU, and server-class GPU.
Quantitative Gaussian-Process limits of Tensor Programs
Institute for Mathematical Statistics and Actuarial Sciences, University of Bern(伯尔尼大学数理统计与精算科学研究所);Department of Mathematics, University of Pisa(比萨大学数学系)
Infinite-Width Limit of a Single Attention Layer: Analysis via Tensor Programs
The University of Tokyo(东京大学);National Institute of Advanced Industrial Science and Technology(国家工业科学与技术研究院);RIKEN Center for Advanced Intelligence Project(理化学研究所先进人工智能项目中心)
多维数组(NDArrays)是现代科学计算环境中的核心抽象。不幸的是,它们可能会使程序的推理变得更加困难,因为在程序执行中使用的不同数组形状的数量通常非常大,并且它们很少显式地出现在程序文本中。更糟糕的是,许多运算符对输入的形状做了隐含的假设:数组加法通常使用广播语义来丰富,而矩阵乘法假设收缩维度的长度相等。由于精确推理形状对于使用NDArrays编写正确的程序至关重要,而且由于形状通常很难通过快速浏览程序来推断,因此我们开发了Tensors Fitting Perfectly,这是一种静态分析工具,通过从程序的抽象解释中合成一组形状约束,在Swift for TensorFlow程序中推理NDArrays形状。它可以(1)检查可能的不一致性,(2)提供有关程序中出现的中间值的形状的直接见解,包括通过称为形状孔的机制。静态分析与可选的运行时断言协同工作,以提高程序作者的生产力。
QiMeng-Xpiler: Transcompiling Tensor Programs for Deep Learning Systems with a Neural-Symbolic Approach
University of Science and Technology of China(科学技术大学);Cambricon Technologies(Cambricon科技);SKL of Processors, Institute of Computing Technology, Chinese Academy of Sciences(处理器实验室,计算技术研究所,中国科学院);Institute of Software, Chinese Academy of Sciences(软件研究所,中国科学院)
Optimal Kernel Orchestration for Tensor Programs with Korch
University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Advanced Micro Devices(超威半导体公司);Carnegie Mellon University(卡内基梅隆大学);Sambanova Systems(Sambanova系统公司);Tsinghua University(清华大学)
Mirage: A Multi-Level Superoptimizer for Tensor Programs
Carnegie Mellon University(卡内基梅隆大学);Peking University(北京大学);Pennsylvania State University(宾夕法尼亚州立大学);Purdue University(Purdue 大学);Weizmann Institute of Science(魏茨曼科学研究院)
Toward Compiler World Models: Learning Latent Dynamics for Efficient Tensor Program Search
Hangzhou Institute for Advanced Study, University of Chinese Academy of Sciences(中国科学院大学杭州高等研究院);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of Chinese Academy of Sciences(中国科学院大学)
Tensor Programs I: Wide Feedforward or Recurrent Neural Networks of Any Architecture are Gaussian Processes
Microsoft Research AI(微软研究院人工智能)
具有随机权重和偏差的宽神经网络是高斯过程,正如Neal(1995)最初观察到的那样,最近Lee et al.(2018)和Matthews et al.(2018)观察到的深度全连接网络,以及Novak et al.(2019)和Garriga-Alonso et al.(2019)观察到的深度卷积网络。我们发现,这种神经网络-高斯过程对应关系令人惊讶地扩展到所有现代前馈或循环神经网络,包括多层感知器,RNN(例如LSTM,GRU),(nD或图)卷积,池化,跳过连接,注意力,批量归一化和/或层归一化。更一般地说,我们引入了一种语言来表达神经网络计算,我们的结果包括所有这样的可表达的神经网络。这项工作作为Yang(2019)中制定的 * 张量程序 * 技术的教程,并阐明了那里获得的高斯过程结果。我们在github.com/thegregyang/GP4A上提供了简单RNN、GRU、Transformer和batchnorm+ReLU网络的高斯过程内核的开源实现。