Previous computation models either have equivalent abilities in representing all computations but fail to provide primitive operators for programming complex algorithms or lack generalized expression ability to represent newly-added computations. This article presents a unified computation model with generalized expression ability and a concise set of primitive operators for programming high-level algorithms. We propose a unified data abstraction -- Tensor of List, and offer a unified computation model based on Tensor of List, which we call the ToL model (in short, ToL). ToL introduces five atomic computations that can represent any elementary computation by finite composition, ensured with strict formal proof. Based on ToL, we design a pure-functional language -- ToLang. ToLang provides a concise set of primitive operators that can be used to program complex big data and AI algorithms. Our evaluations show ToL has generalized expression ability and a built-in performance indicator, born with a strictly defined computation metric -- elementary operation count (EOPs), consistent with FLOPs within a small error range.
translated by 谷歌翻译
在过去十年中,已经开发出新的深度学习(DL)算法,工作负载和硬件来解决各种问题。尽管工作量和硬件生态系统的进步,DL系统的编程方法是停滞不前的。 DL工作负载从DL库中的高度优化,特定于平台和不灵活的内核,或者在新颖的操作员的情况下,通过具有强大性能的DL框架基元建立参考实现。这项工作介绍了Tensor加工基元(TPP),一个编程抽象,用于高效的DL工作负载的高效,便携式实现。 TPPS定义了一组紧凑而多才多艺的2D张镜操作员(或虚拟张量ISA),随后可以用作构建块,以在高维张量上构建复杂的运算符。 TPP规范是平台 - 不可行的,因此通过TPPS表示的代码是便携式的,而TPP实现是高度优化的,并且特定于平台。我们展示了我们使用独立内核和端到端DL&HPC工作负载完全通过TPPS表达的方法的效力和生存性,这在多个平台上优于最先进的实现。
translated by 谷歌翻译
一般矩阵乘法或GEMM内核在高性能计算和机器学习中占据中心位置。最近的NVIDIA GPU包括Gemm加速器,如Nvidia的张量核心。他们的剥削受到双语言问题的阻碍:它需要低级编程,这意味着低程序员的工作效率或使用只提供有限组件集的库。由于建立的组件方面的REPRASING算法经常引入开销,因此图书馆缺乏灵活性限制了探索新算法的自由。因此,使用GEMMS的研究人员无法立即享受编程生产力,高性能和研究灵活性。在本文中,我们解决了这个问题。我们在科学朱莉娅编程语言中展示了三组抽象和接口来编程宝石。界面和抽象共同设计用于研究人员的需求和朱莉娅的特征,以实现足够的担忧和灵活性的充分分离,以便在不支付性能价格的情况下轻松地扩展基本宝石。将我们的Gemms与最先进的图书馆Cublas和Cutlass进行比较,我们证明我们的性能在图书馆的相同球场中,并且在某些情况下甚至超过它,而无需在CUDA C ++中编写单行代码或者组装,而不面临灵活限制。
translated by 谷歌翻译
Automatic differentiation (AD) is a technique for computing the derivative of a function represented by a program. This technique is considered as the de-facto standard for computing the differentiation in many machine learning and optimisation software tools. Despite the practicality of this technique, the performance of the differentiated programs, especially for functional languages and in the presence of vectors, is suboptimal. We present an AD system for a higher-order functional array-processing language. The core functional language underlying this system simultaneously supports both source-to-source forward-mode AD and global optimisations such as loop transformations. In combination, gradient computation with forward-mode AD can be as efficient as reverse mode, and the Jacobian matrices required for numerical algorithms such as Gauss-Newton and Levenberg-Marquardt can be efficiently computed.
translated by 谷歌翻译
保留保护解决方案使公司能够在履行政府法规的同时将机密数据卸载到第三方服务。为了实现这一点,它们利用了各种密码技术,例如同性恋加密(HE),其允许对加密数据执行计算。大多数他计划以SIMD方式工作,数据包装方法可以显着影响运行时间和内存成本。找到导致最佳性能实现的包装方法是一个艰难的任务。我们提出了一种简单而直观的框架,摘要为用户提供包装决定。我们解释其底层数据结构和优化器,并提出了一种用于执行2D卷积操作的新算法。我们使用此框架来实现他友好的AlexNet版本,在三分钟内运行,比其他最先进的解决方案更快的数量级,只能使用他。
translated by 谷歌翻译
我们基于功能分析中的分类结构开发了一种自动和符号分化的组成方法,其中衍生物是抽象向量上的线性函数,而不是限于标量,向量,矩阵或张力器,表示为多维阵列。我们表明,可以使用差分计算来实现符号和自动分化,以生成基于原始,恒定,线性和双线性函数的规则以及其顺序和并行组成的线性函数。线性函数以组合域特异性语言表示。最后,我们提供了一个微积分,用于象征性地计算衍生物的伴随,而无需使用矩阵,而矩阵过于效率低,无法在高维空间上使用。衍生物的最终符号表示保留了输入程序的数据并行操作。组合分化和计算形式的伴随的组合在行为上等同于反向模式自动分化。特别是,它为矩阵过于效率而无法表示线性功能的优化提供了机会。
translated by 谷歌翻译
稀疏的张量正在迅速成为现代深度学习工作负载的关键组成部分。但是,开发高性能的稀疏运营商可能很困难和乏味,现有的供应商库无法满足新运营商的不断升级要求。稀疏张量编译器简化了操作员的开发,但是对深度学习的有效稀疏编译仍然具有挑战性,因为单个稀疏格式无法最大程度地提高硬件效率,并且单次弹出编译器无法跟上最新的硬件和系统进步。我们表明,解决这两个挑战的关键是两种合成性。在本文中,我们提出了SparSetir,这是一种稀疏的张张汇编抽象,可为深度学习工作负载提供可合理的格式和可组合的转换。 Sparsetir在这些可组合组件上构建一个搜索空间,以进行性能调整。通过这些改进,SparSetir获得了单个操作员的GPU上的一致性能加速与供应商库:GNN操作员的1.1-3.3倍,稀疏变压器操作员的1.1-4.4x。 Sparsetir还以1.1-2.2倍的速度加速了端到端GNN,用于图形训练,而RGCN推断为0.9-26x。
translated by 谷歌翻译
In the past few years, neural architecture search (NAS) has become an increasingly important tool within the deep learning community. Despite the many recent successes of NAS, however, most existing approaches operate within highly structured design spaces, and hence explore only a small fraction of the full search space of neural architectures while also requiring significant manual effort from domain experts. In this work, we develop techniques that enable efficient NAS in a significantly larger design space. To accomplish this, we propose to perform NAS in an abstract search space of program properties. Our key insights are as follows: (1) the abstract search space is significantly smaller than the original search space, and (2) architectures with similar program properties also have similar performance; thus, we can search more efficiently in the abstract search space. To enable this approach, we also propose a novel efficient synthesis procedure, which accepts a set of promising program properties, and returns a satisfying neural architecture. We implement our approach, $\alpha$NAS, within an evolutionary framework, where the mutations are guided by the program properties. Starting with a ResNet-34 model, $\alpha$NAS produces a model with slightly improved accuracy on CIFAR-10 but 96% fewer parameters. On ImageNet, $\alpha$NAS is able to improve over Vision Transformer (30% fewer FLOPS and parameters), ResNet-50 (23% fewer FLOPS, 14% fewer parameters), and EfficientNet (7% fewer FLOPS and parameters) without any degradation in accuracy.
translated by 谷歌翻译
Bridging cultures that have often been distant, Julia combines expertise from the diverse fields of computer science and computational science to create a new approach to numerical computing. Julia is designed to be easy and fast. Julia questions notions generally held as "laws of nature" by practitioners of numerical computing:1. High-level dynamic programs have to be slow, 2. One must prototype in one language and then rewrite in another language for speed or deployment, and 3. There are parts of a system for the programmer, and other parts best left untouched as they are built by the experts.We introduce the Julia programming language and its design -a dance between specialization and abstraction. Specialization allows for custom treatment. Multiple dispatch, a technique from computer science, picks the right algorithm for the right circumstance. Abstraction, what good computation is really about, recognizes what remains the same after differences are stripped away. Abstractions in mathematics are captured as code through another technique from computer science, generic programming.Julia shows that one can have machine performance without sacrificing human convenience.
translated by 谷歌翻译
神经网络越来越依赖于复杂安全系统(例如自动驾驶汽车)的组成部分。对在更大的验证周期中嵌入神经网络验证的工具和方法的需求很高。但是,由于关注的广泛验证属性,很难进行神经网络验证,通常每个验证属性仅适用于专用求解器中的验证。在本文中,我们展示了最初设计用于验证,验证和仿真金融基础架构的功能编程语言的Imandra如何为神经网络验证提供整体基础架构。我们开发了一个新颖的图书馆Checkinn,该图书馆在Imandra的神经网络上形式化,并涵盖了神经网络验证的不同重要方面。
translated by 谷歌翻译
我们提出了一个自动静态分析仪Pytea,可检测Pytorch码中的张量误差。张量误差在深度神经网络代码中是至关重要的;一旦在训练阶段中间发生张量形状不匹配,就会丢失大部分训练成本和中间结果。鉴于输入Pytorch源,Pytea静态跟踪每个可能的执行路径,收集路径的张量操作序列所需的张量形状约束,并决定如果约束是不匹配的(因此发生形状误差)。 Pytea的可扩展性和精确铰链对现实世界的Pytorch应用的特点:Pytea保守修剪后的执行路径数很少爆炸,循环简单,以通过我们的符号抽象来限制。我们测试了Pytea在官方Pytorch存储库中的项目中,以及在StackOverflow中发现的一些张计错误代码。 Pytea在几秒钟内成功地检测这些代码中的张量形状误差。
translated by 谷歌翻译
We propose a notation for tensors with named axes, which relieves the author, reader, and future implementers of machine learning models from the burden of keeping track of the order of axes and the purpose of each. The notation makes it easy to lift operations on low-order tensors to higher order ones, for example, from images to minibatches of images, or from an attention mechanism to multiple attention heads. After a brief overview and formal definition of the notation, we illustrate it through several examples from modern machine learning, from building blocks like attention and convolution to full models like Transformers and LeNet. We then discuss differential calculus in our notation and compare with some alternative notations. Our proposals build on ideas from many previous papers and software libraries. We hope that our notation will encourage more authors to use named tensors, resulting in clearer papers and more precise implementations.
translated by 谷歌翻译
由于它们在现实世界中的广泛采用,提高深神经网络(DNN)的运行时性能至关重要。现有的优化DNN的张量代数表达的方法仅考虑由固定的预定义运算符表示的表达式,在一般表达式之间缺少可能的优化机会。我们提出了Ollie,这是第一个基于衍生的张量程序优化器。 Ollie通过利用一般张量代数表达式之间的转换来优化张量程序,从而实现了一个更大的表达搜索空间,其中包括由先前工作作为特殊情况支持的搜索空间。 Ollie使用基于混合衍生的优化器,该优化器有效地结合了探索性和指导性推导,以快速发现高度优化的表达式。对七个DNN的评估表明,Ollie可以在A100 GPU上胜过2.73 $ \ times $(平均为1.46美元$ \ times $),在V100上最多可超过2.68 $ \ times $(1.51 $ \ times $) GPU分别。
translated by 谷歌翻译
In this document, we introduce XCSP3-core, a subset of XCSP3 that allows us to represent constraint satisfaction/optimization problems. The interest of XCSP3-core is multiple: (i) focusing on the most popular frameworks (CSP and COP) and constraints, (ii) facilitating the parsing process by means of dedicated XCSP3-core parsers written in Java and C++ (using callback functions), (iii) and defining a core format for comparisons (competitions) of constraint solvers.
translated by 谷歌翻译
现代深度学习框架提供嵌入在Python中的必要的急切执行编程接口,以提供生产的开发体验。但是,深度学习从业者有时需要捕获和转换程序结构以进行性能优化,可视化,分析和硬件集成。我们研究了深度学习中使用的程序捕获和转型的不同设计。通过设计典型的深度学习用例而不是长尾部,可以为程序捕获和转换创建更简单的框架。我们在Torch.fx中应用了这一原理,是一个完全在Python写入的Pytorch的程序捕获和转换库,并通过ML从业者进行高开发人员生产力优化。我们存在案例研究,展示了Torch.fx如何实现先前在Pytorch生态系统中无法访问的工作流程。
translated by 谷歌翻译
深度神经网络(DNN)已成为移动设备上许多主要应用的核心推动因素。为实现高精度,DNN模型越来越深,数百甚至数千个操作层,导致高记忆和推理的计算要求。操作员融合(或内核/层融合)是许多最先进的DNN执行框架中的关键优化,例如Tensorflow,TVM和MNN。然而,这些框架通常根据某些模式采用融合方法,这些模式过于限制,以涵盖运营商和层连接的多样性。另一方面,基于多面体的循环融合技术,在没有运营商级信息的情况下对计算的低级视图工作,并且也可能错过潜在的融合机会。为了解决这一挑战,本文提出了一种名为DNNFusion的新颖和广泛的环路融合框架。这项工作的基本思想是在DNN的操作员视图下工作,但通过开发个人运营商及其组合的分类来扩展融合机会。此外,DNNFusion包括1)基于新的基于数学 - 性能的图形重写框架,以降低评估成本,并促进后续操作员融合,2)一种集成的融合计划,利用高级分析和精确的轻量级分析,以及3 )融合代码生成期间的附加优化。在15个DNN模型中广泛评估DNNFusion,具有各种任务,模型尺寸和图层计数。评估结果表明,DNNFusion最高达到8.8倍的融合机会,优于具有9.3倍的最先进的DNN执行框架。记忆要求减少和加速可以在移动设备上执行许多目标模型,甚至可以使它们成为实时应用程序的一部分。
translated by 谷歌翻译
TensorFlow is a machine learning system that operates at large scale and in heterogeneous environments. Tensor-Flow uses dataflow graphs to represent computation, shared state, and the operations that mutate that state. It maps the nodes of a dataflow graph across many machines in a cluster, and within a machine across multiple computational devices, including multicore CPUs, generalpurpose GPUs, and custom-designed ASICs known as Tensor Processing Units (TPUs). This architecture gives flexibility to the application developer: whereas in previous "parameter server" designs the management of shared state is built into the system, TensorFlow enables developers to experiment with novel optimizations and training algorithms. TensorFlow supports a variety of applications, with a focus on training and inference on deep neural networks. Several Google services use TensorFlow in production, we have released it as an open-source project, and it has become widely used for machine learning research. In this paper, we describe the TensorFlow dataflow model and demonstrate the compelling performance that Tensor-Flow achieves for several real-world applications.
translated by 谷歌翻译
我们试图通过探索(深)卷积神经网络和伏特拉卷积之间的关系来理解卷积神经网络。我们提出了一种新颖的方法来解释和研究神经网络的总体特征,而不会受到可怕的复杂体系结构的干扰。具体而言,我们将基本结构及其组合转换为Volterra卷积的形式。结果表明,大多数卷积神经网络可以转换为Volterra卷积的形式,在该形式中,转换后的代理内核保留了原始网络的特征。分析这些代理内核可能会给原始网络提供宝贵的见解。基于此设置,我们提出了近似零订单和订单的代理内核的方法,并验证了结果的正确性和有效性。
translated by 谷歌翻译
Low-rank matrix approximations, such as the truncated singular value decomposition and the rank-revealing QR decomposition, play a central role in data analysis and scientific computing. This work surveys and extends recent research which demonstrates that randomization offers a powerful tool for performing low-rank matrix approximation. These techniques exploit modern computational architectures more fully than classical methods and open the possibility of dealing with truly massive data sets.This paper presents a modular framework for constructing randomized algorithms that compute partial matrix decompositions. These methods use random sampling to identify a subspace that captures most of the action of a matrix. The input matrix is then compressed-either explicitly or implicitly-to this subspace, and the reduced matrix is manipulated deterministically to obtain the desired low-rank factorization. In many cases, this approach beats its classical competitors in terms of accuracy, speed, and robustness. These claims are supported by extensive numerical experiments and a detailed error analysis.The specific benefits of randomized techniques depend on the computational environment. Consider the model problem of finding the k dominant components of the singular value decomposition of an m × n matrix. (i) For a dense input matrix, randomized algorithms require O(mn log(k)) floating-point operations (flops) in contrast with O(mnk) for classical algorithms. (ii) For a sparse input matrix, the flop count matches classical Krylov subspace methods, but the randomized approach is more robust and can easily be reorganized to exploit multi-processor architectures. (iii) For a matrix that is too large to fit in fast memory, the randomized techniques require only a constant number of passes over the data, as opposed to O(k) passes for classical algorithms. In fact, it is sometimes possible to perform matrix approximation with a single pass over the data.
translated by 谷歌翻译
在各种设备上部署深度学习模型已成为一个重要的话题。硬件专业化的浪潮为多维张量计算带来了一套多样化的加速度原始图。这些新的加速原始基原料以及新兴的机器学习模型带来了巨大的工程挑战。在本文中,我们提出了Tensorir,这是一种编译器抽象,用于通过这些张量计算原始素优化程序。Tensorir概括了现有机器学习编译器中使用的循环巢表示,以将张量计算作为一流的公民。最后,我们在抽象之上构建了一个端到端框架,以自动优化给定的张量计算原始图的深度学习模型。实验结果表明,Tensorir编译会自动使用给定硬件后端的张量计算原始图,并提供与跨平台的最新手工精制系统竞争性能的性能。
translated by 谷歌翻译