Memory efficiency is crucial in training deep learning networks on resource-restricted devices. During backpropagation, forward tensors are used to calculate gradients. Despite the option of keeping those dependencies in memory until they are reused in backpropagation, some forward tensors can be discarded and recomputed later from saved tensors, so-called checkpoints. This allows, in particular, for resource-constrained heterogeneous environments to make use of all available compute devices. Unfortunately, the definition of these checkpoints is a non-trivial problem and poses a challenge to the programmer - improper or excessive recomputations negate the benefit of checkpointing. In this article, we present XEngine, an approach that schedules network operators to heterogeneous devices in low memory environments by determining checkpoints and recomputations of tensors. Our approach selects suitable resources per timestep and operator and optimizes the end-to-end time for neural networks taking the memory limitation of each device into account. For this, we formulate a mixed-integer quadratic program (MIQP) to schedule operators of deep learning networks on heterogeneous systems. We compare our MIQP solver XEngine against Checkmate, a mixed-integer linear programming (MILP) approach that solves recomputation on a single device. Our solver finds solutions that are up to 22.5 % faster than the fastest Checkmate schedule in which the network is computed exclusively on a single device. We also find valid schedules for networks making use of both central processing units and graphics processing units if memory limitations do not allow scheduling exclusively to the graphics processing unit.
translated by 谷歌翻译
手机等边缘设备上的微调模型将对敏感数据实现隐私的个性化。但是,在历史上,Edge训练仅限于具有简单体系结构的相对较小的模型,因为训练既是记忆力和能量密集型的。我们提出了诗人,这是一种算法,可以在存储器筛分的边缘设备上训练大型神经网络。诗人共同优化了重新布置和分页的综合搜索搜索空间,这两种算法可减少返回传播的记忆消耗。鉴于记忆预算和运行时间的限制,我们制定了一项混合成员线性计划(MILP),以进行最佳培训。我们的方法使培训能够在嵌入式设备上显着更大的模型,同时减少能源消耗,同时不修改反向传播的数学正确性。我们证明,可以在皮质类嵌入式设备的内存约束中微调RESNET-18和BERT,同时在能源效率方面的当前边缘训练方法的表现。诗人是一个开源项目,网址为https://github.com/shishirpatil/poet
translated by 谷歌翻译
最近,使用卷积神经网络(CNNS)存在移动和嵌入式应用的爆炸性增长。为了减轻其过度的计算需求,开发人员传统上揭示了云卸载,突出了高基础设施成本以及对网络条件的强烈依赖。另一方面,强大的SOC的出现逐渐启用设备执行。尽管如此,低端和中层平台仍然努力充分运行最先进的CNN。在本文中,我们展示了Dyno,一种分布式推断框架,将两全其人的最佳框架结合起来解决了几个挑战,例如设备异质性,不同的带宽和多目标要求。启用这是其新的CNN特定数据包装方法,其在onloading计算时利用CNN的不同部分的精度需求的可变性以及其新颖的调度器,该调度器共同调谐分区点并在运行时传输数据精度适应其执行环境的推理。定量评估表明,Dyno优于当前最先进的,通过竞争对手的CNN卸载系统,在竞争对手的CNN卸载系统上提高吞吐量超过一个数量级,最高可达60倍的数据。
translated by 谷歌翻译
ALPA通过生成统一数据,操作员和管道并行性的执行计划来自动对大型深度学习(DL)模型的模型平行训练。现有的模型并行训练系统要求用户手动创建并行化计划,或者自动从有限的模型并行性配置中生成一个计划。它们不足以在分布式计算设备上扩展复杂的DL模型。 ALPA通过将并行性视为两个层次级别来分配大型DL模型的训练:操作员和操作员并行性。基于它,ALPA构建了一个新的分层空间,用于大规模的模型并行执行计划。 ALPA设计了许多汇编,以在每个并行性级别自动得出有效的并行执行计划。 ALPA实现了有效的运行时,以在分布式计算设备上协调两级并行执行。我们的评估表明,ALPA生成的并行化计划,即使在其设计的型号上,也可以匹配或超过手动模型并联训练系统。与专业系统不同,ALPA还推广到具有异质体系结构和模型的模型,而没有手动设计的计划。 ALPA的源代码可在https://github.com/alpa-projects/alpa上公开获得
translated by 谷歌翻译
The recent breakthroughs in machine learning (ML) and deep learning (DL) have enabled many new capabilities across plenty of application domains. While most existing machine learning models require large memory and computing power, efforts have been made to deploy some models on resource-constrained devices as well. There are several systems that perform inference on the device, while direct training on the device still remains a challenge. On-device training, however, is attracting more and more interest because: (1) it enables training models on local data without needing to share data over the cloud, thus enabling privacy preserving computation by design; (2) models can be refined on devices to provide personalized services and cope with model drift in order to adapt to the changes of the real-world environment; and (3) it enables the deployment of models in remote, hardly accessible locations or places without stable internet connectivity. We summarize and analyze the-state-of-art systems research to provide the first survey of on-device training from a systems perspective.
translated by 谷歌翻译
预训练的模型(PTM)正在革新人工智能(AI)技术。但是,PTM培训的硬件要求非常高,使其成为一小部分人的游戏。因此,我们提出了Patrickstar系统,以降低PTM的硬件要求,并使所有人都可以使用。 Patrickstar使用CPU-GPU异质存储空间来存储模型数据。与现有作品不同,我们在内存块中组织模型数据,并在异质内存中动态分配它们。在热身迭代中收集的运行时内存统计的指导下,块在异质内存中有效地精心策划,并生成较低的CPU-GPU数据传输量和较高的带宽利用率。与零冗余优化器的共生,Patrickstar量表在多个节点上均为多个GPU。 %使用数据并行性。该系统可以在更大的型号和较大的批次大小上训练任务,这是现有工程无法完成的。实验结果表明,Patrickstar扩展了模型量表2.27和2.5倍,并且始终显示出更高的执行速度。 Patricstar还成功地在32 GPU集群上成功运行了175B GPT3培训任务。我们的代码可在https://github.com/tencent/patrickstar上公开获取。
translated by 谷歌翻译
We study a novel and important communication pattern in large-scale model-parallel deep learning (DL), which we call cross-mesh resharding. This pattern emerges when the two paradigms of model parallelism - intra-operator and inter-operator parallelism - are combined to support large models on large clusters. In cross-mesh resharding, a sharded tensor needs to be sent from a source device mesh to a destination device mesh, on which the tensor may be distributed with the same or different layouts. We formalize this as a many-to-many multicast communication problem, and show that existing approaches either are sub-optimal or do not generalize to different network topologies or tensor layouts, which result from different model architectures and parallelism strategies. We then propose two contributions to address cross-mesh resharding: an efficient broadcast-based communication system, and an "overlapping-friendly" pipeline schedule. On microbenchmarks, our overall system outperforms existing ones by up to 10x across various tensor and mesh layouts. On end-to-end training of two large models, GPT-3 and U-Transformer, we improve throughput by 10% and 50%, respectively.
translated by 谷歌翻译
丹尼德缩放结束和摩尔法的放缓使能量使用数据中心在不可持续的道路上。数据中心已经是全球电力使用的大部分,应用需求以快速缩放。我们认为,数据中心计算的碳强度的大幅减少可以通过以软件为中心的方法来实现:通过修改系统API,通过修改系统API来使应用程序开发人员可见的能量和碳,使其成为可能进行知情的贸易性能和碳排放之间,并通过提高应用程序编程水平,以便灵活地使用更节能的计算和存储方法。我们还为系统软件奠定了一个研究议程,以减少数据中心计算的碳足迹。
translated by 谷歌翻译
在过去十年中,已经开发出新的深度学习(DL)算法,工作负载和硬件来解决各种问题。尽管工作量和硬件生态系统的进步,DL系统的编程方法是停滞不前的。 DL工作负载从DL库中的高度优化,特定于平台和不灵活的内核,或者在新颖的操作员的情况下,通过具有强大性能的DL框架基元建立参考实现。这项工作介绍了Tensor加工基元(TPP),一个编程抽象,用于高效的DL工作负载的高效,便携式实现。 TPPS定义了一组紧凑而多才多艺的2D张镜操作员(或虚拟张量ISA),随后可以用作构建块,以在高维张量上构建复杂的运算符。 TPP规范是平台 - 不可行的,因此通过TPPS表示的代码是便携式的,而TPP实现是高度优化的,并且特定于平台。我们展示了我们使用独立内核和端到端DL&HPC工作负载完全通过TPPS表达的方法的效力和生存性,这在多个平台上优于最先进的实现。
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 谷歌翻译
张量程序的自动安排是一个过程,搜索算法自动探索了目标硬件平台上给定程序的候选时间表(程序转换)以提高其性能。但是,这可能是一个非常耗时的过程,具体取决于张量程序的复杂性和目标设备的容量,通常会探索成千上万的程序变体。为了解决这个问题,在本文中,我们介绍了转移调整的想法,一种新颖的方法来识别和重用张量程序之间的自动安排。我们使用深度神经网络(DNN)演示了这一概念,从预先调整的DNN中采取了一组自动安排,并使用它们来减少新DNN的推理时间。我们将转移调整与最先进的ANSOR自动安装程序进行了比较,将给定DNN模型的最大速度定义为Ansor使用其建议的完整调整时间来实现的目标。在服务器级CPU上以及在11种广泛使用的DNN型号上,我们观察到,转移调整可达到$ 88.41 \%$($ 49.13 \%\%\%$)的最大速度,而ANSOR则需要$ 6.5 \ tims $ $ $ $ $ $平均与之匹配。我们还评估了在受约束的边缘CPU上进行转移调节,并观察到搜索时间的差异会加剧,Ansor需要$ 10.8 \ times $ $ $ $ $ $,以匹配转移调整的速度,这进一步证明了其价值。我们的代码可从https://www.github.com/giclab/transfer-tuning获得
translated by 谷歌翻译
最近,深度学习一直是一个激烈的研究领域。然而,作为一种计算密集型任务,深度学习高度依赖于GPU内存的规模,这通常是令人望而却步和稀缺的。虽然已经提出了一种广泛的作品来动态GPU存储器管理,但它们很难应用于具有多种动态工作负载的系统,例如在数据库内机器学习系统。在本文中,我们展示了拉伸,这是一种在张量粒度中管理GPU存储器的方法,以减少GPU存储器峰值,考虑多个动态工作负载。Tensile在以前的作品中解决了现有的冷启动和跨迭代调度问题。我们在自己建造的深度学习框架上实施张力,并评估其性能。实验结果表明,拉伸可以节省更多的GPU存储器,而不是单个动态工作负载方案中的先前工作的额外时间较少。
translated by 谷歌翻译
深度学习的快速进步正在导致一系列快速变化的模型,对计算的需求急剧增长。但是,随着框架将性能优化专门针对流行网络的模式,它们隐含地限制了推动研究进展的新颖和多样化的模型。我们通过定义灵活和用户可定制的管道来优化基于数据运动最小化的任意深神经网络的培训来赋予深度学习研究人员的能力。管道始于Pytorch或ONNX中的标准网络,并通过逐步降低转换计算。我们定义了四个级别的通用转换级别,从局部操作员优化到全球数据运动减少。这些在以数据为中心的图形中间表示上运行,该表示在各个级别的抽象级别表达计算和数据移动,包括扩展基本运算符,例如其基础计算的卷积。设计的核心是管道的互动性和内省性质。每个部分都可以通过Python API扩展,并且可以使用GUI进行交互调整。我们在十个不同的网络上展示了竞争性能或加速性,交互式优化发现了高效网络中的新机会。
translated by 谷歌翻译
我们呈现GSPMD,一种用于公共机器学习计算的自动,基于编译的并行化系统。它允许用户以与单个设备的方式相同的方式编写程序,然后通过关于如何分发Tensors的一些注释来提供提示,基于哪个GSPMD将并行化计算。其分区的表示简单尚不一般,允许它在各种模型上表达并行性的不同或混合范式。GSPMD基于有限的用户注释为每个运算符的分区Inventing,使得缩放现有的单设备程序方便。它解决了生产使用的几种技术挑战,允许GSPMD实现50%至62%的计算利用率,用于高达2048个云TPUv3核心,适用于高达1万亿参数的模型。
translated by 谷歌翻译
有限的GPU记忆资源阻碍了深度神经网络的进一步发展。因此,高度要求GPU内存资源的优化。通常应用交换和重新计算,以更好地利用GPU记忆。但是,作为一个新兴领域,仍然存在一些挑战:1)静态和动态方法的重新计算效率受到限制。 2)交换需要手动卸载参数,这会产生巨大的时间成本。 3)没有这种动态和细粒的方法,涉及张量与当今的张量重新组件一起交换。为了纠正上述问题,我们提出了一个名为Delta(动态张量卸载和重新组件)的新型调度程序经理。据我们所知,我们是第一个在没有用户监督的情况下进行张量交换和张量重新组合的合理的动态运行时间调度程序。在Delta中,我们提出了一种过滤器算法,以选择要从GPU内存中释放出来的最佳张量,并提出导演算法,以选择每个张量的适当动作。此外,故意考虑预取和重叠以克服交换和重新计算张量引起的时间成本。实验结果表明,DELTA不仅节省了40%-70%的GPU记忆,从而超过了最新方法,而且还获得了可比的收敛结果,并获得了可接受的时间延迟。此外,与基准相比,当训练Resnet-101训练Resnet-101时,Delta在训练Resnet-50和2.25 $ \ times $时获得2.04 $ \ times $最大批量。此外,我们实验中的交换成本和重新计算成本之间的比较表明,在张量交换和张量重新计算上制定合理的动态调度程序的重要性,这在某些相关工作中反驳了交换应该是第一个也是最好的选择。
translated by 谷歌翻译
在过去的十年中,深度神经网络(DNNS)的规模成倍增长,只剩下那些具有大量基于数据中心的资源的人具有开发和培训此类模型的能力。对于可能只有有限的资源(例如,单个多GPU服务器)的研究人员的长尾巴的主要挑战之一是GPU内存能力与模型大小相比。问题是如此严重,以至于训练大规模DNN模型的内存需求通常可以超过单个服务器上所有可用GPU的总容量;这个问题只会随着不断增长的模型大小的趋势而变得更糟。当前依赖于虚拟化GPU内存的解决方案(通过向CPU内存交换/从CPU内存)会产生过多的交换开销。在本文中,我们提出了一个新的培训框架,和谐和倡导者,重新思考了DNN框架如何安排计算并移动数据以在单个商品服务器上有效地推动培训大规模模型的边界。在各种大型DNN模型中,Harmony能够将交换负载最多减少两个数量级,并在具有虚拟化内存的高度优化基线上获得高达7.6倍的训练吞吐量加速。
translated by 谷歌翻译
现代消费电子设备已为其主要功能采用了深度学习的情报服务。供应商最近开始在设备上执行情报服务,以在设备中保存个人数据,降低网络和云成本。我们发现了通过使用用户数据更新神经网络的情况,而无需将数据暴露在设备中:设备培训。例如,我们可能会添加一个新课程,我的狗Alpha用于机器人真空吸尘器,适应用户口音的语音识别,让文本到语音说话,好像用户会说话。但是,目标设备的资源限制遇到了重大困难。我们建议NNTrainer,这是一个轻巧的设备培训框架。我们描述了NNTrainer实施的神经网络的优化技术,这些技术与传统一起评估。评估表明,NNTrainer可以将内存消耗降低至1/28,而不会恶化准确性或训练时间,并有效地个性化了对设备上的应用程序。 NNTrainer是跨平台和实用的开源软件,该软件正在作者隶属关系中部署到数百万个设备。
translated by 谷歌翻译
分布式培训已成为培训大型神经网络(NN)模型的普遍性和有效的方法,该模型加工大规模数据。然而,满足来自各种NN模型,多样化计算资源的要求以及在培训工作期间的动态变化是非常挑战的。在这项研究中,我们在系统的端到端视图中设计了我们的分布式训练框架,以提供不同场景的内置自适应能力,特别是对于工业应用和生产环境,通过完全考虑资源分配,模型分区,任务放置和分布式执行。基于统一的分布式图和统一群集对象,我们的自适应框架配备了全球成本模型和全局计划者,可以实现任意并行,资源感知的放置,多模式执行,容错和弹性分布式。训练。实验表明,我们的框架可以满足应用程序的多样性和资源的异质性满足各种要求和具有竞争力的性能。具有260亿参数的Ernie语言模型在数千个AI处理器上有效地培训,可扩展性较弱的91.7%。通过采用异质管道异步执行,从推荐系统的模型的吞吐量可以分别增加到2.1倍,仅增加了GPU和CPU培训的3.3倍。此外,容错和弹性分布式培训已成功应用于在线工业应用,这减少了长期培训工作的数量,增加了34.49%,并在全球调度效率增加了33.91%生产环境。
translated by 谷歌翻译
In this paper, we present PARTIME, a software library written in Python and based on PyTorch, designed specifically to speed up neural networks whenever data is continuously streamed over time, for both learning and inference. Existing libraries are designed to exploit data-level parallelism, assuming that samples are batched, a condition that is not naturally met in applications that are based on streamed data. Differently, PARTIME starts processing each data sample at the time in which it becomes available from the stream. PARTIME wraps the code that implements a feed-forward multi-layer network and it distributes the layer-wise processing among multiple devices, such as Graphics Processing Units (GPUs). Thanks to its pipeline-based computational scheme, PARTIME allows the devices to perform computations in parallel. At inference time this results in scaling capabilities that are theoretically linear with respect to the number of devices. During the learning stage, PARTIME can leverage the non-i.i.d. nature of the streamed data with samples that are smoothly evolving over time for efficient gradient computations. Experiments are performed in order to empirically compare PARTIME with classic non-parallel neural computations in online learning, distributing operations on up to 8 NVIDIA GPUs, showing significant speedups that are almost linear in the number of devices, mitigating the impact of the data transfer overhead.
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 谷歌翻译