Deep learning frameworks have often focused on either usability or speed, but not both. PyTorch is a machine learning library that shows that these two goals are in fact compatible: it provides an imperative and Pythonic programming style that supports code as a model, makes debugging easy and is consistent with other popular scientific computing libraries, while remaining efficient and supporting hardware accelerators such as GPUs. In this paper, we detail the principles that drove the implementation of PyTorch and how they are reflected in its architecture. We emphasize that every aspect of PyTorch is a regular Python program under the full control of its user. We also explain how the careful and pragmatic implementation of the key components of its runtime enables them to work together to achieve compelling performance. We demonstrate the efficiency of individual subsystems, as well as the overall speed of PyTorch on several common benchmarks.
translated by 谷歌翻译
现代深度学习框架提供嵌入在Python中的必要的急切执行编程接口,以提供生产的开发体验。但是,深度学习从业者有时需要捕获和转换程序结构以进行性能优化,可视化,分析和硬件集成。我们研究了深度学习中使用的程序捕获和转型的不同设计。通过设计典型的深度学习用例而不是长尾部,可以为程序捕获和转换创建更简单的框架。我们在Torch.fx中应用了这一原理,是一个完全在Python写入的Pytorch的程序捕获和转换库,并通过ML从业者进行高开发人员生产力优化。我们存在案例研究,展示了Torch.fx如何实现先前在Pytorch生态系统中无法访问的工作流程。
translated by 谷歌翻译
随着机器学习系统的计算要求以及机器学习框架的规模和复杂性的增加,基本框架创新变得具有挑战性。尽管计算需求驱动了最近的编译器,网络和硬件的进步,但通过机器学习工具对这些进步的利用却以较慢的速度发生。这部分是由于与现有框架原型制作新的计算范式有关的困难。大型框架将机器学习研究人员和从业人员作为最终用户的优先级优先,并且很少关注能够向前推动框架的系统研究人员 - 我们认为两者都是同等重要的利益相关者。我们介绍了手电筒,这是一个开源库,旨在通过优先考虑开放式,模块化,可定制的内部设备以及最新的,可用于研究的模型和培训设置,以刺激机器学习工具和系统的创新。手电筒使系统研究人员能够快速原型并尝试机器学习计算中的新思想,并且开销低,与其他流行的机器学习框架竞争并经常超过其他流行的机器学习框架。我们将手电筒视为一种工具,可以使可以使广泛使用的图书馆受益,并使机器学习和系统研究人员更加紧密地结合在一起。手电筒可从https://github.com/flashlight/flashlight获得。
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 谷歌翻译
There is an increasing need to bring machine learning to a wide diversity of hardware devices. Current frameworks rely on vendor-specific operator libraries and optimize for a narrow range of server-class GPUs. Deploying workloads to new platforms -such as mobile phones, embedded devices, and accelerators (e.g., FPGAs, ASICs) -requires significant manual effort. We propose TVM, a compiler that exposes graph-level and operator-level optimizations to provide performance portability to deep learning workloads across diverse hardware back-ends. TVM solves optimization challenges specific to deep learning, such as high-level operator fusion, mapping to arbitrary hardware primitives, and memory latency hiding. It also automates optimization of low-level programs to hardware characteristics by employing a novel, learning-based cost modeling method for rapid exploration of code optimizations. Experimental results show that TVM delivers performance across hardware back-ends that are competitive with state-ofthe-art, hand-tuned libraries for low-power CPU, mobile GPU, and server-class GPUs. We also demonstrate TVM's ability to target new accelerator back-ends, such as the FPGA-based generic deep learning accelerator.The system is open sourced and in production use inside several major companies.
translated by 谷歌翻译
深度学习的快速进步正在导致一系列快速变化的模型,对计算的需求急剧增长。但是,随着框架将性能优化专门针对流行网络的模式,它们隐含地限制了推动研究进展的新颖和多样化的模型。我们通过定义灵活和用户可定制的管道来优化基于数据运动最小化的任意深神经网络的培训来赋予深度学习研究人员的能力。管道始于Pytorch或ONNX中的标准网络,并通过逐步降低转换计算。我们定义了四个级别的通用转换级别,从局部操作员优化到全球数据运动减少。这些在以数据为中心的图形中间表示上运行,该表示在各个级别的抽象级别表达计算和数据移动,包括扩展基本运算符,例如其基础计算的卷积。设计的核心是管道的互动性和内省性质。每个部分都可以通过Python API扩展,并且可以使用GUI进行交互调整。我们在十个不同的网络上展示了竞争性能或加速性,交互式优化发现了高效网络中的新机会。
translated by 谷歌翻译
一般矩阵乘法或GEMM内核在高性能计算和机器学习中占据中心位置。最近的NVIDIA GPU包括Gemm加速器,如Nvidia的张量核心。他们的剥削受到双语言问题的阻碍:它需要低级编程,这意味着低程序员的工作效率或使用只提供有限组件集的库。由于建立的组件方面的REPRASING算法经常引入开销,因此图书馆缺乏灵活性限制了探索新算法的自由。因此,使用GEMMS的研究人员无法立即享受编程生产力,高性能和研究灵活性。在本文中,我们解决了这个问题。我们在科学朱莉娅编程语言中展示了三组抽象和接口来编程宝石。界面和抽象共同设计用于研究人员的需求和朱莉娅的特征,以实现足够的担忧和灵活性的充分分离,以便在不支付性能价格的情况下轻松地扩展基本宝石。将我们的Gemms与最先进的图书馆Cublas和Cutlass进行比较,我们证明我们的性能在图书馆的相同球场中,并且在某些情况下甚至超过它,而无需在CUDA C ++中编写单行代码或者组装,而不面临灵活限制。
translated by 谷歌翻译
Array programming provides a powerful, compact, expressive syntax for accessing, manipulating, and operating on data in vectors, matrices, and higher-dimensional arrays [1]. NumPy is the primary array programming library for the Python language [2,3,4,5]. It plays an essential role in research analysis pipelines in fields as diverse as physics, chemistry, astronomy, geoscience, biology, psychology, material science, engineering, finance, and economics. For example, in astronomy, NumPy was an important part of the software stack used in the discovery of gravitational waves [6] and the first imaging of a black hole [7].Here we show how a few fundamental array concepts lead to a simple and powerful programming paradigm for organizing, exploring, and analyzing scientific data. NumPy is the foundation upon which the entire scientific Python universe is constructed. It is so pervasive that several projects, targeting audiences with specialized needs, have developed their own NumPy-like interfaces and array objects. Because of its central position in the ecosystem, NumPy increasingly plays the role of an interoperability layer between these new array computation libraries.
translated by 谷歌翻译
人工智能(AI)对计算的巨大需求正在推动对AI的硬件和软件系统的无与伦比的投资。这导致了专用硬件设备数量的爆炸,现在由主要的云供应商提供。通过通过基于张量的界面隐藏低级复杂性,张量计算运行时间(TCR)(例如Pytorch)允许数据科学家有效利用新硬件提供的令人兴奋的功能。在本文中,我们探讨了数据库管理系统如何在AI空间中乘坐创新浪潮。我们设计,构建和评估张量查询处理器(TQP):TQP将SQL查询转换为张量程序,并在TCR上执行它们。 TQP能够通过在张量例程中实现与关系运算符的新颖算法来运行完整的TPC-H基准。同时,TQP可以支持各种硬件,而仅需要通常的开发工作。实验表明,与专用CPU和仅GPU的系统相比,TQP可以将查询执行时间提高到10美元$ \ times $。最后,TQP可以加速查询ML预测和SQL端到端,并在CPU基线上输送高达9 $ \ times $速度。
translated by 谷歌翻译
Artificial Intelligence (AI) is having a tremendous impact across most areas of science. Applications of AI in healthcare have the potential to improve our ability to detect, diagnose, prognose, and intervene on human disease. For AI models to be used clinically, they need to be made safe, reproducible and robust, and the underlying software framework must be aware of the particularities (e.g. geometry, physiology, physics) of medical data being processed. This work introduces MONAI, a freely available, community-supported, and consortium-led PyTorch-based framework for deep learning in healthcare. MONAI extends PyTorch to support medical data, with a particular focus on imaging, and provide purpose-specific AI model architectures, transformations and utilities that streamline the development and deployment of medical AI models. MONAI follows best practices for software-development, providing an easy-to-use, robust, well-documented, and well-tested software framework. MONAI preserves the simple, additive, and compositional approach of its underlying PyTorch libraries. MONAI is being used by and receiving contributions from research, clinical and industrial teams from around the world, who are pursuing applications spanning nearly every aspect of healthcare.
translated by 谷歌翻译
本文介绍了有关如何架构,设计和优化深神经网络(DNN)的最新概述,以提高性能并保留准确性。该论文涵盖了一组跨越整个机器学习处理管道的优化。我们介绍两种类型的优化。第一个改变了DNN模型,需要重新训练,而第二个则不训练。我们专注于GPU优化,但我们认为提供的技术可以与其他AI推理平台一起使用。为了展示DNN模型优化,我们在流行的Edge AI推理平台(Nvidia Jetson Agx Xavier)上改善了光流的最先进的深层网络体系结构之一,RAFT ARXIV:2003.12039。
translated by 谷歌翻译
在过去十年中,已经开发出新的深度学习(DL)算法,工作负载和硬件来解决各种问题。尽管工作量和硬件生态系统的进步,DL系统的编程方法是停滞不前的。 DL工作负载从DL库中的高度优化,特定于平台和不灵活的内核,或者在新颖的操作员的情况下,通过具有强大性能的DL框架基元建立参考实现。这项工作介绍了Tensor加工基元(TPP),一个编程抽象,用于高效的DL工作负载的高效,便携式实现。 TPPS定义了一组紧凑而多才多艺的2D张镜操作员(或虚拟张量ISA),随后可以用作构建块,以在高维张量上构建复杂的运算符。 TPP规范是平台 - 不可行的,因此通过TPPS表示的代码是便携式的,而TPP实现是高度优化的,并且特定于平台。我们展示了我们使用独立内核和端到端DL&HPC工作负载完全通过TPPS表达的方法的效力和生存性,这在多个平台上优于最先进的实现。
translated by 谷歌翻译
Pennylane是用于量子计算机可区分编程的Python 3软件框架。该库为近期量子计算设备提供了统一的体系结构,支持量子和连续变化的范例。 Pennylane的核心特征是能够以与经典技术(例如反向传播)兼容的方式来计算变异量子电路的梯度。因此,Pennylane扩展了在优化和机器学习中常见的自动分化算法,以包括量子和混合计算。插件系统使该框架与任何基于门的量子模拟器或硬件兼容。我们为硬件提供商提供插件,包括Xanadu Cloud,Amazon Braket和IBM Quantum,允许Pennylane优化在公开访问的量子设备上运行。在古典方面,Pennylane与加速的机器学习库(例如Tensorflow,Pytorch,Jax和Autograd)接口。 Pennylane可用于优化变分的量子本素体,量子近似优化,量子机学习模型和许多其他应用。
translated by 谷歌翻译
分布式培训已成为培训大型神经网络(NN)模型的普遍性和有效的方法,该模型加工大规模数据。然而,满足来自各种NN模型,多样化计算资源的要求以及在培训工作期间的动态变化是非常挑战的。在这项研究中,我们在系统的端到端视图中设计了我们的分布式训练框架,以提供不同场景的内置自适应能力,特别是对于工业应用和生产环境,通过完全考虑资源分配,模型分区,任务放置和分布式执行。基于统一的分布式图和统一群集对象,我们的自适应框架配备了全球成本模型和全局计划者,可以实现任意并行,资源感知的放置,多模式执行,容错和弹性分布式。训练。实验表明,我们的框架可以满足应用程序的多样性和资源的异质性满足各种要求和具有竞争力的性能。具有260亿参数的Ernie语言模型在数千个AI处理器上有效地培训,可扩展性较弱的91.7%。通过采用异质管道异步执行,从推荐系统的模型的吞吐量可以分别增加到2.1倍,仅增加了GPU和CPU培训的3.3倍。此外,容错和弹性分布式培训已成功应用于在线工业应用,这减少了长期培训工作的数量,增加了34.49%,并在全球调度效率增加了33.91%生产环境。
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 谷歌翻译
随着深度学习模型的速度较大,需要进行大型型号培训的系统级解决方案。我们展示了Amazon Sagemaker模型并行性,这是一个与Pytorch集成的软件库,并且可以使用模型并行性和其他内存节省功能轻松培训大型模型。与现有解决方案相比,Sagemaker库的实现更通用,灵活,因为它可以自动分区和运行具有最小代码的任意模型架构上的管道并行性,并且还为张量并行度提供一般和可扩展的框架,它支持更广泛的用例,并且可以轻松应用于新培训脚本的模块化。该库还将本机Pytorch用户体验保留到更大的程度,支持模块重复使用和动态图形,同时让用户完全控制训练步骤的细节。我们评估GPT-3,Roberta,BERT和神经协作过滤的性能,并表现出对现有解决方案的竞争性能。
translated by 谷歌翻译
分散算法是一种计算形式,通过依赖于直接连接代理之间的低成本通信的本地动态实现全局目标。在涉及分布式数据集的大规模优化任务中,分散算法显示出强大,有时优越,性能与中央节点的分布式算法。最近,发展分散的深度学习算法引起了极大的关注。它们被视为使用参数服务器或环形恢复协议的那些的低通信开销替代方案。但是,缺乏易于使用和高效的软件包仅在纸上保持了最分散的算法。为了填补差距,我们介绍了Bluefog,一个Python库进行了直接的,高性能的不同分散算法的实现。基于各种通信操作的统一抽象,Bluefog提供直观的接口来实现分散的算法的频谱,从使用静态无向图的那些,用于使用动态和定向图形的同步操作进行异步操作。 Bluefog还采用了多种系统级加速技术,以进一步优化深度学习任务的性能。在主流DNN培训任务中,Bluefog达到了更高的吞吐量,并实现了一个总体上的吞吐量1.2 \ times \ sim 1.8 \ times $ speedup,这是一个基于环 - allyuce的最先进的分布式深度学习包。 Bluefog是https://github.com/bluefog-lib/bluefog的开源。
translated by 谷歌翻译
近来增加大型机器学习模型的趋势需要分发培训和推理任务。考虑到培训这些模型的巨大成本,必须在计算和沟通中解锁优化以获得最佳性能。然而,深入学习框架中的计算和通信内核之间的当前逻辑分离遍及此类障碍的优化机会。通过整体考虑破坏此抽象可以提供许多优化,以提供分布式工作负载中的性能改进。手动应用这些优化需要在每个场景中的底层计算和通信库中的修改,这是耗时和容易出错的。因此,我们呈现Coconet,用DSL表达具有计算和通信的程序。 Coconet包含几种机器学习感知转换,以优化程序和编译器以生成高性能内核。作为第一类构造的计算和通信允许用户在高级抽象上工作,并应用强大的优化,例如融合或传播和计算重叠。 Coconet使我们能够以几行代码在大型语言模型中优化数据,模型和管道平行工作负载。实验显示椰子显着优于最先进的分布式机器学习实现。
translated by 谷歌翻译
本文介绍了Halo 1.0,这是一种开放式的可扩展多代理软件框架,该框架实现了一组建议的硬件 - 不合命固式加速器编排(HALO)原理。Halo实现了一个新颖的以计算为中心的消息传递接口(C^2MPI)规范,以启用在异质加速器上的硬件 - 敏捷主机应用程序的性能便携式执行。基于Intel Xeon E5-2620 CPU,Intel Arria 10 GX FPGA和NVIDIA GEFORCE RTX RTX 2080 TI GPU的八个广泛使用的HPC子例程的实验结果表明,Halo 1.0允许在所有统一的控制流程中运行所有统一的控制流程。计算具有最高性能可移植性得分的设备,该设备的最高五个数量级比基于OPENCL的解决方案高五个数量级。
translated by 谷歌翻译
深度学习领域目睹了对极端计算和内存密集型神经网络的显着转变。这些较新的较大模型使研究人员能够推进各种领域的最先进的工具。这种现象刺激了在更多的硬件加速器上产生了针对神经网络的分布式训练的算法。在本文中,我们讨论并比较了当前的最先进的框架,以实现大规模的分布式深度学习。首先,我们调查分布式学习中的当前实践,并确定所使用的不同类型的并行性。然后,我们提出了对大型图像和语言培训任务的性能进行了经验结果。此外,我们解决了他们的统计效率和内存消耗行为。根据我们的结果,我们讨论了阻碍性能的每个框架的算法和实现部分。
translated by 谷歌翻译