17
Gradient Compression Supercharged High-Performance Data Parallel DNN Training Youhui Bai 1 , Cheng Li 1,4 , Quan Zhou 1 , Jun Yi 2 , Ping Gong 1 , Feng Yan 2 , Ruichuan Chen 3 , Yinlong Xu 1,4 1 University of Science and Technology of China 2 University of Nevada, Reno 3 Nokia Bell Labs 4 Anhui Province Key Laboratory of High Performance Computing Abstract Gradient compression is a promising approach to alleviating the communication bottleneck in data parallel deep neural network (DNN) training by signifcantly reducing the data volume of gradients for synchronization. While gradient compression is being actively adopted by the industry (e.g., Facebook and AWS), our study reveals that there are two critical but often overlooked challenges: 1) inefcient coor- dination between compression and communication during gradient synchronization incurs substantial overheads, and 2) developing, optimizing, and integrating gradient compres- sion algorithms into DNN systems imposes heavy burdens on DNN practitioners, and ad-hoc compression implementa- tions often yield surprisingly poor system performance. In this paper, we frst propose a compression-aware gra- dient synchronization architecture, CaSync, which relies on a fexible composition of basic computing and communi- cation primitives. It is general and compatible with any gradient compression algorithms and gradient synchroniza- tion strategies, and enables high-performance computation- communication pipelining. We further introduce a gradi- ent compression toolkit, CompLL, to enable efcient devel- opment and automated integration of on-GPU compression algorithms into DNN systems with little programming bur- den. Lastly, we build a compression-aware DNN training framework HiPress with CaSync and CompLL. HiPress is open-sourced and runs on mainstream DNN systems such as MXNet, TensorFlow, and PyTorch. Evaluation via a 16-node cluster with 128 NVIDIA V100 GPUs and 100Gbps network shows that HiPress improves the training speed over cur- rent compression-enabled systems (e.g., BytePS-onebit and Ring-DGC) by 17.2%-69.5% across six popular DNN models. CCS Concepts: · Computer systems organization Dis- tributed architectures; Neural networks. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for proft or commercial advantage and that copies bear this notice and the full citation on the frst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specifc permission and/or a fee. Request permissions from [email protected]. SOSP ’21, October 26ś29, 2021, Virtual Event, Germany © 2021 Association for Computing Machinery. ACM ISBN 978-1-4503-8709-5/21/10. htps://doi.org/10.1145/3477132.3483553 Keywords: DNN training, gradient compression ACM Reference Format: Youhui Bai 1 , Cheng Li 1,4 , Quan Zhou 1 , Jun Yi 2 , Ping Gong 1 , Feng Yan 2 , Ruichuan Chen 3 , Yinlong Xu 1,4 . 2021. Gradient Compression Supercharged High-Performance Data Parallel DNN Training. In ACM SIGOPS 28th Symposium on Operating Systems Principles (SOSP ’21), October 26ś29, 2021, Virtual Event, Germany. ACM, New York, NY, USA, 17 pages. htps://doi.org/10.1145/3477132.3483553 1 Introduction To efciently train large DNN models over the continuously growing datasets, it has been a norm to employ data parallel DNN training to explore massive parallelism in an increas- ingly large cluster of GPU nodes [18, 45, 47, 64, 81]. In a typical setting, each node iterates over its own data partition in parallel, and exchanges a large volume of gradients with other nodes per iteration via a gradient synchronization strat- egy like Parameter Server (PS) [30, 34] or Ring-allreduce [7]. However, in recent years, the fast-growing computing capability, driven by the booming of GPU architecture inno- vations [49] and domain-specifc compiler techniques [14, 17, 57, 58], tends to result in more frequent and heavier gradient synchronization during data parallel DNN train- ing. This trend puts high pressure on the slower-growing bandwidth and reduces the chance of pipelining computa- tion and communication during training. We have found that, even with the latest highly-optimized BytePS [30] and Ring-allreduce [64] synchronization strategies, the commu- nication time for gradient synchronization still accounts for 63.6% and 76.8% of the total time for training the Bert-large and Transformer models across 16 AWS EC2 instances, each with 8 NVIDIA V100 GPUs, in a 100Gbps network. Thus, there is a fundamental tension between gradient communica- tion and computation in data parallel DNN training [61]. Gradient compression algorithms have a great potential to relieve or even eliminate the above tension, since they can substantially reduce the data volume being synchronized with a negligible impact on training accuracy and conver- gence [4, 37, 67, 74, 76]. This practice of gradient compression is being adopted by the industry. In fact, the eforts from Face- book and AWS to bring gradient compression to mainstream DNN systems have begun since June 2020 [5, 20]. However, our experiment shows that the actual training speedups of compression-enabled DNN systems are far behind their ex- pectations. For instance, applying gradient compression to

Gradient Compression Supercharged High-Performance Data

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Gradient Compression Supercharged High-Performance Data

Gradient Compression SuperchargedHigh-Performance Data Parallel DNN Training

Youhui Bai1 Cheng Li14 Quan Zhou1 Jun Yi2 Ping Gong1 Feng Yan2 Ruichuan Chen3 Yinlong Xu14

1University of Science and Technology of China 2University of Nevada Reno 3Nokia Bell Labs4Anhui Province Key Laboratory of High Performance Computing

Abstract

Gradient compression is a promising approach to alleviatingthe communication bottleneck in data parallel deep neuralnetwork (DNN) training by significantly reducing the datavolume of gradients for synchronization While gradientcompression is being actively adopted by the industry (egFacebook and AWS) our study reveals that there are twocritical but often overlooked challenges 1) inefficient coor-dination between compression and communication duringgradient synchronization incurs substantial overheads and2) developing optimizing and integrating gradient compres-sion algorithms into DNN systems imposes heavy burdenson DNN practitioners and ad-hoc compression implementa-tions often yield surprisingly poor system performanceIn this paper we first propose a compression-aware gra-

dient synchronization architecture CaSync which relies ona flexible composition of basic computing and communi-cation primitives It is general and compatible with anygradient compression algorithms and gradient synchroniza-tion strategies and enables high-performance computation-communication pipelining We further introduce a gradi-ent compression toolkit CompLL to enable efficient devel-opment and automated integration of on-GPU compressionalgorithms into DNN systems with little programming bur-den Lastly we build a compression-aware DNN trainingframework HiPress with CaSync and CompLL HiPress isopen-sourced and runs on mainstream DNN systems such asMXNet TensorFlow and PyTorch Evaluation via a 16-nodecluster with 128 NVIDIA V100 GPUs and 100Gbps networkshows that HiPress improves the training speed over cur-rent compression-enabled systems (eg BytePS-onebit andRing-DGC) by 172-695 across six popular DNN models

CCSConcepts middotComputer systems organizationrarrDis-

tributed architectures Neural networks

Permission to make digital or hard copies of all or part of this work for

personal or classroom use is granted without fee provided that copies are not

made or distributed for profit or commercial advantage and that copies bear

this notice and the full citation on the first page Copyrights for components

of this work owned by others than ACMmust be honored Abstracting with

credit is permitted To copy otherwise or republish to post on servers or to

redistribute to lists requires prior specific permission andor a fee Request

permissions from permissionsacmorg

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

copy 2021 Association for Computing Machinery

ACM ISBN 978-1-4503-8709-52110

httpsdoiorg10114534771323483553

Keywords DNN training gradient compression

ACM Reference Format

Youhui Bai1 Cheng Li14 Quan Zhou1 Jun Yi2 Ping Gong1 Feng

Yan2 Ruichuan Chen3 Yinlong Xu14 2021 Gradient Compression

Supercharged High-Performance Data Parallel DNN Training In

ACM SIGOPS 28th Symposium on Operating Systems Principles (SOSP

rsquo21) October 26ś29 2021 Virtual Event Germany ACM New York

NY USA 17 pages httpsdoiorg10114534771323483553

1 Introduction

To efficiently train large DNN models over the continuouslygrowing datasets it has been a norm to employ data parallelDNN training to explore massive parallelism in an increas-ingly large cluster of GPU nodes [18 45 47 64 81] In atypical setting each node iterates over its own data partitionin parallel and exchanges a large volume of gradients withother nodes per iteration via a gradient synchronization strat-egy like Parameter Server (PS) [30 34] or Ring-allreduce [7]However in recent years the fast-growing computing

capability driven by the booming of GPU architecture inno-vations [49] and domain-specific compiler techniques [1417 57 58] tends to result in more frequent and heaviergradient synchronization during data parallel DNN train-ing This trend puts high pressure on the slower-growingbandwidth and reduces the chance of pipelining computa-tion and communication during training We have foundthat even with the latest highly-optimized BytePS [30] andRing-allreduce [64] synchronization strategies the commu-nication time for gradient synchronization still accounts for636 and 768 of the total time for training the Bert-largeand Transformer models across 16 AWS EC2 instances eachwith 8 NVIDIA V100 GPUs in a 100Gbps network Thusthere is a fundamental tension between gradient communica-

tion and computation in data parallel DNN training [61]Gradient compression algorithms have a great potential

to relieve or even eliminate the above tension since they cansubstantially reduce the data volume being synchronizedwith a negligible impact on training accuracy and conver-gence [4 37 67 74 76] This practice of gradient compressionis being adopted by the industry In fact the efforts from Face-book and AWS to bring gradient compression to mainstreamDNN systems have begun since June 2020 [5 20] Howeverour experiment shows that the actual training speedups ofcompression-enabled DNN systems are far behind their ex-pectations For instance applying gradient compression to

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

the aforementioned Transformer training achieves only a13times speedup 381 lower than the expected performanceThe gap becomes even larger in a lower-bandwidth networkThis surprising observation drives us to rethink gradientcompression from the system perspective

To fully unleash the benefits of gradient compression onlyan efficient compression algorithm is not sufficient The com-pressed gradients are not directly aggregatable and they arenot compatible with common optimizations (such as gradientpartitioning and batching) used in the conventional gradi-ent synchronization strategies In the current compression-enabled DNN system designs the computational overheadintroduced by gradient compression is often overlooked andcould be greatly amplified along the gradient synchroniza-tion path Therefore the first challenge we have to addressis how to amortize the extra computational overhead alongthe communication steps during gradient synchronizationwhereby the computation and communicationmay have datadependencies This requires us to revisit the original designchoices across existing gradient synchronization strategies toidentify the right granularity of combining and coordinatingvarious gradient compression and communication operatorsSecond a sophisticated systematic support for compressionawareness is generally lackingWithout such a support DNNpractitioners cannot live up to the full promise of gradientcompression to accelerate DNN training The adoption of gra-dient compression also becomes difficult because substantialsystem expertise and manual efforts are required for devel-oping optimizing and integrating individual compressionalgorithm into DNN systemsIn this paper we address these systems challenges to

bridge the gap between gradient compression and synchro-nization in data parallel DNN training We first propose ageneral composable gradient synchronization architecturecalled CaSync which enables a compression-aware gradientsynchronization with a composition of decoupled communi-cation aggregation and compression primitives This fine-grained composition allows us to strike a balance between 1)the effective pipelining of computational and communicationtasks to hide communication overhead behind compression-related computation and vice versa and 2) the efficient bulkyexecution of smaller tasks Furthermore CaSync employs aselective compression and partitioning mechanism to decidewhether to compress each gradient and how to partition largegradients (before compression) to optimally leverage pipelin-ing and parallel processing It is worth mentioning that ourCaSync architecture is intentionally designed to be generaland not tie to specific gradient compression algorithms andsynchronization strategies (eg PS or Ring-allreduce) so thatits benefits are applicable to existing and potentially futurecompression algorithms and synchronization strategies

Second we advocate that the on-GPU compression is thepreferred approach for gradient compression consideringGPU has much higher bandwidth and processor density than

CPU and gradients are produced in GPU directly This cre-ates new opportunities to further optimize the compression-communication pipeline during gradient synchronizationHowever developing and optimizing gradient compressionalgorithms on GPU is non-trivial and usually requires sig-nificant system expertise and manual efforts To relieve theburden on DNN practitioners we design and develop a gra-dient compression toolkit named CompLL which facilitatesthe compression algorithm development and its integrationon GPU CompLL provides a unified API abstraction and ex-poses a library of highly-optimized common operators thatcan be used to construct sophisticated gradient compressionalgorithms CompLL also offers a domain specific language toallow practitioners to specify their algorithm logic which isthen converted into efficient low-level GPU implementationand automatically integrated into DNN systems with littlehuman interventionFor easy adoption we build a compression-aware data

parallel DNN training framework called HiPress with bothCaSync and CompLL HiPress is compatible with mainstreamDNN systems (ie MXNet TensorFlow and PyTorch) andwe have open-sourced it at [2] We use CompLL in HiPress

to construct five state-of-the-art compression algorithms(ie onebit [62] TBQ [67] TernGrad [74] DGC [37] andGradDrop [4]) with only 23 lines of CompLL code on av-erage and they achieve significant performance speedupsover open-source counterparts We train six widely-usedDNN models across the computer vision and natural lan-guage processing fields using a 16-node cluster on AWS EC2with 128 NVIDIA V100 GPUs and 100Gbps network linksExperimental results show that HiPress achieves speed im-provements of 173-1105 and 172-695 compared withnon-compression systems (including the latest BytePS) andcurrent compression-enabled systems (eg BytePS-onebitand Ring-DGC) respectively The results in a lower-end16-node cluster with 32 1080Ti GPUs and 56Gbps networkshow a similar trend Lastly HiPress does not sacrifice theconvergence and accuracy claims of exercised algorithms

2 Background and Motivation

21 Data Parallel DNN Training

A DNN model typically consists of multiple neural networklayers each of which contains a large number of parametersTraining a DNN model needs to iterate over a dataset manytimes (ie epochs) towards convergence [77] Each epochis further split into iterations Data parallel DNN trainingenables each training node to consume data from its ownpartition of the training dataset In each iteration trainingnodes independently run forward and backward propaga-tion to generate gradients which are then synchronized withother nodes to collectively update the global model parame-ters This group coordination can be done synchronously orasynchronously The former case often acts as a distributed

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Server0

Server1

Worker0

Worker1

Worker2

②ത119840 ത119840 ത119840①119840120782 119840120783 119840120784(a) Parameter Server (PS)

②119840120782 + 119840120783Worker

0

Worker2

Worker1

①119840120782③ത119840 ④ത119840

(b) Ring-allreduce

Figure 1 Gradient synchronization strategies For Parame-ter Server (PS) we only show interactions between 1198781198901199031199071198901199030and119908119900119903119896119890119903119904 for clarity

barrier for convergence guarantees [84] while the latter caseeliminates the negative impact of stragglers at the cost ofpossibly not converging We focus on synchronous gradientcoordination because of its wide adoption [1 13 32 56]

22 Gradient Synchronization

Parameter Server (PS) [34 55] and AllReduce [7 16 42 64]are two widely-adopted gradient synchronization strategiesParameter Server In Figure 1a each node acts as a serveror a worker [34] DNN model parameters and gradients areoften partitioned across multiple servers for load balancingWhen local training completes each worker pushes gradi-ents to servers (①) which are then aggregated and updatedto model parameters Afterwards each worker pulls the up-dated results from servers to trigger the next iteration (②)AllReduce This strategy uses collective communicationprimitives One representative example is Ring-allreduce [7]where all nodes are workers and they form a logical ringAs shown in Figure 1b it takes 119873 minus 1 communication stepsalong the ring to aggregate gradients (①-②) and another119873minus1steps to disseminate the updated gradient (③-④) where 119873is the number of workers Furthermore Ring-allreduce canbatch gradients which are then partitioned again for loadbalancing Following this at each synchronization step eachworker simultaneously sends a partition to its successor andreceives another partition from its predecessor to best utilizeits bi-directional network bandwidth [54]

23 Computation and Communication Tension

Modern DNN systems pipeline computation and communi-cation for better performance eg via running the gradientcommunication and DNN backward computation of twoDNN layers in parallel to hide the former overhead behindthe latter when possible However there exists a fundamentaltension between computation and communication [61]The recent DNN accelerator booming [49] and domain-

specific compiler advancement [14 17 57 58] have signifi-cantly improved the single-node training speed Such fast-advancing computing capabilities typically lead to morefrequent gradient synchronization and thus put high pres-sure on the network infrastructure However the networkupgrade does not keep up the pace of the computation-related advancements [39 41 51 75] The imbalance between

Table 1 Training performance of Bert-large and Trans-former with 16 AWS p3dn24xlarge instances (8 V100 GPUseach) 100Gbps BytePS 025 Horovod 0192 fp32 precision

System

configurations

Scaling

efficiency

Communication

ratio

Trans-

former

Ring-allreduce

wo compression047 768

Ring-allreduce w

DGC compression061 (298uarr) 703 (85darr)

Bert-

large

BytePS

wo compression071 636

BytePS w

onebit compression076 (70uarr) 609 (42darr)

the fast-advancing computing capability and the slower-advancing communication capability increasingly reducesthe chance of pipelining the gradient communication andcomputationA few software approaches have been recently proposed

to optimize the computation-communication pipeline rang-ing from priority-based gradient scheduling and partition-ing [56] to advanced synchronization architectures [30 64]However as shown in Table 1 the latest highly-optimizedBytePS [30] and Ring-allreduce [64] only achieve scalingefficiencies1 of 071 and 047 when training two popularDNN models (Bert-large and Transformer) in a cluster of16 nodes on AWS EC2 with 128 NVIDIA V100 GPUs and100Gbps network The communication time accounts for upto 768 of the total training time for training these two mod-els with significant portion not being hidden behind DNNcomputation This indicates that the fundamental tensionbetween gradient computation and communication persistsin data parallel DNN training even with the state-of-the-artapproaches and recent bandwidth advancements

24 Gradient Compression

Gradient compression is a general approach for reducingthe transmitted data volume during gradient synchroniza-tion [37 74] and has a great potential to alleviate the afore-mentioned communication bottleneck Indeed it is beingadopted by the industry and a number of recent efforts fromFacebook and AWS have started to integrate gradient com-pression into modern DNN systems since June 2020 [5 20]

The gradient compression algorithms generally fall withinthe sparsification and quantization categories Sparsificationleverages the sparsity of gradients and filters out insignifi-cant elements in the gradient matrix [4 32 37] while quanti-zation decreases the precision of gradients [67 74 76] For in-stance a 1-bit quantization enabled by onebit algorithm [62]could reduce the transmitted data volume by 969 Many

1Scaling efficiency is defined asactual_performance

119873timessingle_GPU_performance where 119873 is the

total number of GPUs with 1 being the best (ie linear scaling)

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

of these algorithms either theoretically prove or empiricallyvalidate that adopting them does not affect model conver-gence and imposes only a negligible impact on accuracy iea compression-enabled DNN training converges to approxi-mately the same accuracy through the same number of itera-tions compared with a non-compression training [37 67 74]

25 System Challenges and Opportunities

Surprisingly our study reveals that without proper systemsupport the gradient compressionrsquos benefits are diluted sig-nificantly at the best and could even negatively affect theoverall DNN training throughput at the worstOne important reason for this surprising observation is

that gradient compression requires non-negligible compu-tational overhead Alongside the gradient synchronizationpath an encode operator must precede sending fully or par-tially aggregated gradients and a decode operator must fol-low when receiving compressed gradients There could beup to 3119873 minus 2 extra operators for each gradient synchronizedacross 119873 workers These extra operators are needed becauseit is impossible to directly aggregate over compressed gra-dients due to the existence of metadata (in sparsification-based algorithms) or the potential overflow of operatinglow-precision numbers (in quantization-based algorithms)

The accumulated compression-related computational costduring gradient synchronization can significantly dilute itsbenefits of reducing the transmitted data volume To demon-strate this we train Bert-large with the onebit compres-sion [62] developed by AWS and integrated into MXNet withBytePS2 Table 1 shows that BytePS-onebit achieves a verylimited improvement over BytePS As another example theDGC compression [37] with 01 compression rate (where itis integrated into TensorFlow with the Ring-allreduce syn-chronization strategy) achieves only a 13times training speedupfor the Transformer model We discover that such limitedimprovements are mainly due to the co-design of BytePS andRing-allreduce with the compression algorithms wherebythe compression logic is separated and scattered across gradi-ent synchronization Such a co-design also makes it difficultto verify the correctness of the implemented algorithms aswell as to generalize to other gradient compression algo-rithms and synchronization strategies To enable a generalapproach it is important to separate the design of compres-sion algorithms from that of synchronization strategiesThe first challenge to address the aforementioned issues

lies in designing a generalizable approach to amortize theextra computational overhead brought by gradient compres-sion (eg encode and decode operators) along the communi-cation steps during gradient synchronization This is difficultdue to non-trivial factors including for instance the data

2The open-source onebit was implemented only on CPU [11] For a fair

comparison we have implemented and integrated a highly-optimized on-

GPU onebit into BytePS

dependencies between gradient computation and communi-cation the communication topology such as a bipartite graphfor PS and a ring for Ring-allreduce the compression speedand ratio of different compression algorithms to name a fewTo address this challenge the key is to identify the rightgranularity of combining and coordinating various gradientcompression and communication operators

Take Ring-allreduce as an example It coordinates the com-munication of all training nodes by running a global atomicbulk synchronization operation to complete 2(119873 minus 1) point-to-point communication steps for batched gradients Whilethis design is bandwidth-optimal [54] such a coarse-grainedapproach fails to hide the compression-related overhead be-hind the communication overhead Unlike Ring-allreducethe PS synchronization strategy (including the latest BytePS)exchanges gradients via individual micro point-to-point com-munication steps While such a fine-grained approach facil-itates a better computation-communication pipelining tohide compression-related computational overhead it incursa larger number of communication steps and in turn a pro-portionally growing extra computational overhead

The second challenge is to provide systematic support fordeveloping optimizing and integrating gradient compres-sion algorithms into DNN systems Without this support thereal-world adoption of gradient compression algorithms re-quires significant system expertise and manual efforts to per-form various ad-hoc development and optimization whichis particularly challenging for DNN practitioners Thus it isquite difficult if not impossible for gradient compression tolive up to its full promise of accelerating DNN trainingTo provide a general system support for various algo-

rithms one critical question to answer is where to performtheir computation eg on CPU or GPU We observe thatcompression algorithms typically need to scan large gradientmatrices multiple times to filter out insignificant gradients orto decrease the precision of gradients Therefore they are ex-tremely memory-intensive and require massive parallelismto achieve fast compression (and decompression) We believethe on-GPU gradient compression is the preferred approachconsidering GPUrsquos high memory bandwidth and many-corearchitecture Furthermore given that gradients produced byDNN computations are inherently in the GPU memory theon-GPU compression can greatly alleviate the bandwidthtension of the PCIe bus between GPU and host As an ex-ample for the onebit compression algorithm [62] its CPUimplementation runs 356times slower than the GPU-orientedcounterpart (our implementation) using the same experi-mental setup as Table 1 BytePS with the on-CPU onebitintroduces 952 training overhead than its on-GPU counter-part Despite of on-GPU advantages developing optimizingand integrating on-GPU compression algorithms puts heavyburden on DNN practitioners and doing it well requiresextensive system expertise and the understanding of lower-level GPU hardware and CUDA programming details

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

In summary the above two challenges motivate us torethink the abstraction for both gradient compression algo-rithms and compression-aware synchronization strategiesas well as to identify the common design patterns to supporteasy development optimization and integration of compres-sion algorithms in DNN systems for real-world use

3 Compression-Aware Synchronization

We propose CaSync a compression-aware gradient synchro-nization architecture that provides a general support for gra-dient compression algorithms and synchronization strategiesIn particular CaSync employs a composable design to enablethis general yet high-performance gradient synchronization

31 Composable Pipelined Synchronization

As motivated in Section 25 a proper granularity of ab-straction for gradient compression algorithms and synchro-nization strategies is the key to achieve a general yet high-performance gradient synchronization To identify the rightgranularity we employ a composable approach which firstdecouples all gradient synchronization primitives in a fine-grained manner and then combines and coordinates themaccording to their data dependencies and order constraintsto build an efficient computation-communication pipeline

We first decouple the communication topology from gra-dient synchronization strategies We represent the topologyas a directed graph where the vertex set contains trainingnodes and the edge set specifies the connections betweenthese nodes In gradient synchronization there are funda-mentally two node roles namely worker and aggregator

(with potentially other roles serving for optimizations only)A worker produces gradients from its local DNN computa-tion and initiates the gradient synchronization process Anaggregator aggregates gradients and then relays the aggre-gate result to workers or other aggregators Take PS andRing-allreduce as two examples of gradient synchronizationstrategies As shown in Figure 1 for PS we build bipartiteconnections between servers (ie aggregators) and work-ers for Ring-allreduce each node serves both roles and theclockwise connections are built between these nodesWe then split the gradient synchronization process into

five general primitives namely encode decode merge sendand recv Specifically lsquoencodersquo and lsquodecodersquo are two com-puting primitives for compressing and decompressing gra-dients respectively lsquomergersquo is another computing primi-tive for aggregating multiple gradients into one lsquosendrsquo andlsquorecvrsquo are two communication primitives for sending andreceiving gradients to and from other nodes respectivelyWith these general primitives we can conveniently specify acompression-aware workflow at each worker and aggregatorwhich defines proper data dependencies or order constraintsbetween these primitives For instance lsquoencodersquo precedes

Global

Coordinator

(Sec 32)

Other networked

peers

Worker or Aggregator at Nodei QCommu

QComp

Pluggable on-GPU

compression Library (Sec 4)Executor

Task manager

Selective Compression

Partitioning Planner (Sec 33)

Role+WorkflowDependency GraphTopologies

Ring-allreducePS

①T

ask

s

② Tasks

③ Notification

④Metadata

⑤ Gradient batches amp communication plans

⑥ Notification DNN system

runtime

TensorFlow

MXNet

PyTorch

Figure 2 The CaSync architecture design where the DNNsystem runtime is omitted

lsquosendrsquo at the worker because of the data dependency thatthe worker has to compress a gradient before sending itFigure 2 shows an overview of the CaSync design With

the aforementioned abstraction we are able to design a holis-tic gradient synchronization architecture for both workersand aggregators Each worker or aggregator employs a taskmanager to schedule and execute computing and communi-cation tasks Specifically according to the node role the taskmanager consults the specified workflow to select whichseries of computing and communication primitives to exe-cute during gradient synchronization Afterwards accordingto the communication topology (eg a PS bipartite graphor a ring) the task manager informs the communicationprimitives where to send and receive compressed gradients

The above fine-grained abstraction creates opportunitiesto pipeline computing and communication tasks for im-proved performance As shown in Figure 2 at Step① the taskmanager pushes tasks into two task queues 119876119888119900119898119901 for com-puting tasks and 119876119888119900119898119898119906 for communication tasks Tasks in119876119888119900119898119901 and 119876119888119900119898119898119906 are executed in an asynchronous man-ner for efficient use of computing and networking resourcesHowever as tasks are spread in two independent task queuesand are executed asynchronously there is a high risk thatthe data dependencies between tasks are violated Thereforeone challenge here is how to preserve data dependenciesand order constraints when executing tasks from 119876119888119900119898119901 and119876119888119900119898119898119906 asynchronously

To ensure the proper order the task manager maintainsa dependency graph to manage data dependencies betweentasks at runtime For instance for a compressed gradientits lsquorecvrsquo task must first write to a memory buffer and onlythen it can be read by the lsquodecodersquo task Upon the comple-tion of a computing task from 119876119888119900119898119901 (step ②) it notifies thetask manager to clear the following tasksrsquo pending depen-dencies and then promotes the execution of any task if allits pending dependencies are cleared (step ③) In doing sothe asynchronous execution of gradient synchronization isdriven by the dependency graph among tasks Note that thestep ④-⑥ correspond to a coordinated compression-awarebulk synchronization mechanism in the next section

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

Coordinator

Metadata

Per-link task queues

N0 N1N0 N1 aaa bb cc dd

Non-conflicting links

with batched gradients

of balanced sizes

lta N1gt

QCommuworker

ltb N1gt lte N2gt N0 N2N0 N2 eee ff

N1 N0N1 N0 ggg hh ii

N1 N2N1 N2 jjj kk

N2 N0N2 N0

N2 N1N2 N1 qqq rr ss

ltf N2gt

QCommuaggregator

ltc N1gt ltd N1gt

Node0

Node1

Node2

l

n o pm

N0 N1N0 N1 aa bb cc

N1 N2N1 N2 jj kk

N2 N0N2 N0

N0 N1 a b c

N1 N2 j k

N2 N0 nn oo ppm

Metadata

andor

aggregatoraggregatorworker worker

aggregatoraggregatorandorworker worker

andor

Figure 3 The workflow of the compression-aware coordi-nated bulk synchronization

32 Compression-aware Bulk Synchronization

While the above composable pipelined synchronization canalready improve the training performance significantly itdoes not explore the opportunities brought by bulk syn-chronization ETH an important feature that is supported bymost modern DNN systems Instead of computing and com-municating each gradient at a time bulk synchronizationhandles gradients in a batched manner to better take advan-tage of parallelism and reduce the execution overhead [64]Here we extend the conventional bulk synchronization to becompression-aware and additionally introduce batch com-pression to compress gradients in a batched manner Ourmain goal is to reduce the compression and communica-tion overheads Compression-aware bulk synchronizationis particularly important for small gradients as their com-pression and communication overheads are difficult to becompensated by the size reduction brought by compressionThe batch compression in CaSync batches a sequence of

compression-related tasks from119876119888119900119898119901 and schedules them to-gether to GPU for compression This allows a single callbackfunction for a batch of gradients and thus also reduces theCPU-GPU coordination overhead This is feasible as modernDNN systems often employ the operation fusing techniqueto produce multiple gradients at once in GPU memory [6]The bulk communication in CaSync parallelizes the net-

work transmission across training nodes to amortize thecommunication overheads across gradients However decid-ing the appropriate bulk granularity for communication ischallenging As discussed in Section 25 there are pros andcons for both fine-grained and coarse-grained granularityand a proper balance needs to be struck Our high-level de-sign is that we slice the gradient synchronization processinto monotonically increasing time slots and select a groupof network-idle nodes to join each time slot In a slot toavoid bandwidth contention each selected node sends itsgradients to only one other node via its uplink and receives

gradients from its downlink Note that the transmitted gra-dients in a time slot may correspond to different communi-cation steps (see Figure 1) in the gradient synchronizationprocess Together the goal of this design is to enable theadaptive granularity of communication and the optimizednode coordination during gradient synchronization

Specifically we introduce a global coordinator to adapt thecommunication of all gradients indiscriminately (compressedor not) and determine an optimal coordinated communica-tion plan The plan should fulfill two goals 1) maximize theutilization of network bandwidth between pairs of nodesand 2) balance the size of transmitted gradientsThe design of the global coordinator is shown in Fig-

ure 3 Each node (eg 1198731199001198891198900 or 1198730) can serve as a workeror an aggregator or both and it periodically sends the meta-data ⟨gradient_name gradient_size destination_node⟩ ofthe tasks in its communication task queue 119876119888119900119898119898119906 to theglobal coordinator eg lsquogradients 119886 119887 119888 and 119889 to node 1198731rsquoand lsquogradients 119890 and 119891 to node 1198732rsquo (gradient sizes omittedfor clarity) Upon arrival the coordinator places these tasksinto their respective per-link task queues Afterwards thecoordinator looks up these queues and selects a set of non-conflicting links between nodes (eg 3 of 6 links are selected)The coordinator then batches the gradients that need to betransmitted over each selected link with balanced batch sizesamortizing the communication overhead across gradientsThe size of each batch is decided based on a specified timeoutor a size threshold whichever is met firstFinally the coordinator broadcasts the information of

these gradient batches and coordinated communication plansto the relevant nodes (step⑤ in Figure 2) so that the executoron each node can execute these plans in a coordinated man-ner and notify its task manager to clear the dependenciesof the tasks in each batch accordingly (step ⑥ in Figure 2)Altogether our compression-aware coordinated bulk syn-chronization enables both efficient batch compression onGPU and efficient communication of small gradients

33 Selective Compression and Partitioning

Reducing data volume being transmitted does not alwaysoffset the compression-related overhead even with optimizedsynchronization strategies It is more complicatedwhen largegradients require partitioning to leverage parallelism beforecompression Therefore we design a selective compression

and partitioning mechanism with a cost model to analyzethe time cost of synchronizing gradients with and withoutcompression and then make a selective decision to avoidover-compression penalties and further leverage parallelismand load balancing The cost model is simple yet unified andis applicable to different CaSync synchronization strategies

There are a few parameters used in the cost analysis as de-fined in Table 2 Here the compression rate 119903 as well as thecompression cost 119879119890119899119888 (119898) and decompression cost 119879119889119890119888 (119898)

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 2 Notation in selective compression and partitioning

Notation Interpretation

119898 Gradient size in bytes

119870 Number of gradient partitions

119873 Number of workers or aggregators

119903 Compression rate

119879119890119899119888 (119898) Time for compressing an119898-byte gradient

119879119889119890119888 (119898) Time for decompressing an119898-byte gradient

119879119904119890119899119889 (119898) Time for transmitting an119898-byte gradient

Table 3 Synchronization parameters and their values

120572 120573 120574

CaSync-Ring 2(119873 minus 1) 119873 119873

CaSync-PS 2119873 119870 + 1 119873 + 1

are specific to compression algorithms and can be easily pro-filed Moreover 119879119904119890119899119889 (119898) denotes the network transmissiontime for an 119898-byte gradient We omit merge operators asthey are compression-irrelevantWe first analyze the original time to synchronize an119898-

byte gradient with 119870 partitions but without compression

denoted as 119879119900119903119894119892119904119910119899119888 (119898119870) Here we use PS and Ring-allreduce

designed within CaSync as examples denoted as CaSync-PS and CaSync-Ring For simplicity let 119873 be the numberof their respective workers or aggregators We assume thecommon practice used in real world where all nodes are ho-mogeneous [55 56] Also the number of gradient partitions119870 is between 1 and 119873 for both strategies with a discussion

of larger 119870 values later We calculate 119879119900119903119894119892119904119910119899119888 (119898119870) as follows

119879119900119903119894119892119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (

119898

119870) (1)

Here 120572 denotes the total number of serial communicationsteps for synchronizing a gradient and its value dependson the given synchronization strategy As shown in Table 3the 120572 value of CaSync-Ring is 2(119873 minus 1) since it takes 119873 minus 1steps for gradient aggregation and another 119873 minus 1 steps todisseminate the updated gradient (see Figure 1b) and all 119870gradient partitions are synchronized in parallel Similarlythe 120572 value of CaSync-PS is 2119873 where the communicationof gradient partitions is well coordinated so that no networklinks used are conflicting ie all aggregators run in paralleland each takes 119873 steps to receive gradient partitions from 119873

workers and another 119873 steps to return results (see Figure 1a)Next we calculate the time 119879

119888119901119903119904119910119899119888 (119898119870) to synchronize

an119898-byte gradient with 119870 partitions and compression

119879119888119901119903119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (119903 times

119898

119870) + 120573 times119879119890119899119888 (

119898

119870) + 120574 times119879119889119890119888 (119903 times

119898

119870)

(2)Here the 120572 value remains the same but the communicationcost is reduced to119879119904119890119899119889 (119903times

119898119870) because one needs to send only

the compressed gradient partition of the reduced size 119903 times 119898119870

This however comes with an extra compression-relatedcomputational cost We denote the number of encode and

decode operators that do not overlap with gradient trans-mission as 120573 and 120574 whose values are described in Table 3Take CaSync-Ring as an example Its first aggregation phaserequires 119873 minus 1 encode and 119873 minus 1 decode operators and theyare non-overlapping because a node can compress a gradi-ent partition only after it has decompressed and aggregatedthe partition received from its predecessor (ie data depen-dencies) Its second dissemination phase requires only oneencode and 119873 minus 1 decode operators However all decodeoperators except the last one can overlap with gradient trans-mission Therefore for CaSync-Ring 120573 = (119873 minus 1) + 1 = 119873

and also 120574 = (119873 minus 1) + 1 = 119873 We omit the analysis forCaSync-PS due to space limit Note that our cost model canbe relaxed to split a gradient into beyond 119873 partitions toleverage the compression-communication pipeline enabledby CaSync further To do so we simply adapt the calculationof 119879

119888119901119903119904119910119899119888 (119898119870) by grouping 119870 partitions into lceil119870

119873rceil batches

Based on the comparison of 119879119900119903119894119892119904119910119899119888 (119898119870) and 119879

119888119901119903119904119910119899119888 (119898119870)

we decide whether it is beneficial to enable compression fora gradient If so we also compute the optimal number ofpartitions for the best performance This is feasible because1) all parameters in Table 2 can be easily obtained or profiledvia GPU and network measurements where we launch theGPU kernels and peer-to-peer communication tasks withrespect to different gradient sizes to fit the compression andnetwork cost curves respectively 2) the values of 120572 120573 and 120574in Table 3 needed to analyze119879

119888119901119903119904119910119899119888 (119898119870) are determined once

a DNN system with its CaSync synchronization strategy isgiven and 3) the expressions 1 and 2 are convex functionswhich make it straightforward to identify the best setting foreach gradient It is worth mentioning that our cost modelassumes a homogeneous environment where all GPUs andnetwork links have the same capacities and the profilingresults are obtained without considering the variance orinterference of network and GPUs We leave the explorationof the impacts of dynamics on the profiling accuracy of ourcost model as future work

Note that most if not all gradient compression algorithms(including the five state-of-the-art ones we evaluate) arelayer-wised We impose a strict partition-compress-batchorder which is applied to each DNN layer independentlyand thus it does not affect the accuracy and convergence oforiginal compression algorithms For few non-layer-wisedcompression algorithms we simply turn off the selectivecompression and partitioning thus incurring no negativeimpacts on accuracy and convergence of these algorithms

4 Compression Library and Language

As discussed in Section 25 on-GPU compression can greatlyaccelerate compression-related computation alleviate thebandwidth tension between GPU and host and create newopportunities to further optimize the gradient synchroniza-tion process However developing and optimizing gradient

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

1 void encode(floatlowast input uint8lowast output params)

2 void decode(uint8lowast input floatlowast output params)

Figure 4 Unified compression-related API abstraction

Table 4 List of common operators 119866 is a gradient matrix

Operator Interpretation

sort(119866 udf ) Sort elements in 119866 wrt the order given by

the user-defined function udf

filter(119866 udf ) Select elements from 119866 via udf

map(119866 udf ) Return 119867 where 119867 [119894] =udf (119866 [119894])

reduce(119866 udf ) Return a reduced value of 119866 via udf

random(119886 119887) Generate a random intfloat in range of [119886119887)

concat(119886middot middot middot ) Concatenate values together into a vector

extract(119866 prime) Extract metadata from the compressed 119866 prime

compression algorithms on GPU is non-trivial and integrat-ing them into DNN systems usually requires substantial sys-tem expertise and manual efforts Thus we design a toolkitCompLL which allows practitioners to easily develop highly-optimized compression algorithms using GPU capability TheCompLL-generated code is then consumed by CaSync thus en-abling an automated integration of compression algorithmswith CaSync into DNN systems

41 Unified API Abstraction

CompLL provides a unified API abstraction for implement-ing gradient compression algorithms As shown in Figure 4CompLL has two simple APIs encode and decode as wellas a few algorithm-specific parameters (eg compressionrate for sparsification and bitwidth or precision for quan-tization) The encode API takes as input a gradient matrixand generates a compressed gradient as output In particularwe use uint8 as the type of the output matrix because wecan then cast one or multiple uint8 to any type in CUDAOn the other hand the decode API unfolds a compressedgradient into its original form

42 Common Operator Library

By studying the state-of-the-art compression algorithms weobserve that they can generally be specified using a fewcommon operators [4 10 37 62 67 68 74 76] For instancethese algorithms all need to scan the elements of a gradi-ent Alongside scanning they all need to perform operationssuch as filtering or reducing the scanned elements to producecompressed gradients With this observation we generalizea library of common operators that can be used to constructgradient compression algorithms as listed in Table 4 For in-stance the reduce(G maxAbs) operator with a user-definedfunction maxAbs computes the maximum absolute value ofthe gradient matrix 119866 We have carefully optimized thesecommon operators regarding memory access and bank con-flicts in GPU [24] so that any algorithm implementation

1 param EncodeParams

2 uint8 bitwidth assume bitwidth = 2 for clarity

3

4 float min max gap

5 uint2 floatToUint(float elem)

6 float r = (elem minus min) gap

7 return floor(r + randomltfloatgt(0 1))

8

9 void encode(floatlowast gradient uint8lowast compressed

10 EncodeParams params)

11 min = reduce(gradient smaller)

12 max = reduce(gradient greater)

13 gap = (max minus min) ((1 ltlt paramsbitwidth) minus 1)

14 uint8 tail = gradientsize (1 ltlt paramsbitwidth)

15 uint2lowast Q =map(gradient floatToUint)

16 compressed = concat(paramsbitwidth tail

17 min max Q)

18

Figure 5 TernGradrsquos compression logic specified using theAPI common operators and DSL of CompLL

based on these operators can automatically inherent ourGPU optimizations (see details in Section 5)

43 Code Synthesis and Domain-specific Language

We provide two ways for practitioners to implement algo-rithms using CompLL They can invoke our common operatorlibrary directly in their algorithm implementation This how-ever requires them to be familiar with the low-level CUDAprogramming To further relieve the burden we design asimple C-like domain-specific language (DSL) for practition-ers to easily implement their algorithms with the unified APIabstraction filled with common operators without worry-ing about hardware-oriented implementation and optimiza-tion Specifically our DSL supports basic data types suchas uint1 uint2 uint4 uint8 int32 float and array aswell as simple numerical computations and function calls tothe common operators Though not supported our practiceshows that it is often unnecessary to include loops in theDSL code as the iterative processing semantics have alreadybeen covered by the implementation of common operators

To show how DSL works we use it to implement the clas-sic TernGrad compression [74] as an example in Figure 5Line 1-3 specify bitwidth as the algorithm parameter todetermine compression rate Line 5-8 specify a user-definedfunction floatToUint to compress a float number into abitwidth-sized integer The TernGradrsquos logic to implementour encodeAPI begins at line 9 and takes the original gradi-ent as input and outputs the compressed gradient Throughline 11-14 the algorithm metadata which is essential fordecompression is generated At line 15 we pass the user-defined function floatToUint to the common operator mapto generate the compressed gradient matrix Q Finally at

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 2: Gradient Compression Supercharged High-Performance Data

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

the aforementioned Transformer training achieves only a13times speedup 381 lower than the expected performanceThe gap becomes even larger in a lower-bandwidth networkThis surprising observation drives us to rethink gradientcompression from the system perspective

To fully unleash the benefits of gradient compression onlyan efficient compression algorithm is not sufficient The com-pressed gradients are not directly aggregatable and they arenot compatible with common optimizations (such as gradientpartitioning and batching) used in the conventional gradi-ent synchronization strategies In the current compression-enabled DNN system designs the computational overheadintroduced by gradient compression is often overlooked andcould be greatly amplified along the gradient synchroniza-tion path Therefore the first challenge we have to addressis how to amortize the extra computational overhead alongthe communication steps during gradient synchronizationwhereby the computation and communicationmay have datadependencies This requires us to revisit the original designchoices across existing gradient synchronization strategies toidentify the right granularity of combining and coordinatingvarious gradient compression and communication operatorsSecond a sophisticated systematic support for compressionawareness is generally lackingWithout such a support DNNpractitioners cannot live up to the full promise of gradientcompression to accelerate DNN training The adoption of gra-dient compression also becomes difficult because substantialsystem expertise and manual efforts are required for devel-oping optimizing and integrating individual compressionalgorithm into DNN systemsIn this paper we address these systems challenges to

bridge the gap between gradient compression and synchro-nization in data parallel DNN training We first propose ageneral composable gradient synchronization architecturecalled CaSync which enables a compression-aware gradientsynchronization with a composition of decoupled communi-cation aggregation and compression primitives This fine-grained composition allows us to strike a balance between 1)the effective pipelining of computational and communicationtasks to hide communication overhead behind compression-related computation and vice versa and 2) the efficient bulkyexecution of smaller tasks Furthermore CaSync employs aselective compression and partitioning mechanism to decidewhether to compress each gradient and how to partition largegradients (before compression) to optimally leverage pipelin-ing and parallel processing It is worth mentioning that ourCaSync architecture is intentionally designed to be generaland not tie to specific gradient compression algorithms andsynchronization strategies (eg PS or Ring-allreduce) so thatits benefits are applicable to existing and potentially futurecompression algorithms and synchronization strategies

Second we advocate that the on-GPU compression is thepreferred approach for gradient compression consideringGPU has much higher bandwidth and processor density than

CPU and gradients are produced in GPU directly This cre-ates new opportunities to further optimize the compression-communication pipeline during gradient synchronizationHowever developing and optimizing gradient compressionalgorithms on GPU is non-trivial and usually requires sig-nificant system expertise and manual efforts To relieve theburden on DNN practitioners we design and develop a gra-dient compression toolkit named CompLL which facilitatesthe compression algorithm development and its integrationon GPU CompLL provides a unified API abstraction and ex-poses a library of highly-optimized common operators thatcan be used to construct sophisticated gradient compressionalgorithms CompLL also offers a domain specific language toallow practitioners to specify their algorithm logic which isthen converted into efficient low-level GPU implementationand automatically integrated into DNN systems with littlehuman interventionFor easy adoption we build a compression-aware data

parallel DNN training framework called HiPress with bothCaSync and CompLL HiPress is compatible with mainstreamDNN systems (ie MXNet TensorFlow and PyTorch) andwe have open-sourced it at [2] We use CompLL in HiPress

to construct five state-of-the-art compression algorithms(ie onebit [62] TBQ [67] TernGrad [74] DGC [37] andGradDrop [4]) with only 23 lines of CompLL code on av-erage and they achieve significant performance speedupsover open-source counterparts We train six widely-usedDNN models across the computer vision and natural lan-guage processing fields using a 16-node cluster on AWS EC2with 128 NVIDIA V100 GPUs and 100Gbps network linksExperimental results show that HiPress achieves speed im-provements of 173-1105 and 172-695 compared withnon-compression systems (including the latest BytePS) andcurrent compression-enabled systems (eg BytePS-onebitand Ring-DGC) respectively The results in a lower-end16-node cluster with 32 1080Ti GPUs and 56Gbps networkshow a similar trend Lastly HiPress does not sacrifice theconvergence and accuracy claims of exercised algorithms

2 Background and Motivation

21 Data Parallel DNN Training

A DNN model typically consists of multiple neural networklayers each of which contains a large number of parametersTraining a DNN model needs to iterate over a dataset manytimes (ie epochs) towards convergence [77] Each epochis further split into iterations Data parallel DNN trainingenables each training node to consume data from its ownpartition of the training dataset In each iteration trainingnodes independently run forward and backward propaga-tion to generate gradients which are then synchronized withother nodes to collectively update the global model parame-ters This group coordination can be done synchronously orasynchronously The former case often acts as a distributed

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Server0

Server1

Worker0

Worker1

Worker2

②ത119840 ത119840 ത119840①119840120782 119840120783 119840120784(a) Parameter Server (PS)

②119840120782 + 119840120783Worker

0

Worker2

Worker1

①119840120782③ത119840 ④ത119840

(b) Ring-allreduce

Figure 1 Gradient synchronization strategies For Parame-ter Server (PS) we only show interactions between 1198781198901199031199071198901199030and119908119900119903119896119890119903119904 for clarity

barrier for convergence guarantees [84] while the latter caseeliminates the negative impact of stragglers at the cost ofpossibly not converging We focus on synchronous gradientcoordination because of its wide adoption [1 13 32 56]

22 Gradient Synchronization

Parameter Server (PS) [34 55] and AllReduce [7 16 42 64]are two widely-adopted gradient synchronization strategiesParameter Server In Figure 1a each node acts as a serveror a worker [34] DNN model parameters and gradients areoften partitioned across multiple servers for load balancingWhen local training completes each worker pushes gradi-ents to servers (①) which are then aggregated and updatedto model parameters Afterwards each worker pulls the up-dated results from servers to trigger the next iteration (②)AllReduce This strategy uses collective communicationprimitives One representative example is Ring-allreduce [7]where all nodes are workers and they form a logical ringAs shown in Figure 1b it takes 119873 minus 1 communication stepsalong the ring to aggregate gradients (①-②) and another119873minus1steps to disseminate the updated gradient (③-④) where 119873is the number of workers Furthermore Ring-allreduce canbatch gradients which are then partitioned again for loadbalancing Following this at each synchronization step eachworker simultaneously sends a partition to its successor andreceives another partition from its predecessor to best utilizeits bi-directional network bandwidth [54]

23 Computation and Communication Tension

Modern DNN systems pipeline computation and communi-cation for better performance eg via running the gradientcommunication and DNN backward computation of twoDNN layers in parallel to hide the former overhead behindthe latter when possible However there exists a fundamentaltension between computation and communication [61]The recent DNN accelerator booming [49] and domain-

specific compiler advancement [14 17 57 58] have signifi-cantly improved the single-node training speed Such fast-advancing computing capabilities typically lead to morefrequent gradient synchronization and thus put high pres-sure on the network infrastructure However the networkupgrade does not keep up the pace of the computation-related advancements [39 41 51 75] The imbalance between

Table 1 Training performance of Bert-large and Trans-former with 16 AWS p3dn24xlarge instances (8 V100 GPUseach) 100Gbps BytePS 025 Horovod 0192 fp32 precision

System

configurations

Scaling

efficiency

Communication

ratio

Trans-

former

Ring-allreduce

wo compression047 768

Ring-allreduce w

DGC compression061 (298uarr) 703 (85darr)

Bert-

large

BytePS

wo compression071 636

BytePS w

onebit compression076 (70uarr) 609 (42darr)

the fast-advancing computing capability and the slower-advancing communication capability increasingly reducesthe chance of pipelining the gradient communication andcomputationA few software approaches have been recently proposed

to optimize the computation-communication pipeline rang-ing from priority-based gradient scheduling and partition-ing [56] to advanced synchronization architectures [30 64]However as shown in Table 1 the latest highly-optimizedBytePS [30] and Ring-allreduce [64] only achieve scalingefficiencies1 of 071 and 047 when training two popularDNN models (Bert-large and Transformer) in a cluster of16 nodes on AWS EC2 with 128 NVIDIA V100 GPUs and100Gbps network The communication time accounts for upto 768 of the total training time for training these two mod-els with significant portion not being hidden behind DNNcomputation This indicates that the fundamental tensionbetween gradient computation and communication persistsin data parallel DNN training even with the state-of-the-artapproaches and recent bandwidth advancements

24 Gradient Compression

Gradient compression is a general approach for reducingthe transmitted data volume during gradient synchroniza-tion [37 74] and has a great potential to alleviate the afore-mentioned communication bottleneck Indeed it is beingadopted by the industry and a number of recent efforts fromFacebook and AWS have started to integrate gradient com-pression into modern DNN systems since June 2020 [5 20]

The gradient compression algorithms generally fall withinthe sparsification and quantization categories Sparsificationleverages the sparsity of gradients and filters out insignifi-cant elements in the gradient matrix [4 32 37] while quanti-zation decreases the precision of gradients [67 74 76] For in-stance a 1-bit quantization enabled by onebit algorithm [62]could reduce the transmitted data volume by 969 Many

1Scaling efficiency is defined asactual_performance

119873timessingle_GPU_performance where 119873 is the

total number of GPUs with 1 being the best (ie linear scaling)

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

of these algorithms either theoretically prove or empiricallyvalidate that adopting them does not affect model conver-gence and imposes only a negligible impact on accuracy iea compression-enabled DNN training converges to approxi-mately the same accuracy through the same number of itera-tions compared with a non-compression training [37 67 74]

25 System Challenges and Opportunities

Surprisingly our study reveals that without proper systemsupport the gradient compressionrsquos benefits are diluted sig-nificantly at the best and could even negatively affect theoverall DNN training throughput at the worstOne important reason for this surprising observation is

that gradient compression requires non-negligible compu-tational overhead Alongside the gradient synchronizationpath an encode operator must precede sending fully or par-tially aggregated gradients and a decode operator must fol-low when receiving compressed gradients There could beup to 3119873 minus 2 extra operators for each gradient synchronizedacross 119873 workers These extra operators are needed becauseit is impossible to directly aggregate over compressed gra-dients due to the existence of metadata (in sparsification-based algorithms) or the potential overflow of operatinglow-precision numbers (in quantization-based algorithms)

The accumulated compression-related computational costduring gradient synchronization can significantly dilute itsbenefits of reducing the transmitted data volume To demon-strate this we train Bert-large with the onebit compres-sion [62] developed by AWS and integrated into MXNet withBytePS2 Table 1 shows that BytePS-onebit achieves a verylimited improvement over BytePS As another example theDGC compression [37] with 01 compression rate (where itis integrated into TensorFlow with the Ring-allreduce syn-chronization strategy) achieves only a 13times training speedupfor the Transformer model We discover that such limitedimprovements are mainly due to the co-design of BytePS andRing-allreduce with the compression algorithms wherebythe compression logic is separated and scattered across gradi-ent synchronization Such a co-design also makes it difficultto verify the correctness of the implemented algorithms aswell as to generalize to other gradient compression algo-rithms and synchronization strategies To enable a generalapproach it is important to separate the design of compres-sion algorithms from that of synchronization strategiesThe first challenge to address the aforementioned issues

lies in designing a generalizable approach to amortize theextra computational overhead brought by gradient compres-sion (eg encode and decode operators) along the communi-cation steps during gradient synchronization This is difficultdue to non-trivial factors including for instance the data

2The open-source onebit was implemented only on CPU [11] For a fair

comparison we have implemented and integrated a highly-optimized on-

GPU onebit into BytePS

dependencies between gradient computation and communi-cation the communication topology such as a bipartite graphfor PS and a ring for Ring-allreduce the compression speedand ratio of different compression algorithms to name a fewTo address this challenge the key is to identify the rightgranularity of combining and coordinating various gradientcompression and communication operators

Take Ring-allreduce as an example It coordinates the com-munication of all training nodes by running a global atomicbulk synchronization operation to complete 2(119873 minus 1) point-to-point communication steps for batched gradients Whilethis design is bandwidth-optimal [54] such a coarse-grainedapproach fails to hide the compression-related overhead be-hind the communication overhead Unlike Ring-allreducethe PS synchronization strategy (including the latest BytePS)exchanges gradients via individual micro point-to-point com-munication steps While such a fine-grained approach facil-itates a better computation-communication pipelining tohide compression-related computational overhead it incursa larger number of communication steps and in turn a pro-portionally growing extra computational overhead

The second challenge is to provide systematic support fordeveloping optimizing and integrating gradient compres-sion algorithms into DNN systems Without this support thereal-world adoption of gradient compression algorithms re-quires significant system expertise and manual efforts to per-form various ad-hoc development and optimization whichis particularly challenging for DNN practitioners Thus it isquite difficult if not impossible for gradient compression tolive up to its full promise of accelerating DNN trainingTo provide a general system support for various algo-

rithms one critical question to answer is where to performtheir computation eg on CPU or GPU We observe thatcompression algorithms typically need to scan large gradientmatrices multiple times to filter out insignificant gradients orto decrease the precision of gradients Therefore they are ex-tremely memory-intensive and require massive parallelismto achieve fast compression (and decompression) We believethe on-GPU gradient compression is the preferred approachconsidering GPUrsquos high memory bandwidth and many-corearchitecture Furthermore given that gradients produced byDNN computations are inherently in the GPU memory theon-GPU compression can greatly alleviate the bandwidthtension of the PCIe bus between GPU and host As an ex-ample for the onebit compression algorithm [62] its CPUimplementation runs 356times slower than the GPU-orientedcounterpart (our implementation) using the same experi-mental setup as Table 1 BytePS with the on-CPU onebitintroduces 952 training overhead than its on-GPU counter-part Despite of on-GPU advantages developing optimizingand integrating on-GPU compression algorithms puts heavyburden on DNN practitioners and doing it well requiresextensive system expertise and the understanding of lower-level GPU hardware and CUDA programming details

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

In summary the above two challenges motivate us torethink the abstraction for both gradient compression algo-rithms and compression-aware synchronization strategiesas well as to identify the common design patterns to supporteasy development optimization and integration of compres-sion algorithms in DNN systems for real-world use

3 Compression-Aware Synchronization

We propose CaSync a compression-aware gradient synchro-nization architecture that provides a general support for gra-dient compression algorithms and synchronization strategiesIn particular CaSync employs a composable design to enablethis general yet high-performance gradient synchronization

31 Composable Pipelined Synchronization

As motivated in Section 25 a proper granularity of ab-straction for gradient compression algorithms and synchro-nization strategies is the key to achieve a general yet high-performance gradient synchronization To identify the rightgranularity we employ a composable approach which firstdecouples all gradient synchronization primitives in a fine-grained manner and then combines and coordinates themaccording to their data dependencies and order constraintsto build an efficient computation-communication pipeline

We first decouple the communication topology from gra-dient synchronization strategies We represent the topologyas a directed graph where the vertex set contains trainingnodes and the edge set specifies the connections betweenthese nodes In gradient synchronization there are funda-mentally two node roles namely worker and aggregator

(with potentially other roles serving for optimizations only)A worker produces gradients from its local DNN computa-tion and initiates the gradient synchronization process Anaggregator aggregates gradients and then relays the aggre-gate result to workers or other aggregators Take PS andRing-allreduce as two examples of gradient synchronizationstrategies As shown in Figure 1 for PS we build bipartiteconnections between servers (ie aggregators) and work-ers for Ring-allreduce each node serves both roles and theclockwise connections are built between these nodesWe then split the gradient synchronization process into

five general primitives namely encode decode merge sendand recv Specifically lsquoencodersquo and lsquodecodersquo are two com-puting primitives for compressing and decompressing gra-dients respectively lsquomergersquo is another computing primi-tive for aggregating multiple gradients into one lsquosendrsquo andlsquorecvrsquo are two communication primitives for sending andreceiving gradients to and from other nodes respectivelyWith these general primitives we can conveniently specify acompression-aware workflow at each worker and aggregatorwhich defines proper data dependencies or order constraintsbetween these primitives For instance lsquoencodersquo precedes

Global

Coordinator

(Sec 32)

Other networked

peers

Worker or Aggregator at Nodei QCommu

QComp

Pluggable on-GPU

compression Library (Sec 4)Executor

Task manager

Selective Compression

Partitioning Planner (Sec 33)

Role+WorkflowDependency GraphTopologies

Ring-allreducePS

①T

ask

s

② Tasks

③ Notification

④Metadata

⑤ Gradient batches amp communication plans

⑥ Notification DNN system

runtime

TensorFlow

MXNet

PyTorch

Figure 2 The CaSync architecture design where the DNNsystem runtime is omitted

lsquosendrsquo at the worker because of the data dependency thatthe worker has to compress a gradient before sending itFigure 2 shows an overview of the CaSync design With

the aforementioned abstraction we are able to design a holis-tic gradient synchronization architecture for both workersand aggregators Each worker or aggregator employs a taskmanager to schedule and execute computing and communi-cation tasks Specifically according to the node role the taskmanager consults the specified workflow to select whichseries of computing and communication primitives to exe-cute during gradient synchronization Afterwards accordingto the communication topology (eg a PS bipartite graphor a ring) the task manager informs the communicationprimitives where to send and receive compressed gradients

The above fine-grained abstraction creates opportunitiesto pipeline computing and communication tasks for im-proved performance As shown in Figure 2 at Step① the taskmanager pushes tasks into two task queues 119876119888119900119898119901 for com-puting tasks and 119876119888119900119898119898119906 for communication tasks Tasks in119876119888119900119898119901 and 119876119888119900119898119898119906 are executed in an asynchronous man-ner for efficient use of computing and networking resourcesHowever as tasks are spread in two independent task queuesand are executed asynchronously there is a high risk thatthe data dependencies between tasks are violated Thereforeone challenge here is how to preserve data dependenciesand order constraints when executing tasks from 119876119888119900119898119901 and119876119888119900119898119898119906 asynchronously

To ensure the proper order the task manager maintainsa dependency graph to manage data dependencies betweentasks at runtime For instance for a compressed gradientits lsquorecvrsquo task must first write to a memory buffer and onlythen it can be read by the lsquodecodersquo task Upon the comple-tion of a computing task from 119876119888119900119898119901 (step ②) it notifies thetask manager to clear the following tasksrsquo pending depen-dencies and then promotes the execution of any task if allits pending dependencies are cleared (step ③) In doing sothe asynchronous execution of gradient synchronization isdriven by the dependency graph among tasks Note that thestep ④-⑥ correspond to a coordinated compression-awarebulk synchronization mechanism in the next section

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

Coordinator

Metadata

Per-link task queues

N0 N1N0 N1 aaa bb cc dd

Non-conflicting links

with batched gradients

of balanced sizes

lta N1gt

QCommuworker

ltb N1gt lte N2gt N0 N2N0 N2 eee ff

N1 N0N1 N0 ggg hh ii

N1 N2N1 N2 jjj kk

N2 N0N2 N0

N2 N1N2 N1 qqq rr ss

ltf N2gt

QCommuaggregator

ltc N1gt ltd N1gt

Node0

Node1

Node2

l

n o pm

N0 N1N0 N1 aa bb cc

N1 N2N1 N2 jj kk

N2 N0N2 N0

N0 N1 a b c

N1 N2 j k

N2 N0 nn oo ppm

Metadata

andor

aggregatoraggregatorworker worker

aggregatoraggregatorandorworker worker

andor

Figure 3 The workflow of the compression-aware coordi-nated bulk synchronization

32 Compression-aware Bulk Synchronization

While the above composable pipelined synchronization canalready improve the training performance significantly itdoes not explore the opportunities brought by bulk syn-chronization ETH an important feature that is supported bymost modern DNN systems Instead of computing and com-municating each gradient at a time bulk synchronizationhandles gradients in a batched manner to better take advan-tage of parallelism and reduce the execution overhead [64]Here we extend the conventional bulk synchronization to becompression-aware and additionally introduce batch com-pression to compress gradients in a batched manner Ourmain goal is to reduce the compression and communica-tion overheads Compression-aware bulk synchronizationis particularly important for small gradients as their com-pression and communication overheads are difficult to becompensated by the size reduction brought by compressionThe batch compression in CaSync batches a sequence of

compression-related tasks from119876119888119900119898119901 and schedules them to-gether to GPU for compression This allows a single callbackfunction for a batch of gradients and thus also reduces theCPU-GPU coordination overhead This is feasible as modernDNN systems often employ the operation fusing techniqueto produce multiple gradients at once in GPU memory [6]The bulk communication in CaSync parallelizes the net-

work transmission across training nodes to amortize thecommunication overheads across gradients However decid-ing the appropriate bulk granularity for communication ischallenging As discussed in Section 25 there are pros andcons for both fine-grained and coarse-grained granularityand a proper balance needs to be struck Our high-level de-sign is that we slice the gradient synchronization processinto monotonically increasing time slots and select a groupof network-idle nodes to join each time slot In a slot toavoid bandwidth contention each selected node sends itsgradients to only one other node via its uplink and receives

gradients from its downlink Note that the transmitted gra-dients in a time slot may correspond to different communi-cation steps (see Figure 1) in the gradient synchronizationprocess Together the goal of this design is to enable theadaptive granularity of communication and the optimizednode coordination during gradient synchronization

Specifically we introduce a global coordinator to adapt thecommunication of all gradients indiscriminately (compressedor not) and determine an optimal coordinated communica-tion plan The plan should fulfill two goals 1) maximize theutilization of network bandwidth between pairs of nodesand 2) balance the size of transmitted gradientsThe design of the global coordinator is shown in Fig-

ure 3 Each node (eg 1198731199001198891198900 or 1198730) can serve as a workeror an aggregator or both and it periodically sends the meta-data ⟨gradient_name gradient_size destination_node⟩ ofthe tasks in its communication task queue 119876119888119900119898119898119906 to theglobal coordinator eg lsquogradients 119886 119887 119888 and 119889 to node 1198731rsquoand lsquogradients 119890 and 119891 to node 1198732rsquo (gradient sizes omittedfor clarity) Upon arrival the coordinator places these tasksinto their respective per-link task queues Afterwards thecoordinator looks up these queues and selects a set of non-conflicting links between nodes (eg 3 of 6 links are selected)The coordinator then batches the gradients that need to betransmitted over each selected link with balanced batch sizesamortizing the communication overhead across gradientsThe size of each batch is decided based on a specified timeoutor a size threshold whichever is met firstFinally the coordinator broadcasts the information of

these gradient batches and coordinated communication plansto the relevant nodes (step⑤ in Figure 2) so that the executoron each node can execute these plans in a coordinated man-ner and notify its task manager to clear the dependenciesof the tasks in each batch accordingly (step ⑥ in Figure 2)Altogether our compression-aware coordinated bulk syn-chronization enables both efficient batch compression onGPU and efficient communication of small gradients

33 Selective Compression and Partitioning

Reducing data volume being transmitted does not alwaysoffset the compression-related overhead even with optimizedsynchronization strategies It is more complicatedwhen largegradients require partitioning to leverage parallelism beforecompression Therefore we design a selective compression

and partitioning mechanism with a cost model to analyzethe time cost of synchronizing gradients with and withoutcompression and then make a selective decision to avoidover-compression penalties and further leverage parallelismand load balancing The cost model is simple yet unified andis applicable to different CaSync synchronization strategies

There are a few parameters used in the cost analysis as de-fined in Table 2 Here the compression rate 119903 as well as thecompression cost 119879119890119899119888 (119898) and decompression cost 119879119889119890119888 (119898)

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 2 Notation in selective compression and partitioning

Notation Interpretation

119898 Gradient size in bytes

119870 Number of gradient partitions

119873 Number of workers or aggregators

119903 Compression rate

119879119890119899119888 (119898) Time for compressing an119898-byte gradient

119879119889119890119888 (119898) Time for decompressing an119898-byte gradient

119879119904119890119899119889 (119898) Time for transmitting an119898-byte gradient

Table 3 Synchronization parameters and their values

120572 120573 120574

CaSync-Ring 2(119873 minus 1) 119873 119873

CaSync-PS 2119873 119870 + 1 119873 + 1

are specific to compression algorithms and can be easily pro-filed Moreover 119879119904119890119899119889 (119898) denotes the network transmissiontime for an 119898-byte gradient We omit merge operators asthey are compression-irrelevantWe first analyze the original time to synchronize an119898-

byte gradient with 119870 partitions but without compression

denoted as 119879119900119903119894119892119904119910119899119888 (119898119870) Here we use PS and Ring-allreduce

designed within CaSync as examples denoted as CaSync-PS and CaSync-Ring For simplicity let 119873 be the numberof their respective workers or aggregators We assume thecommon practice used in real world where all nodes are ho-mogeneous [55 56] Also the number of gradient partitions119870 is between 1 and 119873 for both strategies with a discussion

of larger 119870 values later We calculate 119879119900119903119894119892119904119910119899119888 (119898119870) as follows

119879119900119903119894119892119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (

119898

119870) (1)

Here 120572 denotes the total number of serial communicationsteps for synchronizing a gradient and its value dependson the given synchronization strategy As shown in Table 3the 120572 value of CaSync-Ring is 2(119873 minus 1) since it takes 119873 minus 1steps for gradient aggregation and another 119873 minus 1 steps todisseminate the updated gradient (see Figure 1b) and all 119870gradient partitions are synchronized in parallel Similarlythe 120572 value of CaSync-PS is 2119873 where the communicationof gradient partitions is well coordinated so that no networklinks used are conflicting ie all aggregators run in paralleland each takes 119873 steps to receive gradient partitions from 119873

workers and another 119873 steps to return results (see Figure 1a)Next we calculate the time 119879

119888119901119903119904119910119899119888 (119898119870) to synchronize

an119898-byte gradient with 119870 partitions and compression

119879119888119901119903119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (119903 times

119898

119870) + 120573 times119879119890119899119888 (

119898

119870) + 120574 times119879119889119890119888 (119903 times

119898

119870)

(2)Here the 120572 value remains the same but the communicationcost is reduced to119879119904119890119899119889 (119903times

119898119870) because one needs to send only

the compressed gradient partition of the reduced size 119903 times 119898119870

This however comes with an extra compression-relatedcomputational cost We denote the number of encode and

decode operators that do not overlap with gradient trans-mission as 120573 and 120574 whose values are described in Table 3Take CaSync-Ring as an example Its first aggregation phaserequires 119873 minus 1 encode and 119873 minus 1 decode operators and theyare non-overlapping because a node can compress a gradi-ent partition only after it has decompressed and aggregatedthe partition received from its predecessor (ie data depen-dencies) Its second dissemination phase requires only oneencode and 119873 minus 1 decode operators However all decodeoperators except the last one can overlap with gradient trans-mission Therefore for CaSync-Ring 120573 = (119873 minus 1) + 1 = 119873

and also 120574 = (119873 minus 1) + 1 = 119873 We omit the analysis forCaSync-PS due to space limit Note that our cost model canbe relaxed to split a gradient into beyond 119873 partitions toleverage the compression-communication pipeline enabledby CaSync further To do so we simply adapt the calculationof 119879

119888119901119903119904119910119899119888 (119898119870) by grouping 119870 partitions into lceil119870

119873rceil batches

Based on the comparison of 119879119900119903119894119892119904119910119899119888 (119898119870) and 119879

119888119901119903119904119910119899119888 (119898119870)

we decide whether it is beneficial to enable compression fora gradient If so we also compute the optimal number ofpartitions for the best performance This is feasible because1) all parameters in Table 2 can be easily obtained or profiledvia GPU and network measurements where we launch theGPU kernels and peer-to-peer communication tasks withrespect to different gradient sizes to fit the compression andnetwork cost curves respectively 2) the values of 120572 120573 and 120574in Table 3 needed to analyze119879

119888119901119903119904119910119899119888 (119898119870) are determined once

a DNN system with its CaSync synchronization strategy isgiven and 3) the expressions 1 and 2 are convex functionswhich make it straightforward to identify the best setting foreach gradient It is worth mentioning that our cost modelassumes a homogeneous environment where all GPUs andnetwork links have the same capacities and the profilingresults are obtained without considering the variance orinterference of network and GPUs We leave the explorationof the impacts of dynamics on the profiling accuracy of ourcost model as future work

Note that most if not all gradient compression algorithms(including the five state-of-the-art ones we evaluate) arelayer-wised We impose a strict partition-compress-batchorder which is applied to each DNN layer independentlyand thus it does not affect the accuracy and convergence oforiginal compression algorithms For few non-layer-wisedcompression algorithms we simply turn off the selectivecompression and partitioning thus incurring no negativeimpacts on accuracy and convergence of these algorithms

4 Compression Library and Language

As discussed in Section 25 on-GPU compression can greatlyaccelerate compression-related computation alleviate thebandwidth tension between GPU and host and create newopportunities to further optimize the gradient synchroniza-tion process However developing and optimizing gradient

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

1 void encode(floatlowast input uint8lowast output params)

2 void decode(uint8lowast input floatlowast output params)

Figure 4 Unified compression-related API abstraction

Table 4 List of common operators 119866 is a gradient matrix

Operator Interpretation

sort(119866 udf ) Sort elements in 119866 wrt the order given by

the user-defined function udf

filter(119866 udf ) Select elements from 119866 via udf

map(119866 udf ) Return 119867 where 119867 [119894] =udf (119866 [119894])

reduce(119866 udf ) Return a reduced value of 119866 via udf

random(119886 119887) Generate a random intfloat in range of [119886119887)

concat(119886middot middot middot ) Concatenate values together into a vector

extract(119866 prime) Extract metadata from the compressed 119866 prime

compression algorithms on GPU is non-trivial and integrat-ing them into DNN systems usually requires substantial sys-tem expertise and manual efforts Thus we design a toolkitCompLL which allows practitioners to easily develop highly-optimized compression algorithms using GPU capability TheCompLL-generated code is then consumed by CaSync thus en-abling an automated integration of compression algorithmswith CaSync into DNN systems

41 Unified API Abstraction

CompLL provides a unified API abstraction for implement-ing gradient compression algorithms As shown in Figure 4CompLL has two simple APIs encode and decode as wellas a few algorithm-specific parameters (eg compressionrate for sparsification and bitwidth or precision for quan-tization) The encode API takes as input a gradient matrixand generates a compressed gradient as output In particularwe use uint8 as the type of the output matrix because wecan then cast one or multiple uint8 to any type in CUDAOn the other hand the decode API unfolds a compressedgradient into its original form

42 Common Operator Library

By studying the state-of-the-art compression algorithms weobserve that they can generally be specified using a fewcommon operators [4 10 37 62 67 68 74 76] For instancethese algorithms all need to scan the elements of a gradi-ent Alongside scanning they all need to perform operationssuch as filtering or reducing the scanned elements to producecompressed gradients With this observation we generalizea library of common operators that can be used to constructgradient compression algorithms as listed in Table 4 For in-stance the reduce(G maxAbs) operator with a user-definedfunction maxAbs computes the maximum absolute value ofthe gradient matrix 119866 We have carefully optimized thesecommon operators regarding memory access and bank con-flicts in GPU [24] so that any algorithm implementation

1 param EncodeParams

2 uint8 bitwidth assume bitwidth = 2 for clarity

3

4 float min max gap

5 uint2 floatToUint(float elem)

6 float r = (elem minus min) gap

7 return floor(r + randomltfloatgt(0 1))

8

9 void encode(floatlowast gradient uint8lowast compressed

10 EncodeParams params)

11 min = reduce(gradient smaller)

12 max = reduce(gradient greater)

13 gap = (max minus min) ((1 ltlt paramsbitwidth) minus 1)

14 uint8 tail = gradientsize (1 ltlt paramsbitwidth)

15 uint2lowast Q =map(gradient floatToUint)

16 compressed = concat(paramsbitwidth tail

17 min max Q)

18

Figure 5 TernGradrsquos compression logic specified using theAPI common operators and DSL of CompLL

based on these operators can automatically inherent ourGPU optimizations (see details in Section 5)

43 Code Synthesis and Domain-specific Language

We provide two ways for practitioners to implement algo-rithms using CompLL They can invoke our common operatorlibrary directly in their algorithm implementation This how-ever requires them to be familiar with the low-level CUDAprogramming To further relieve the burden we design asimple C-like domain-specific language (DSL) for practition-ers to easily implement their algorithms with the unified APIabstraction filled with common operators without worry-ing about hardware-oriented implementation and optimiza-tion Specifically our DSL supports basic data types suchas uint1 uint2 uint4 uint8 int32 float and array aswell as simple numerical computations and function calls tothe common operators Though not supported our practiceshows that it is often unnecessary to include loops in theDSL code as the iterative processing semantics have alreadybeen covered by the implementation of common operators

To show how DSL works we use it to implement the clas-sic TernGrad compression [74] as an example in Figure 5Line 1-3 specify bitwidth as the algorithm parameter todetermine compression rate Line 5-8 specify a user-definedfunction floatToUint to compress a float number into abitwidth-sized integer The TernGradrsquos logic to implementour encodeAPI begins at line 9 and takes the original gradi-ent as input and outputs the compressed gradient Throughline 11-14 the algorithm metadata which is essential fordecompression is generated At line 15 we pass the user-defined function floatToUint to the common operator mapto generate the compressed gradient matrix Q Finally at

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 3: Gradient Compression Supercharged High-Performance Data

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Server0

Server1

Worker0

Worker1

Worker2

②ത119840 ത119840 ത119840①119840120782 119840120783 119840120784(a) Parameter Server (PS)

②119840120782 + 119840120783Worker

0

Worker2

Worker1

①119840120782③ത119840 ④ത119840

(b) Ring-allreduce

Figure 1 Gradient synchronization strategies For Parame-ter Server (PS) we only show interactions between 1198781198901199031199071198901199030and119908119900119903119896119890119903119904 for clarity

barrier for convergence guarantees [84] while the latter caseeliminates the negative impact of stragglers at the cost ofpossibly not converging We focus on synchronous gradientcoordination because of its wide adoption [1 13 32 56]

22 Gradient Synchronization

Parameter Server (PS) [34 55] and AllReduce [7 16 42 64]are two widely-adopted gradient synchronization strategiesParameter Server In Figure 1a each node acts as a serveror a worker [34] DNN model parameters and gradients areoften partitioned across multiple servers for load balancingWhen local training completes each worker pushes gradi-ents to servers (①) which are then aggregated and updatedto model parameters Afterwards each worker pulls the up-dated results from servers to trigger the next iteration (②)AllReduce This strategy uses collective communicationprimitives One representative example is Ring-allreduce [7]where all nodes are workers and they form a logical ringAs shown in Figure 1b it takes 119873 minus 1 communication stepsalong the ring to aggregate gradients (①-②) and another119873minus1steps to disseminate the updated gradient (③-④) where 119873is the number of workers Furthermore Ring-allreduce canbatch gradients which are then partitioned again for loadbalancing Following this at each synchronization step eachworker simultaneously sends a partition to its successor andreceives another partition from its predecessor to best utilizeits bi-directional network bandwidth [54]

23 Computation and Communication Tension

Modern DNN systems pipeline computation and communi-cation for better performance eg via running the gradientcommunication and DNN backward computation of twoDNN layers in parallel to hide the former overhead behindthe latter when possible However there exists a fundamentaltension between computation and communication [61]The recent DNN accelerator booming [49] and domain-

specific compiler advancement [14 17 57 58] have signifi-cantly improved the single-node training speed Such fast-advancing computing capabilities typically lead to morefrequent gradient synchronization and thus put high pres-sure on the network infrastructure However the networkupgrade does not keep up the pace of the computation-related advancements [39 41 51 75] The imbalance between

Table 1 Training performance of Bert-large and Trans-former with 16 AWS p3dn24xlarge instances (8 V100 GPUseach) 100Gbps BytePS 025 Horovod 0192 fp32 precision

System

configurations

Scaling

efficiency

Communication

ratio

Trans-

former

Ring-allreduce

wo compression047 768

Ring-allreduce w

DGC compression061 (298uarr) 703 (85darr)

Bert-

large

BytePS

wo compression071 636

BytePS w

onebit compression076 (70uarr) 609 (42darr)

the fast-advancing computing capability and the slower-advancing communication capability increasingly reducesthe chance of pipelining the gradient communication andcomputationA few software approaches have been recently proposed

to optimize the computation-communication pipeline rang-ing from priority-based gradient scheduling and partition-ing [56] to advanced synchronization architectures [30 64]However as shown in Table 1 the latest highly-optimizedBytePS [30] and Ring-allreduce [64] only achieve scalingefficiencies1 of 071 and 047 when training two popularDNN models (Bert-large and Transformer) in a cluster of16 nodes on AWS EC2 with 128 NVIDIA V100 GPUs and100Gbps network The communication time accounts for upto 768 of the total training time for training these two mod-els with significant portion not being hidden behind DNNcomputation This indicates that the fundamental tensionbetween gradient computation and communication persistsin data parallel DNN training even with the state-of-the-artapproaches and recent bandwidth advancements

24 Gradient Compression

Gradient compression is a general approach for reducingthe transmitted data volume during gradient synchroniza-tion [37 74] and has a great potential to alleviate the afore-mentioned communication bottleneck Indeed it is beingadopted by the industry and a number of recent efforts fromFacebook and AWS have started to integrate gradient com-pression into modern DNN systems since June 2020 [5 20]

The gradient compression algorithms generally fall withinthe sparsification and quantization categories Sparsificationleverages the sparsity of gradients and filters out insignifi-cant elements in the gradient matrix [4 32 37] while quanti-zation decreases the precision of gradients [67 74 76] For in-stance a 1-bit quantization enabled by onebit algorithm [62]could reduce the transmitted data volume by 969 Many

1Scaling efficiency is defined asactual_performance

119873timessingle_GPU_performance where 119873 is the

total number of GPUs with 1 being the best (ie linear scaling)

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

of these algorithms either theoretically prove or empiricallyvalidate that adopting them does not affect model conver-gence and imposes only a negligible impact on accuracy iea compression-enabled DNN training converges to approxi-mately the same accuracy through the same number of itera-tions compared with a non-compression training [37 67 74]

25 System Challenges and Opportunities

Surprisingly our study reveals that without proper systemsupport the gradient compressionrsquos benefits are diluted sig-nificantly at the best and could even negatively affect theoverall DNN training throughput at the worstOne important reason for this surprising observation is

that gradient compression requires non-negligible compu-tational overhead Alongside the gradient synchronizationpath an encode operator must precede sending fully or par-tially aggregated gradients and a decode operator must fol-low when receiving compressed gradients There could beup to 3119873 minus 2 extra operators for each gradient synchronizedacross 119873 workers These extra operators are needed becauseit is impossible to directly aggregate over compressed gra-dients due to the existence of metadata (in sparsification-based algorithms) or the potential overflow of operatinglow-precision numbers (in quantization-based algorithms)

The accumulated compression-related computational costduring gradient synchronization can significantly dilute itsbenefits of reducing the transmitted data volume To demon-strate this we train Bert-large with the onebit compres-sion [62] developed by AWS and integrated into MXNet withBytePS2 Table 1 shows that BytePS-onebit achieves a verylimited improvement over BytePS As another example theDGC compression [37] with 01 compression rate (where itis integrated into TensorFlow with the Ring-allreduce syn-chronization strategy) achieves only a 13times training speedupfor the Transformer model We discover that such limitedimprovements are mainly due to the co-design of BytePS andRing-allreduce with the compression algorithms wherebythe compression logic is separated and scattered across gradi-ent synchronization Such a co-design also makes it difficultto verify the correctness of the implemented algorithms aswell as to generalize to other gradient compression algo-rithms and synchronization strategies To enable a generalapproach it is important to separate the design of compres-sion algorithms from that of synchronization strategiesThe first challenge to address the aforementioned issues

lies in designing a generalizable approach to amortize theextra computational overhead brought by gradient compres-sion (eg encode and decode operators) along the communi-cation steps during gradient synchronization This is difficultdue to non-trivial factors including for instance the data

2The open-source onebit was implemented only on CPU [11] For a fair

comparison we have implemented and integrated a highly-optimized on-

GPU onebit into BytePS

dependencies between gradient computation and communi-cation the communication topology such as a bipartite graphfor PS and a ring for Ring-allreduce the compression speedand ratio of different compression algorithms to name a fewTo address this challenge the key is to identify the rightgranularity of combining and coordinating various gradientcompression and communication operators

Take Ring-allreduce as an example It coordinates the com-munication of all training nodes by running a global atomicbulk synchronization operation to complete 2(119873 minus 1) point-to-point communication steps for batched gradients Whilethis design is bandwidth-optimal [54] such a coarse-grainedapproach fails to hide the compression-related overhead be-hind the communication overhead Unlike Ring-allreducethe PS synchronization strategy (including the latest BytePS)exchanges gradients via individual micro point-to-point com-munication steps While such a fine-grained approach facil-itates a better computation-communication pipelining tohide compression-related computational overhead it incursa larger number of communication steps and in turn a pro-portionally growing extra computational overhead

The second challenge is to provide systematic support fordeveloping optimizing and integrating gradient compres-sion algorithms into DNN systems Without this support thereal-world adoption of gradient compression algorithms re-quires significant system expertise and manual efforts to per-form various ad-hoc development and optimization whichis particularly challenging for DNN practitioners Thus it isquite difficult if not impossible for gradient compression tolive up to its full promise of accelerating DNN trainingTo provide a general system support for various algo-

rithms one critical question to answer is where to performtheir computation eg on CPU or GPU We observe thatcompression algorithms typically need to scan large gradientmatrices multiple times to filter out insignificant gradients orto decrease the precision of gradients Therefore they are ex-tremely memory-intensive and require massive parallelismto achieve fast compression (and decompression) We believethe on-GPU gradient compression is the preferred approachconsidering GPUrsquos high memory bandwidth and many-corearchitecture Furthermore given that gradients produced byDNN computations are inherently in the GPU memory theon-GPU compression can greatly alleviate the bandwidthtension of the PCIe bus between GPU and host As an ex-ample for the onebit compression algorithm [62] its CPUimplementation runs 356times slower than the GPU-orientedcounterpart (our implementation) using the same experi-mental setup as Table 1 BytePS with the on-CPU onebitintroduces 952 training overhead than its on-GPU counter-part Despite of on-GPU advantages developing optimizingand integrating on-GPU compression algorithms puts heavyburden on DNN practitioners and doing it well requiresextensive system expertise and the understanding of lower-level GPU hardware and CUDA programming details

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

In summary the above two challenges motivate us torethink the abstraction for both gradient compression algo-rithms and compression-aware synchronization strategiesas well as to identify the common design patterns to supporteasy development optimization and integration of compres-sion algorithms in DNN systems for real-world use

3 Compression-Aware Synchronization

We propose CaSync a compression-aware gradient synchro-nization architecture that provides a general support for gra-dient compression algorithms and synchronization strategiesIn particular CaSync employs a composable design to enablethis general yet high-performance gradient synchronization

31 Composable Pipelined Synchronization

As motivated in Section 25 a proper granularity of ab-straction for gradient compression algorithms and synchro-nization strategies is the key to achieve a general yet high-performance gradient synchronization To identify the rightgranularity we employ a composable approach which firstdecouples all gradient synchronization primitives in a fine-grained manner and then combines and coordinates themaccording to their data dependencies and order constraintsto build an efficient computation-communication pipeline

We first decouple the communication topology from gra-dient synchronization strategies We represent the topologyas a directed graph where the vertex set contains trainingnodes and the edge set specifies the connections betweenthese nodes In gradient synchronization there are funda-mentally two node roles namely worker and aggregator

(with potentially other roles serving for optimizations only)A worker produces gradients from its local DNN computa-tion and initiates the gradient synchronization process Anaggregator aggregates gradients and then relays the aggre-gate result to workers or other aggregators Take PS andRing-allreduce as two examples of gradient synchronizationstrategies As shown in Figure 1 for PS we build bipartiteconnections between servers (ie aggregators) and work-ers for Ring-allreduce each node serves both roles and theclockwise connections are built between these nodesWe then split the gradient synchronization process into

five general primitives namely encode decode merge sendand recv Specifically lsquoencodersquo and lsquodecodersquo are two com-puting primitives for compressing and decompressing gra-dients respectively lsquomergersquo is another computing primi-tive for aggregating multiple gradients into one lsquosendrsquo andlsquorecvrsquo are two communication primitives for sending andreceiving gradients to and from other nodes respectivelyWith these general primitives we can conveniently specify acompression-aware workflow at each worker and aggregatorwhich defines proper data dependencies or order constraintsbetween these primitives For instance lsquoencodersquo precedes

Global

Coordinator

(Sec 32)

Other networked

peers

Worker or Aggregator at Nodei QCommu

QComp

Pluggable on-GPU

compression Library (Sec 4)Executor

Task manager

Selective Compression

Partitioning Planner (Sec 33)

Role+WorkflowDependency GraphTopologies

Ring-allreducePS

①T

ask

s

② Tasks

③ Notification

④Metadata

⑤ Gradient batches amp communication plans

⑥ Notification DNN system

runtime

TensorFlow

MXNet

PyTorch

Figure 2 The CaSync architecture design where the DNNsystem runtime is omitted

lsquosendrsquo at the worker because of the data dependency thatthe worker has to compress a gradient before sending itFigure 2 shows an overview of the CaSync design With

the aforementioned abstraction we are able to design a holis-tic gradient synchronization architecture for both workersand aggregators Each worker or aggregator employs a taskmanager to schedule and execute computing and communi-cation tasks Specifically according to the node role the taskmanager consults the specified workflow to select whichseries of computing and communication primitives to exe-cute during gradient synchronization Afterwards accordingto the communication topology (eg a PS bipartite graphor a ring) the task manager informs the communicationprimitives where to send and receive compressed gradients

The above fine-grained abstraction creates opportunitiesto pipeline computing and communication tasks for im-proved performance As shown in Figure 2 at Step① the taskmanager pushes tasks into two task queues 119876119888119900119898119901 for com-puting tasks and 119876119888119900119898119898119906 for communication tasks Tasks in119876119888119900119898119901 and 119876119888119900119898119898119906 are executed in an asynchronous man-ner for efficient use of computing and networking resourcesHowever as tasks are spread in two independent task queuesand are executed asynchronously there is a high risk thatthe data dependencies between tasks are violated Thereforeone challenge here is how to preserve data dependenciesand order constraints when executing tasks from 119876119888119900119898119901 and119876119888119900119898119898119906 asynchronously

To ensure the proper order the task manager maintainsa dependency graph to manage data dependencies betweentasks at runtime For instance for a compressed gradientits lsquorecvrsquo task must first write to a memory buffer and onlythen it can be read by the lsquodecodersquo task Upon the comple-tion of a computing task from 119876119888119900119898119901 (step ②) it notifies thetask manager to clear the following tasksrsquo pending depen-dencies and then promotes the execution of any task if allits pending dependencies are cleared (step ③) In doing sothe asynchronous execution of gradient synchronization isdriven by the dependency graph among tasks Note that thestep ④-⑥ correspond to a coordinated compression-awarebulk synchronization mechanism in the next section

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

Coordinator

Metadata

Per-link task queues

N0 N1N0 N1 aaa bb cc dd

Non-conflicting links

with batched gradients

of balanced sizes

lta N1gt

QCommuworker

ltb N1gt lte N2gt N0 N2N0 N2 eee ff

N1 N0N1 N0 ggg hh ii

N1 N2N1 N2 jjj kk

N2 N0N2 N0

N2 N1N2 N1 qqq rr ss

ltf N2gt

QCommuaggregator

ltc N1gt ltd N1gt

Node0

Node1

Node2

l

n o pm

N0 N1N0 N1 aa bb cc

N1 N2N1 N2 jj kk

N2 N0N2 N0

N0 N1 a b c

N1 N2 j k

N2 N0 nn oo ppm

Metadata

andor

aggregatoraggregatorworker worker

aggregatoraggregatorandorworker worker

andor

Figure 3 The workflow of the compression-aware coordi-nated bulk synchronization

32 Compression-aware Bulk Synchronization

While the above composable pipelined synchronization canalready improve the training performance significantly itdoes not explore the opportunities brought by bulk syn-chronization ETH an important feature that is supported bymost modern DNN systems Instead of computing and com-municating each gradient at a time bulk synchronizationhandles gradients in a batched manner to better take advan-tage of parallelism and reduce the execution overhead [64]Here we extend the conventional bulk synchronization to becompression-aware and additionally introduce batch com-pression to compress gradients in a batched manner Ourmain goal is to reduce the compression and communica-tion overheads Compression-aware bulk synchronizationis particularly important for small gradients as their com-pression and communication overheads are difficult to becompensated by the size reduction brought by compressionThe batch compression in CaSync batches a sequence of

compression-related tasks from119876119888119900119898119901 and schedules them to-gether to GPU for compression This allows a single callbackfunction for a batch of gradients and thus also reduces theCPU-GPU coordination overhead This is feasible as modernDNN systems often employ the operation fusing techniqueto produce multiple gradients at once in GPU memory [6]The bulk communication in CaSync parallelizes the net-

work transmission across training nodes to amortize thecommunication overheads across gradients However decid-ing the appropriate bulk granularity for communication ischallenging As discussed in Section 25 there are pros andcons for both fine-grained and coarse-grained granularityand a proper balance needs to be struck Our high-level de-sign is that we slice the gradient synchronization processinto monotonically increasing time slots and select a groupof network-idle nodes to join each time slot In a slot toavoid bandwidth contention each selected node sends itsgradients to only one other node via its uplink and receives

gradients from its downlink Note that the transmitted gra-dients in a time slot may correspond to different communi-cation steps (see Figure 1) in the gradient synchronizationprocess Together the goal of this design is to enable theadaptive granularity of communication and the optimizednode coordination during gradient synchronization

Specifically we introduce a global coordinator to adapt thecommunication of all gradients indiscriminately (compressedor not) and determine an optimal coordinated communica-tion plan The plan should fulfill two goals 1) maximize theutilization of network bandwidth between pairs of nodesand 2) balance the size of transmitted gradientsThe design of the global coordinator is shown in Fig-

ure 3 Each node (eg 1198731199001198891198900 or 1198730) can serve as a workeror an aggregator or both and it periodically sends the meta-data ⟨gradient_name gradient_size destination_node⟩ ofthe tasks in its communication task queue 119876119888119900119898119898119906 to theglobal coordinator eg lsquogradients 119886 119887 119888 and 119889 to node 1198731rsquoand lsquogradients 119890 and 119891 to node 1198732rsquo (gradient sizes omittedfor clarity) Upon arrival the coordinator places these tasksinto their respective per-link task queues Afterwards thecoordinator looks up these queues and selects a set of non-conflicting links between nodes (eg 3 of 6 links are selected)The coordinator then batches the gradients that need to betransmitted over each selected link with balanced batch sizesamortizing the communication overhead across gradientsThe size of each batch is decided based on a specified timeoutor a size threshold whichever is met firstFinally the coordinator broadcasts the information of

these gradient batches and coordinated communication plansto the relevant nodes (step⑤ in Figure 2) so that the executoron each node can execute these plans in a coordinated man-ner and notify its task manager to clear the dependenciesof the tasks in each batch accordingly (step ⑥ in Figure 2)Altogether our compression-aware coordinated bulk syn-chronization enables both efficient batch compression onGPU and efficient communication of small gradients

33 Selective Compression and Partitioning

Reducing data volume being transmitted does not alwaysoffset the compression-related overhead even with optimizedsynchronization strategies It is more complicatedwhen largegradients require partitioning to leverage parallelism beforecompression Therefore we design a selective compression

and partitioning mechanism with a cost model to analyzethe time cost of synchronizing gradients with and withoutcompression and then make a selective decision to avoidover-compression penalties and further leverage parallelismand load balancing The cost model is simple yet unified andis applicable to different CaSync synchronization strategies

There are a few parameters used in the cost analysis as de-fined in Table 2 Here the compression rate 119903 as well as thecompression cost 119879119890119899119888 (119898) and decompression cost 119879119889119890119888 (119898)

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 2 Notation in selective compression and partitioning

Notation Interpretation

119898 Gradient size in bytes

119870 Number of gradient partitions

119873 Number of workers or aggregators

119903 Compression rate

119879119890119899119888 (119898) Time for compressing an119898-byte gradient

119879119889119890119888 (119898) Time for decompressing an119898-byte gradient

119879119904119890119899119889 (119898) Time for transmitting an119898-byte gradient

Table 3 Synchronization parameters and their values

120572 120573 120574

CaSync-Ring 2(119873 minus 1) 119873 119873

CaSync-PS 2119873 119870 + 1 119873 + 1

are specific to compression algorithms and can be easily pro-filed Moreover 119879119904119890119899119889 (119898) denotes the network transmissiontime for an 119898-byte gradient We omit merge operators asthey are compression-irrelevantWe first analyze the original time to synchronize an119898-

byte gradient with 119870 partitions but without compression

denoted as 119879119900119903119894119892119904119910119899119888 (119898119870) Here we use PS and Ring-allreduce

designed within CaSync as examples denoted as CaSync-PS and CaSync-Ring For simplicity let 119873 be the numberof their respective workers or aggregators We assume thecommon practice used in real world where all nodes are ho-mogeneous [55 56] Also the number of gradient partitions119870 is between 1 and 119873 for both strategies with a discussion

of larger 119870 values later We calculate 119879119900119903119894119892119904119910119899119888 (119898119870) as follows

119879119900119903119894119892119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (

119898

119870) (1)

Here 120572 denotes the total number of serial communicationsteps for synchronizing a gradient and its value dependson the given synchronization strategy As shown in Table 3the 120572 value of CaSync-Ring is 2(119873 minus 1) since it takes 119873 minus 1steps for gradient aggregation and another 119873 minus 1 steps todisseminate the updated gradient (see Figure 1b) and all 119870gradient partitions are synchronized in parallel Similarlythe 120572 value of CaSync-PS is 2119873 where the communicationof gradient partitions is well coordinated so that no networklinks used are conflicting ie all aggregators run in paralleland each takes 119873 steps to receive gradient partitions from 119873

workers and another 119873 steps to return results (see Figure 1a)Next we calculate the time 119879

119888119901119903119904119910119899119888 (119898119870) to synchronize

an119898-byte gradient with 119870 partitions and compression

119879119888119901119903119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (119903 times

119898

119870) + 120573 times119879119890119899119888 (

119898

119870) + 120574 times119879119889119890119888 (119903 times

119898

119870)

(2)Here the 120572 value remains the same but the communicationcost is reduced to119879119904119890119899119889 (119903times

119898119870) because one needs to send only

the compressed gradient partition of the reduced size 119903 times 119898119870

This however comes with an extra compression-relatedcomputational cost We denote the number of encode and

decode operators that do not overlap with gradient trans-mission as 120573 and 120574 whose values are described in Table 3Take CaSync-Ring as an example Its first aggregation phaserequires 119873 minus 1 encode and 119873 minus 1 decode operators and theyare non-overlapping because a node can compress a gradi-ent partition only after it has decompressed and aggregatedthe partition received from its predecessor (ie data depen-dencies) Its second dissemination phase requires only oneencode and 119873 minus 1 decode operators However all decodeoperators except the last one can overlap with gradient trans-mission Therefore for CaSync-Ring 120573 = (119873 minus 1) + 1 = 119873

and also 120574 = (119873 minus 1) + 1 = 119873 We omit the analysis forCaSync-PS due to space limit Note that our cost model canbe relaxed to split a gradient into beyond 119873 partitions toleverage the compression-communication pipeline enabledby CaSync further To do so we simply adapt the calculationof 119879

119888119901119903119904119910119899119888 (119898119870) by grouping 119870 partitions into lceil119870

119873rceil batches

Based on the comparison of 119879119900119903119894119892119904119910119899119888 (119898119870) and 119879

119888119901119903119904119910119899119888 (119898119870)

we decide whether it is beneficial to enable compression fora gradient If so we also compute the optimal number ofpartitions for the best performance This is feasible because1) all parameters in Table 2 can be easily obtained or profiledvia GPU and network measurements where we launch theGPU kernels and peer-to-peer communication tasks withrespect to different gradient sizes to fit the compression andnetwork cost curves respectively 2) the values of 120572 120573 and 120574in Table 3 needed to analyze119879

119888119901119903119904119910119899119888 (119898119870) are determined once

a DNN system with its CaSync synchronization strategy isgiven and 3) the expressions 1 and 2 are convex functionswhich make it straightforward to identify the best setting foreach gradient It is worth mentioning that our cost modelassumes a homogeneous environment where all GPUs andnetwork links have the same capacities and the profilingresults are obtained without considering the variance orinterference of network and GPUs We leave the explorationof the impacts of dynamics on the profiling accuracy of ourcost model as future work

Note that most if not all gradient compression algorithms(including the five state-of-the-art ones we evaluate) arelayer-wised We impose a strict partition-compress-batchorder which is applied to each DNN layer independentlyand thus it does not affect the accuracy and convergence oforiginal compression algorithms For few non-layer-wisedcompression algorithms we simply turn off the selectivecompression and partitioning thus incurring no negativeimpacts on accuracy and convergence of these algorithms

4 Compression Library and Language

As discussed in Section 25 on-GPU compression can greatlyaccelerate compression-related computation alleviate thebandwidth tension between GPU and host and create newopportunities to further optimize the gradient synchroniza-tion process However developing and optimizing gradient

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

1 void encode(floatlowast input uint8lowast output params)

2 void decode(uint8lowast input floatlowast output params)

Figure 4 Unified compression-related API abstraction

Table 4 List of common operators 119866 is a gradient matrix

Operator Interpretation

sort(119866 udf ) Sort elements in 119866 wrt the order given by

the user-defined function udf

filter(119866 udf ) Select elements from 119866 via udf

map(119866 udf ) Return 119867 where 119867 [119894] =udf (119866 [119894])

reduce(119866 udf ) Return a reduced value of 119866 via udf

random(119886 119887) Generate a random intfloat in range of [119886119887)

concat(119886middot middot middot ) Concatenate values together into a vector

extract(119866 prime) Extract metadata from the compressed 119866 prime

compression algorithms on GPU is non-trivial and integrat-ing them into DNN systems usually requires substantial sys-tem expertise and manual efforts Thus we design a toolkitCompLL which allows practitioners to easily develop highly-optimized compression algorithms using GPU capability TheCompLL-generated code is then consumed by CaSync thus en-abling an automated integration of compression algorithmswith CaSync into DNN systems

41 Unified API Abstraction

CompLL provides a unified API abstraction for implement-ing gradient compression algorithms As shown in Figure 4CompLL has two simple APIs encode and decode as wellas a few algorithm-specific parameters (eg compressionrate for sparsification and bitwidth or precision for quan-tization) The encode API takes as input a gradient matrixand generates a compressed gradient as output In particularwe use uint8 as the type of the output matrix because wecan then cast one or multiple uint8 to any type in CUDAOn the other hand the decode API unfolds a compressedgradient into its original form

42 Common Operator Library

By studying the state-of-the-art compression algorithms weobserve that they can generally be specified using a fewcommon operators [4 10 37 62 67 68 74 76] For instancethese algorithms all need to scan the elements of a gradi-ent Alongside scanning they all need to perform operationssuch as filtering or reducing the scanned elements to producecompressed gradients With this observation we generalizea library of common operators that can be used to constructgradient compression algorithms as listed in Table 4 For in-stance the reduce(G maxAbs) operator with a user-definedfunction maxAbs computes the maximum absolute value ofthe gradient matrix 119866 We have carefully optimized thesecommon operators regarding memory access and bank con-flicts in GPU [24] so that any algorithm implementation

1 param EncodeParams

2 uint8 bitwidth assume bitwidth = 2 for clarity

3

4 float min max gap

5 uint2 floatToUint(float elem)

6 float r = (elem minus min) gap

7 return floor(r + randomltfloatgt(0 1))

8

9 void encode(floatlowast gradient uint8lowast compressed

10 EncodeParams params)

11 min = reduce(gradient smaller)

12 max = reduce(gradient greater)

13 gap = (max minus min) ((1 ltlt paramsbitwidth) minus 1)

14 uint8 tail = gradientsize (1 ltlt paramsbitwidth)

15 uint2lowast Q =map(gradient floatToUint)

16 compressed = concat(paramsbitwidth tail

17 min max Q)

18

Figure 5 TernGradrsquos compression logic specified using theAPI common operators and DSL of CompLL

based on these operators can automatically inherent ourGPU optimizations (see details in Section 5)

43 Code Synthesis and Domain-specific Language

We provide two ways for practitioners to implement algo-rithms using CompLL They can invoke our common operatorlibrary directly in their algorithm implementation This how-ever requires them to be familiar with the low-level CUDAprogramming To further relieve the burden we design asimple C-like domain-specific language (DSL) for practition-ers to easily implement their algorithms with the unified APIabstraction filled with common operators without worry-ing about hardware-oriented implementation and optimiza-tion Specifically our DSL supports basic data types suchas uint1 uint2 uint4 uint8 int32 float and array aswell as simple numerical computations and function calls tothe common operators Though not supported our practiceshows that it is often unnecessary to include loops in theDSL code as the iterative processing semantics have alreadybeen covered by the implementation of common operators

To show how DSL works we use it to implement the clas-sic TernGrad compression [74] as an example in Figure 5Line 1-3 specify bitwidth as the algorithm parameter todetermine compression rate Line 5-8 specify a user-definedfunction floatToUint to compress a float number into abitwidth-sized integer The TernGradrsquos logic to implementour encodeAPI begins at line 9 and takes the original gradi-ent as input and outputs the compressed gradient Throughline 11-14 the algorithm metadata which is essential fordecompression is generated At line 15 we pass the user-defined function floatToUint to the common operator mapto generate the compressed gradient matrix Q Finally at

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 4: Gradient Compression Supercharged High-Performance Data

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

of these algorithms either theoretically prove or empiricallyvalidate that adopting them does not affect model conver-gence and imposes only a negligible impact on accuracy iea compression-enabled DNN training converges to approxi-mately the same accuracy through the same number of itera-tions compared with a non-compression training [37 67 74]

25 System Challenges and Opportunities

Surprisingly our study reveals that without proper systemsupport the gradient compressionrsquos benefits are diluted sig-nificantly at the best and could even negatively affect theoverall DNN training throughput at the worstOne important reason for this surprising observation is

that gradient compression requires non-negligible compu-tational overhead Alongside the gradient synchronizationpath an encode operator must precede sending fully or par-tially aggregated gradients and a decode operator must fol-low when receiving compressed gradients There could beup to 3119873 minus 2 extra operators for each gradient synchronizedacross 119873 workers These extra operators are needed becauseit is impossible to directly aggregate over compressed gra-dients due to the existence of metadata (in sparsification-based algorithms) or the potential overflow of operatinglow-precision numbers (in quantization-based algorithms)

The accumulated compression-related computational costduring gradient synchronization can significantly dilute itsbenefits of reducing the transmitted data volume To demon-strate this we train Bert-large with the onebit compres-sion [62] developed by AWS and integrated into MXNet withBytePS2 Table 1 shows that BytePS-onebit achieves a verylimited improvement over BytePS As another example theDGC compression [37] with 01 compression rate (where itis integrated into TensorFlow with the Ring-allreduce syn-chronization strategy) achieves only a 13times training speedupfor the Transformer model We discover that such limitedimprovements are mainly due to the co-design of BytePS andRing-allreduce with the compression algorithms wherebythe compression logic is separated and scattered across gradi-ent synchronization Such a co-design also makes it difficultto verify the correctness of the implemented algorithms aswell as to generalize to other gradient compression algo-rithms and synchronization strategies To enable a generalapproach it is important to separate the design of compres-sion algorithms from that of synchronization strategiesThe first challenge to address the aforementioned issues

lies in designing a generalizable approach to amortize theextra computational overhead brought by gradient compres-sion (eg encode and decode operators) along the communi-cation steps during gradient synchronization This is difficultdue to non-trivial factors including for instance the data

2The open-source onebit was implemented only on CPU [11] For a fair

comparison we have implemented and integrated a highly-optimized on-

GPU onebit into BytePS

dependencies between gradient computation and communi-cation the communication topology such as a bipartite graphfor PS and a ring for Ring-allreduce the compression speedand ratio of different compression algorithms to name a fewTo address this challenge the key is to identify the rightgranularity of combining and coordinating various gradientcompression and communication operators

Take Ring-allreduce as an example It coordinates the com-munication of all training nodes by running a global atomicbulk synchronization operation to complete 2(119873 minus 1) point-to-point communication steps for batched gradients Whilethis design is bandwidth-optimal [54] such a coarse-grainedapproach fails to hide the compression-related overhead be-hind the communication overhead Unlike Ring-allreducethe PS synchronization strategy (including the latest BytePS)exchanges gradients via individual micro point-to-point com-munication steps While such a fine-grained approach facil-itates a better computation-communication pipelining tohide compression-related computational overhead it incursa larger number of communication steps and in turn a pro-portionally growing extra computational overhead

The second challenge is to provide systematic support fordeveloping optimizing and integrating gradient compres-sion algorithms into DNN systems Without this support thereal-world adoption of gradient compression algorithms re-quires significant system expertise and manual efforts to per-form various ad-hoc development and optimization whichis particularly challenging for DNN practitioners Thus it isquite difficult if not impossible for gradient compression tolive up to its full promise of accelerating DNN trainingTo provide a general system support for various algo-

rithms one critical question to answer is where to performtheir computation eg on CPU or GPU We observe thatcompression algorithms typically need to scan large gradientmatrices multiple times to filter out insignificant gradients orto decrease the precision of gradients Therefore they are ex-tremely memory-intensive and require massive parallelismto achieve fast compression (and decompression) We believethe on-GPU gradient compression is the preferred approachconsidering GPUrsquos high memory bandwidth and many-corearchitecture Furthermore given that gradients produced byDNN computations are inherently in the GPU memory theon-GPU compression can greatly alleviate the bandwidthtension of the PCIe bus between GPU and host As an ex-ample for the onebit compression algorithm [62] its CPUimplementation runs 356times slower than the GPU-orientedcounterpart (our implementation) using the same experi-mental setup as Table 1 BytePS with the on-CPU onebitintroduces 952 training overhead than its on-GPU counter-part Despite of on-GPU advantages developing optimizingand integrating on-GPU compression algorithms puts heavyburden on DNN practitioners and doing it well requiresextensive system expertise and the understanding of lower-level GPU hardware and CUDA programming details

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

In summary the above two challenges motivate us torethink the abstraction for both gradient compression algo-rithms and compression-aware synchronization strategiesas well as to identify the common design patterns to supporteasy development optimization and integration of compres-sion algorithms in DNN systems for real-world use

3 Compression-Aware Synchronization

We propose CaSync a compression-aware gradient synchro-nization architecture that provides a general support for gra-dient compression algorithms and synchronization strategiesIn particular CaSync employs a composable design to enablethis general yet high-performance gradient synchronization

31 Composable Pipelined Synchronization

As motivated in Section 25 a proper granularity of ab-straction for gradient compression algorithms and synchro-nization strategies is the key to achieve a general yet high-performance gradient synchronization To identify the rightgranularity we employ a composable approach which firstdecouples all gradient synchronization primitives in a fine-grained manner and then combines and coordinates themaccording to their data dependencies and order constraintsto build an efficient computation-communication pipeline

We first decouple the communication topology from gra-dient synchronization strategies We represent the topologyas a directed graph where the vertex set contains trainingnodes and the edge set specifies the connections betweenthese nodes In gradient synchronization there are funda-mentally two node roles namely worker and aggregator

(with potentially other roles serving for optimizations only)A worker produces gradients from its local DNN computa-tion and initiates the gradient synchronization process Anaggregator aggregates gradients and then relays the aggre-gate result to workers or other aggregators Take PS andRing-allreduce as two examples of gradient synchronizationstrategies As shown in Figure 1 for PS we build bipartiteconnections between servers (ie aggregators) and work-ers for Ring-allreduce each node serves both roles and theclockwise connections are built between these nodesWe then split the gradient synchronization process into

five general primitives namely encode decode merge sendand recv Specifically lsquoencodersquo and lsquodecodersquo are two com-puting primitives for compressing and decompressing gra-dients respectively lsquomergersquo is another computing primi-tive for aggregating multiple gradients into one lsquosendrsquo andlsquorecvrsquo are two communication primitives for sending andreceiving gradients to and from other nodes respectivelyWith these general primitives we can conveniently specify acompression-aware workflow at each worker and aggregatorwhich defines proper data dependencies or order constraintsbetween these primitives For instance lsquoencodersquo precedes

Global

Coordinator

(Sec 32)

Other networked

peers

Worker or Aggregator at Nodei QCommu

QComp

Pluggable on-GPU

compression Library (Sec 4)Executor

Task manager

Selective Compression

Partitioning Planner (Sec 33)

Role+WorkflowDependency GraphTopologies

Ring-allreducePS

①T

ask

s

② Tasks

③ Notification

④Metadata

⑤ Gradient batches amp communication plans

⑥ Notification DNN system

runtime

TensorFlow

MXNet

PyTorch

Figure 2 The CaSync architecture design where the DNNsystem runtime is omitted

lsquosendrsquo at the worker because of the data dependency thatthe worker has to compress a gradient before sending itFigure 2 shows an overview of the CaSync design With

the aforementioned abstraction we are able to design a holis-tic gradient synchronization architecture for both workersand aggregators Each worker or aggregator employs a taskmanager to schedule and execute computing and communi-cation tasks Specifically according to the node role the taskmanager consults the specified workflow to select whichseries of computing and communication primitives to exe-cute during gradient synchronization Afterwards accordingto the communication topology (eg a PS bipartite graphor a ring) the task manager informs the communicationprimitives where to send and receive compressed gradients

The above fine-grained abstraction creates opportunitiesto pipeline computing and communication tasks for im-proved performance As shown in Figure 2 at Step① the taskmanager pushes tasks into two task queues 119876119888119900119898119901 for com-puting tasks and 119876119888119900119898119898119906 for communication tasks Tasks in119876119888119900119898119901 and 119876119888119900119898119898119906 are executed in an asynchronous man-ner for efficient use of computing and networking resourcesHowever as tasks are spread in two independent task queuesand are executed asynchronously there is a high risk thatthe data dependencies between tasks are violated Thereforeone challenge here is how to preserve data dependenciesand order constraints when executing tasks from 119876119888119900119898119901 and119876119888119900119898119898119906 asynchronously

To ensure the proper order the task manager maintainsa dependency graph to manage data dependencies betweentasks at runtime For instance for a compressed gradientits lsquorecvrsquo task must first write to a memory buffer and onlythen it can be read by the lsquodecodersquo task Upon the comple-tion of a computing task from 119876119888119900119898119901 (step ②) it notifies thetask manager to clear the following tasksrsquo pending depen-dencies and then promotes the execution of any task if allits pending dependencies are cleared (step ③) In doing sothe asynchronous execution of gradient synchronization isdriven by the dependency graph among tasks Note that thestep ④-⑥ correspond to a coordinated compression-awarebulk synchronization mechanism in the next section

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

Coordinator

Metadata

Per-link task queues

N0 N1N0 N1 aaa bb cc dd

Non-conflicting links

with batched gradients

of balanced sizes

lta N1gt

QCommuworker

ltb N1gt lte N2gt N0 N2N0 N2 eee ff

N1 N0N1 N0 ggg hh ii

N1 N2N1 N2 jjj kk

N2 N0N2 N0

N2 N1N2 N1 qqq rr ss

ltf N2gt

QCommuaggregator

ltc N1gt ltd N1gt

Node0

Node1

Node2

l

n o pm

N0 N1N0 N1 aa bb cc

N1 N2N1 N2 jj kk

N2 N0N2 N0

N0 N1 a b c

N1 N2 j k

N2 N0 nn oo ppm

Metadata

andor

aggregatoraggregatorworker worker

aggregatoraggregatorandorworker worker

andor

Figure 3 The workflow of the compression-aware coordi-nated bulk synchronization

32 Compression-aware Bulk Synchronization

While the above composable pipelined synchronization canalready improve the training performance significantly itdoes not explore the opportunities brought by bulk syn-chronization ETH an important feature that is supported bymost modern DNN systems Instead of computing and com-municating each gradient at a time bulk synchronizationhandles gradients in a batched manner to better take advan-tage of parallelism and reduce the execution overhead [64]Here we extend the conventional bulk synchronization to becompression-aware and additionally introduce batch com-pression to compress gradients in a batched manner Ourmain goal is to reduce the compression and communica-tion overheads Compression-aware bulk synchronizationis particularly important for small gradients as their com-pression and communication overheads are difficult to becompensated by the size reduction brought by compressionThe batch compression in CaSync batches a sequence of

compression-related tasks from119876119888119900119898119901 and schedules them to-gether to GPU for compression This allows a single callbackfunction for a batch of gradients and thus also reduces theCPU-GPU coordination overhead This is feasible as modernDNN systems often employ the operation fusing techniqueto produce multiple gradients at once in GPU memory [6]The bulk communication in CaSync parallelizes the net-

work transmission across training nodes to amortize thecommunication overheads across gradients However decid-ing the appropriate bulk granularity for communication ischallenging As discussed in Section 25 there are pros andcons for both fine-grained and coarse-grained granularityand a proper balance needs to be struck Our high-level de-sign is that we slice the gradient synchronization processinto monotonically increasing time slots and select a groupof network-idle nodes to join each time slot In a slot toavoid bandwidth contention each selected node sends itsgradients to only one other node via its uplink and receives

gradients from its downlink Note that the transmitted gra-dients in a time slot may correspond to different communi-cation steps (see Figure 1) in the gradient synchronizationprocess Together the goal of this design is to enable theadaptive granularity of communication and the optimizednode coordination during gradient synchronization

Specifically we introduce a global coordinator to adapt thecommunication of all gradients indiscriminately (compressedor not) and determine an optimal coordinated communica-tion plan The plan should fulfill two goals 1) maximize theutilization of network bandwidth between pairs of nodesand 2) balance the size of transmitted gradientsThe design of the global coordinator is shown in Fig-

ure 3 Each node (eg 1198731199001198891198900 or 1198730) can serve as a workeror an aggregator or both and it periodically sends the meta-data ⟨gradient_name gradient_size destination_node⟩ ofthe tasks in its communication task queue 119876119888119900119898119898119906 to theglobal coordinator eg lsquogradients 119886 119887 119888 and 119889 to node 1198731rsquoand lsquogradients 119890 and 119891 to node 1198732rsquo (gradient sizes omittedfor clarity) Upon arrival the coordinator places these tasksinto their respective per-link task queues Afterwards thecoordinator looks up these queues and selects a set of non-conflicting links between nodes (eg 3 of 6 links are selected)The coordinator then batches the gradients that need to betransmitted over each selected link with balanced batch sizesamortizing the communication overhead across gradientsThe size of each batch is decided based on a specified timeoutor a size threshold whichever is met firstFinally the coordinator broadcasts the information of

these gradient batches and coordinated communication plansto the relevant nodes (step⑤ in Figure 2) so that the executoron each node can execute these plans in a coordinated man-ner and notify its task manager to clear the dependenciesof the tasks in each batch accordingly (step ⑥ in Figure 2)Altogether our compression-aware coordinated bulk syn-chronization enables both efficient batch compression onGPU and efficient communication of small gradients

33 Selective Compression and Partitioning

Reducing data volume being transmitted does not alwaysoffset the compression-related overhead even with optimizedsynchronization strategies It is more complicatedwhen largegradients require partitioning to leverage parallelism beforecompression Therefore we design a selective compression

and partitioning mechanism with a cost model to analyzethe time cost of synchronizing gradients with and withoutcompression and then make a selective decision to avoidover-compression penalties and further leverage parallelismand load balancing The cost model is simple yet unified andis applicable to different CaSync synchronization strategies

There are a few parameters used in the cost analysis as de-fined in Table 2 Here the compression rate 119903 as well as thecompression cost 119879119890119899119888 (119898) and decompression cost 119879119889119890119888 (119898)

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 2 Notation in selective compression and partitioning

Notation Interpretation

119898 Gradient size in bytes

119870 Number of gradient partitions

119873 Number of workers or aggregators

119903 Compression rate

119879119890119899119888 (119898) Time for compressing an119898-byte gradient

119879119889119890119888 (119898) Time for decompressing an119898-byte gradient

119879119904119890119899119889 (119898) Time for transmitting an119898-byte gradient

Table 3 Synchronization parameters and their values

120572 120573 120574

CaSync-Ring 2(119873 minus 1) 119873 119873

CaSync-PS 2119873 119870 + 1 119873 + 1

are specific to compression algorithms and can be easily pro-filed Moreover 119879119904119890119899119889 (119898) denotes the network transmissiontime for an 119898-byte gradient We omit merge operators asthey are compression-irrelevantWe first analyze the original time to synchronize an119898-

byte gradient with 119870 partitions but without compression

denoted as 119879119900119903119894119892119904119910119899119888 (119898119870) Here we use PS and Ring-allreduce

designed within CaSync as examples denoted as CaSync-PS and CaSync-Ring For simplicity let 119873 be the numberof their respective workers or aggregators We assume thecommon practice used in real world where all nodes are ho-mogeneous [55 56] Also the number of gradient partitions119870 is between 1 and 119873 for both strategies with a discussion

of larger 119870 values later We calculate 119879119900119903119894119892119904119910119899119888 (119898119870) as follows

119879119900119903119894119892119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (

119898

119870) (1)

Here 120572 denotes the total number of serial communicationsteps for synchronizing a gradient and its value dependson the given synchronization strategy As shown in Table 3the 120572 value of CaSync-Ring is 2(119873 minus 1) since it takes 119873 minus 1steps for gradient aggregation and another 119873 minus 1 steps todisseminate the updated gradient (see Figure 1b) and all 119870gradient partitions are synchronized in parallel Similarlythe 120572 value of CaSync-PS is 2119873 where the communicationof gradient partitions is well coordinated so that no networklinks used are conflicting ie all aggregators run in paralleland each takes 119873 steps to receive gradient partitions from 119873

workers and another 119873 steps to return results (see Figure 1a)Next we calculate the time 119879

119888119901119903119904119910119899119888 (119898119870) to synchronize

an119898-byte gradient with 119870 partitions and compression

119879119888119901119903119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (119903 times

119898

119870) + 120573 times119879119890119899119888 (

119898

119870) + 120574 times119879119889119890119888 (119903 times

119898

119870)

(2)Here the 120572 value remains the same but the communicationcost is reduced to119879119904119890119899119889 (119903times

119898119870) because one needs to send only

the compressed gradient partition of the reduced size 119903 times 119898119870

This however comes with an extra compression-relatedcomputational cost We denote the number of encode and

decode operators that do not overlap with gradient trans-mission as 120573 and 120574 whose values are described in Table 3Take CaSync-Ring as an example Its first aggregation phaserequires 119873 minus 1 encode and 119873 minus 1 decode operators and theyare non-overlapping because a node can compress a gradi-ent partition only after it has decompressed and aggregatedthe partition received from its predecessor (ie data depen-dencies) Its second dissemination phase requires only oneencode and 119873 minus 1 decode operators However all decodeoperators except the last one can overlap with gradient trans-mission Therefore for CaSync-Ring 120573 = (119873 minus 1) + 1 = 119873

and also 120574 = (119873 minus 1) + 1 = 119873 We omit the analysis forCaSync-PS due to space limit Note that our cost model canbe relaxed to split a gradient into beyond 119873 partitions toleverage the compression-communication pipeline enabledby CaSync further To do so we simply adapt the calculationof 119879

119888119901119903119904119910119899119888 (119898119870) by grouping 119870 partitions into lceil119870

119873rceil batches

Based on the comparison of 119879119900119903119894119892119904119910119899119888 (119898119870) and 119879

119888119901119903119904119910119899119888 (119898119870)

we decide whether it is beneficial to enable compression fora gradient If so we also compute the optimal number ofpartitions for the best performance This is feasible because1) all parameters in Table 2 can be easily obtained or profiledvia GPU and network measurements where we launch theGPU kernels and peer-to-peer communication tasks withrespect to different gradient sizes to fit the compression andnetwork cost curves respectively 2) the values of 120572 120573 and 120574in Table 3 needed to analyze119879

119888119901119903119904119910119899119888 (119898119870) are determined once

a DNN system with its CaSync synchronization strategy isgiven and 3) the expressions 1 and 2 are convex functionswhich make it straightforward to identify the best setting foreach gradient It is worth mentioning that our cost modelassumes a homogeneous environment where all GPUs andnetwork links have the same capacities and the profilingresults are obtained without considering the variance orinterference of network and GPUs We leave the explorationof the impacts of dynamics on the profiling accuracy of ourcost model as future work

Note that most if not all gradient compression algorithms(including the five state-of-the-art ones we evaluate) arelayer-wised We impose a strict partition-compress-batchorder which is applied to each DNN layer independentlyand thus it does not affect the accuracy and convergence oforiginal compression algorithms For few non-layer-wisedcompression algorithms we simply turn off the selectivecompression and partitioning thus incurring no negativeimpacts on accuracy and convergence of these algorithms

4 Compression Library and Language

As discussed in Section 25 on-GPU compression can greatlyaccelerate compression-related computation alleviate thebandwidth tension between GPU and host and create newopportunities to further optimize the gradient synchroniza-tion process However developing and optimizing gradient

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

1 void encode(floatlowast input uint8lowast output params)

2 void decode(uint8lowast input floatlowast output params)

Figure 4 Unified compression-related API abstraction

Table 4 List of common operators 119866 is a gradient matrix

Operator Interpretation

sort(119866 udf ) Sort elements in 119866 wrt the order given by

the user-defined function udf

filter(119866 udf ) Select elements from 119866 via udf

map(119866 udf ) Return 119867 where 119867 [119894] =udf (119866 [119894])

reduce(119866 udf ) Return a reduced value of 119866 via udf

random(119886 119887) Generate a random intfloat in range of [119886119887)

concat(119886middot middot middot ) Concatenate values together into a vector

extract(119866 prime) Extract metadata from the compressed 119866 prime

compression algorithms on GPU is non-trivial and integrat-ing them into DNN systems usually requires substantial sys-tem expertise and manual efforts Thus we design a toolkitCompLL which allows practitioners to easily develop highly-optimized compression algorithms using GPU capability TheCompLL-generated code is then consumed by CaSync thus en-abling an automated integration of compression algorithmswith CaSync into DNN systems

41 Unified API Abstraction

CompLL provides a unified API abstraction for implement-ing gradient compression algorithms As shown in Figure 4CompLL has two simple APIs encode and decode as wellas a few algorithm-specific parameters (eg compressionrate for sparsification and bitwidth or precision for quan-tization) The encode API takes as input a gradient matrixand generates a compressed gradient as output In particularwe use uint8 as the type of the output matrix because wecan then cast one or multiple uint8 to any type in CUDAOn the other hand the decode API unfolds a compressedgradient into its original form

42 Common Operator Library

By studying the state-of-the-art compression algorithms weobserve that they can generally be specified using a fewcommon operators [4 10 37 62 67 68 74 76] For instancethese algorithms all need to scan the elements of a gradi-ent Alongside scanning they all need to perform operationssuch as filtering or reducing the scanned elements to producecompressed gradients With this observation we generalizea library of common operators that can be used to constructgradient compression algorithms as listed in Table 4 For in-stance the reduce(G maxAbs) operator with a user-definedfunction maxAbs computes the maximum absolute value ofthe gradient matrix 119866 We have carefully optimized thesecommon operators regarding memory access and bank con-flicts in GPU [24] so that any algorithm implementation

1 param EncodeParams

2 uint8 bitwidth assume bitwidth = 2 for clarity

3

4 float min max gap

5 uint2 floatToUint(float elem)

6 float r = (elem minus min) gap

7 return floor(r + randomltfloatgt(0 1))

8

9 void encode(floatlowast gradient uint8lowast compressed

10 EncodeParams params)

11 min = reduce(gradient smaller)

12 max = reduce(gradient greater)

13 gap = (max minus min) ((1 ltlt paramsbitwidth) minus 1)

14 uint8 tail = gradientsize (1 ltlt paramsbitwidth)

15 uint2lowast Q =map(gradient floatToUint)

16 compressed = concat(paramsbitwidth tail

17 min max Q)

18

Figure 5 TernGradrsquos compression logic specified using theAPI common operators and DSL of CompLL

based on these operators can automatically inherent ourGPU optimizations (see details in Section 5)

43 Code Synthesis and Domain-specific Language

We provide two ways for practitioners to implement algo-rithms using CompLL They can invoke our common operatorlibrary directly in their algorithm implementation This how-ever requires them to be familiar with the low-level CUDAprogramming To further relieve the burden we design asimple C-like domain-specific language (DSL) for practition-ers to easily implement their algorithms with the unified APIabstraction filled with common operators without worry-ing about hardware-oriented implementation and optimiza-tion Specifically our DSL supports basic data types suchas uint1 uint2 uint4 uint8 int32 float and array aswell as simple numerical computations and function calls tothe common operators Though not supported our practiceshows that it is often unnecessary to include loops in theDSL code as the iterative processing semantics have alreadybeen covered by the implementation of common operators

To show how DSL works we use it to implement the clas-sic TernGrad compression [74] as an example in Figure 5Line 1-3 specify bitwidth as the algorithm parameter todetermine compression rate Line 5-8 specify a user-definedfunction floatToUint to compress a float number into abitwidth-sized integer The TernGradrsquos logic to implementour encodeAPI begins at line 9 and takes the original gradi-ent as input and outputs the compressed gradient Throughline 11-14 the algorithm metadata which is essential fordecompression is generated At line 15 we pass the user-defined function floatToUint to the common operator mapto generate the compressed gradient matrix Q Finally at

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 5: Gradient Compression Supercharged High-Performance Data

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

In summary the above two challenges motivate us torethink the abstraction for both gradient compression algo-rithms and compression-aware synchronization strategiesas well as to identify the common design patterns to supporteasy development optimization and integration of compres-sion algorithms in DNN systems for real-world use

3 Compression-Aware Synchronization

We propose CaSync a compression-aware gradient synchro-nization architecture that provides a general support for gra-dient compression algorithms and synchronization strategiesIn particular CaSync employs a composable design to enablethis general yet high-performance gradient synchronization

31 Composable Pipelined Synchronization

As motivated in Section 25 a proper granularity of ab-straction for gradient compression algorithms and synchro-nization strategies is the key to achieve a general yet high-performance gradient synchronization To identify the rightgranularity we employ a composable approach which firstdecouples all gradient synchronization primitives in a fine-grained manner and then combines and coordinates themaccording to their data dependencies and order constraintsto build an efficient computation-communication pipeline

We first decouple the communication topology from gra-dient synchronization strategies We represent the topologyas a directed graph where the vertex set contains trainingnodes and the edge set specifies the connections betweenthese nodes In gradient synchronization there are funda-mentally two node roles namely worker and aggregator

(with potentially other roles serving for optimizations only)A worker produces gradients from its local DNN computa-tion and initiates the gradient synchronization process Anaggregator aggregates gradients and then relays the aggre-gate result to workers or other aggregators Take PS andRing-allreduce as two examples of gradient synchronizationstrategies As shown in Figure 1 for PS we build bipartiteconnections between servers (ie aggregators) and work-ers for Ring-allreduce each node serves both roles and theclockwise connections are built between these nodesWe then split the gradient synchronization process into

five general primitives namely encode decode merge sendand recv Specifically lsquoencodersquo and lsquodecodersquo are two com-puting primitives for compressing and decompressing gra-dients respectively lsquomergersquo is another computing primi-tive for aggregating multiple gradients into one lsquosendrsquo andlsquorecvrsquo are two communication primitives for sending andreceiving gradients to and from other nodes respectivelyWith these general primitives we can conveniently specify acompression-aware workflow at each worker and aggregatorwhich defines proper data dependencies or order constraintsbetween these primitives For instance lsquoencodersquo precedes

Global

Coordinator

(Sec 32)

Other networked

peers

Worker or Aggregator at Nodei QCommu

QComp

Pluggable on-GPU

compression Library (Sec 4)Executor

Task manager

Selective Compression

Partitioning Planner (Sec 33)

Role+WorkflowDependency GraphTopologies

Ring-allreducePS

①T

ask

s

② Tasks

③ Notification

④Metadata

⑤ Gradient batches amp communication plans

⑥ Notification DNN system

runtime

TensorFlow

MXNet

PyTorch

Figure 2 The CaSync architecture design where the DNNsystem runtime is omitted

lsquosendrsquo at the worker because of the data dependency thatthe worker has to compress a gradient before sending itFigure 2 shows an overview of the CaSync design With

the aforementioned abstraction we are able to design a holis-tic gradient synchronization architecture for both workersand aggregators Each worker or aggregator employs a taskmanager to schedule and execute computing and communi-cation tasks Specifically according to the node role the taskmanager consults the specified workflow to select whichseries of computing and communication primitives to exe-cute during gradient synchronization Afterwards accordingto the communication topology (eg a PS bipartite graphor a ring) the task manager informs the communicationprimitives where to send and receive compressed gradients

The above fine-grained abstraction creates opportunitiesto pipeline computing and communication tasks for im-proved performance As shown in Figure 2 at Step① the taskmanager pushes tasks into two task queues 119876119888119900119898119901 for com-puting tasks and 119876119888119900119898119898119906 for communication tasks Tasks in119876119888119900119898119901 and 119876119888119900119898119898119906 are executed in an asynchronous man-ner for efficient use of computing and networking resourcesHowever as tasks are spread in two independent task queuesand are executed asynchronously there is a high risk thatthe data dependencies between tasks are violated Thereforeone challenge here is how to preserve data dependenciesand order constraints when executing tasks from 119876119888119900119898119901 and119876119888119900119898119898119906 asynchronously

To ensure the proper order the task manager maintainsa dependency graph to manage data dependencies betweentasks at runtime For instance for a compressed gradientits lsquorecvrsquo task must first write to a memory buffer and onlythen it can be read by the lsquodecodersquo task Upon the comple-tion of a computing task from 119876119888119900119898119901 (step ②) it notifies thetask manager to clear the following tasksrsquo pending depen-dencies and then promotes the execution of any task if allits pending dependencies are cleared (step ③) In doing sothe asynchronous execution of gradient synchronization isdriven by the dependency graph among tasks Note that thestep ④-⑥ correspond to a coordinated compression-awarebulk synchronization mechanism in the next section

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

Coordinator

Metadata

Per-link task queues

N0 N1N0 N1 aaa bb cc dd

Non-conflicting links

with batched gradients

of balanced sizes

lta N1gt

QCommuworker

ltb N1gt lte N2gt N0 N2N0 N2 eee ff

N1 N0N1 N0 ggg hh ii

N1 N2N1 N2 jjj kk

N2 N0N2 N0

N2 N1N2 N1 qqq rr ss

ltf N2gt

QCommuaggregator

ltc N1gt ltd N1gt

Node0

Node1

Node2

l

n o pm

N0 N1N0 N1 aa bb cc

N1 N2N1 N2 jj kk

N2 N0N2 N0

N0 N1 a b c

N1 N2 j k

N2 N0 nn oo ppm

Metadata

andor

aggregatoraggregatorworker worker

aggregatoraggregatorandorworker worker

andor

Figure 3 The workflow of the compression-aware coordi-nated bulk synchronization

32 Compression-aware Bulk Synchronization

While the above composable pipelined synchronization canalready improve the training performance significantly itdoes not explore the opportunities brought by bulk syn-chronization ETH an important feature that is supported bymost modern DNN systems Instead of computing and com-municating each gradient at a time bulk synchronizationhandles gradients in a batched manner to better take advan-tage of parallelism and reduce the execution overhead [64]Here we extend the conventional bulk synchronization to becompression-aware and additionally introduce batch com-pression to compress gradients in a batched manner Ourmain goal is to reduce the compression and communica-tion overheads Compression-aware bulk synchronizationis particularly important for small gradients as their com-pression and communication overheads are difficult to becompensated by the size reduction brought by compressionThe batch compression in CaSync batches a sequence of

compression-related tasks from119876119888119900119898119901 and schedules them to-gether to GPU for compression This allows a single callbackfunction for a batch of gradients and thus also reduces theCPU-GPU coordination overhead This is feasible as modernDNN systems often employ the operation fusing techniqueto produce multiple gradients at once in GPU memory [6]The bulk communication in CaSync parallelizes the net-

work transmission across training nodes to amortize thecommunication overheads across gradients However decid-ing the appropriate bulk granularity for communication ischallenging As discussed in Section 25 there are pros andcons for both fine-grained and coarse-grained granularityand a proper balance needs to be struck Our high-level de-sign is that we slice the gradient synchronization processinto monotonically increasing time slots and select a groupof network-idle nodes to join each time slot In a slot toavoid bandwidth contention each selected node sends itsgradients to only one other node via its uplink and receives

gradients from its downlink Note that the transmitted gra-dients in a time slot may correspond to different communi-cation steps (see Figure 1) in the gradient synchronizationprocess Together the goal of this design is to enable theadaptive granularity of communication and the optimizednode coordination during gradient synchronization

Specifically we introduce a global coordinator to adapt thecommunication of all gradients indiscriminately (compressedor not) and determine an optimal coordinated communica-tion plan The plan should fulfill two goals 1) maximize theutilization of network bandwidth between pairs of nodesand 2) balance the size of transmitted gradientsThe design of the global coordinator is shown in Fig-

ure 3 Each node (eg 1198731199001198891198900 or 1198730) can serve as a workeror an aggregator or both and it periodically sends the meta-data ⟨gradient_name gradient_size destination_node⟩ ofthe tasks in its communication task queue 119876119888119900119898119898119906 to theglobal coordinator eg lsquogradients 119886 119887 119888 and 119889 to node 1198731rsquoand lsquogradients 119890 and 119891 to node 1198732rsquo (gradient sizes omittedfor clarity) Upon arrival the coordinator places these tasksinto their respective per-link task queues Afterwards thecoordinator looks up these queues and selects a set of non-conflicting links between nodes (eg 3 of 6 links are selected)The coordinator then batches the gradients that need to betransmitted over each selected link with balanced batch sizesamortizing the communication overhead across gradientsThe size of each batch is decided based on a specified timeoutor a size threshold whichever is met firstFinally the coordinator broadcasts the information of

these gradient batches and coordinated communication plansto the relevant nodes (step⑤ in Figure 2) so that the executoron each node can execute these plans in a coordinated man-ner and notify its task manager to clear the dependenciesof the tasks in each batch accordingly (step ⑥ in Figure 2)Altogether our compression-aware coordinated bulk syn-chronization enables both efficient batch compression onGPU and efficient communication of small gradients

33 Selective Compression and Partitioning

Reducing data volume being transmitted does not alwaysoffset the compression-related overhead even with optimizedsynchronization strategies It is more complicatedwhen largegradients require partitioning to leverage parallelism beforecompression Therefore we design a selective compression

and partitioning mechanism with a cost model to analyzethe time cost of synchronizing gradients with and withoutcompression and then make a selective decision to avoidover-compression penalties and further leverage parallelismand load balancing The cost model is simple yet unified andis applicable to different CaSync synchronization strategies

There are a few parameters used in the cost analysis as de-fined in Table 2 Here the compression rate 119903 as well as thecompression cost 119879119890119899119888 (119898) and decompression cost 119879119889119890119888 (119898)

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 2 Notation in selective compression and partitioning

Notation Interpretation

119898 Gradient size in bytes

119870 Number of gradient partitions

119873 Number of workers or aggregators

119903 Compression rate

119879119890119899119888 (119898) Time for compressing an119898-byte gradient

119879119889119890119888 (119898) Time for decompressing an119898-byte gradient

119879119904119890119899119889 (119898) Time for transmitting an119898-byte gradient

Table 3 Synchronization parameters and their values

120572 120573 120574

CaSync-Ring 2(119873 minus 1) 119873 119873

CaSync-PS 2119873 119870 + 1 119873 + 1

are specific to compression algorithms and can be easily pro-filed Moreover 119879119904119890119899119889 (119898) denotes the network transmissiontime for an 119898-byte gradient We omit merge operators asthey are compression-irrelevantWe first analyze the original time to synchronize an119898-

byte gradient with 119870 partitions but without compression

denoted as 119879119900119903119894119892119904119910119899119888 (119898119870) Here we use PS and Ring-allreduce

designed within CaSync as examples denoted as CaSync-PS and CaSync-Ring For simplicity let 119873 be the numberof their respective workers or aggregators We assume thecommon practice used in real world where all nodes are ho-mogeneous [55 56] Also the number of gradient partitions119870 is between 1 and 119873 for both strategies with a discussion

of larger 119870 values later We calculate 119879119900119903119894119892119904119910119899119888 (119898119870) as follows

119879119900119903119894119892119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (

119898

119870) (1)

Here 120572 denotes the total number of serial communicationsteps for synchronizing a gradient and its value dependson the given synchronization strategy As shown in Table 3the 120572 value of CaSync-Ring is 2(119873 minus 1) since it takes 119873 minus 1steps for gradient aggregation and another 119873 minus 1 steps todisseminate the updated gradient (see Figure 1b) and all 119870gradient partitions are synchronized in parallel Similarlythe 120572 value of CaSync-PS is 2119873 where the communicationof gradient partitions is well coordinated so that no networklinks used are conflicting ie all aggregators run in paralleland each takes 119873 steps to receive gradient partitions from 119873

workers and another 119873 steps to return results (see Figure 1a)Next we calculate the time 119879

119888119901119903119904119910119899119888 (119898119870) to synchronize

an119898-byte gradient with 119870 partitions and compression

119879119888119901119903119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (119903 times

119898

119870) + 120573 times119879119890119899119888 (

119898

119870) + 120574 times119879119889119890119888 (119903 times

119898

119870)

(2)Here the 120572 value remains the same but the communicationcost is reduced to119879119904119890119899119889 (119903times

119898119870) because one needs to send only

the compressed gradient partition of the reduced size 119903 times 119898119870

This however comes with an extra compression-relatedcomputational cost We denote the number of encode and

decode operators that do not overlap with gradient trans-mission as 120573 and 120574 whose values are described in Table 3Take CaSync-Ring as an example Its first aggregation phaserequires 119873 minus 1 encode and 119873 minus 1 decode operators and theyare non-overlapping because a node can compress a gradi-ent partition only after it has decompressed and aggregatedthe partition received from its predecessor (ie data depen-dencies) Its second dissemination phase requires only oneencode and 119873 minus 1 decode operators However all decodeoperators except the last one can overlap with gradient trans-mission Therefore for CaSync-Ring 120573 = (119873 minus 1) + 1 = 119873

and also 120574 = (119873 minus 1) + 1 = 119873 We omit the analysis forCaSync-PS due to space limit Note that our cost model canbe relaxed to split a gradient into beyond 119873 partitions toleverage the compression-communication pipeline enabledby CaSync further To do so we simply adapt the calculationof 119879

119888119901119903119904119910119899119888 (119898119870) by grouping 119870 partitions into lceil119870

119873rceil batches

Based on the comparison of 119879119900119903119894119892119904119910119899119888 (119898119870) and 119879

119888119901119903119904119910119899119888 (119898119870)

we decide whether it is beneficial to enable compression fora gradient If so we also compute the optimal number ofpartitions for the best performance This is feasible because1) all parameters in Table 2 can be easily obtained or profiledvia GPU and network measurements where we launch theGPU kernels and peer-to-peer communication tasks withrespect to different gradient sizes to fit the compression andnetwork cost curves respectively 2) the values of 120572 120573 and 120574in Table 3 needed to analyze119879

119888119901119903119904119910119899119888 (119898119870) are determined once

a DNN system with its CaSync synchronization strategy isgiven and 3) the expressions 1 and 2 are convex functionswhich make it straightforward to identify the best setting foreach gradient It is worth mentioning that our cost modelassumes a homogeneous environment where all GPUs andnetwork links have the same capacities and the profilingresults are obtained without considering the variance orinterference of network and GPUs We leave the explorationof the impacts of dynamics on the profiling accuracy of ourcost model as future work

Note that most if not all gradient compression algorithms(including the five state-of-the-art ones we evaluate) arelayer-wised We impose a strict partition-compress-batchorder which is applied to each DNN layer independentlyand thus it does not affect the accuracy and convergence oforiginal compression algorithms For few non-layer-wisedcompression algorithms we simply turn off the selectivecompression and partitioning thus incurring no negativeimpacts on accuracy and convergence of these algorithms

4 Compression Library and Language

As discussed in Section 25 on-GPU compression can greatlyaccelerate compression-related computation alleviate thebandwidth tension between GPU and host and create newopportunities to further optimize the gradient synchroniza-tion process However developing and optimizing gradient

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

1 void encode(floatlowast input uint8lowast output params)

2 void decode(uint8lowast input floatlowast output params)

Figure 4 Unified compression-related API abstraction

Table 4 List of common operators 119866 is a gradient matrix

Operator Interpretation

sort(119866 udf ) Sort elements in 119866 wrt the order given by

the user-defined function udf

filter(119866 udf ) Select elements from 119866 via udf

map(119866 udf ) Return 119867 where 119867 [119894] =udf (119866 [119894])

reduce(119866 udf ) Return a reduced value of 119866 via udf

random(119886 119887) Generate a random intfloat in range of [119886119887)

concat(119886middot middot middot ) Concatenate values together into a vector

extract(119866 prime) Extract metadata from the compressed 119866 prime

compression algorithms on GPU is non-trivial and integrat-ing them into DNN systems usually requires substantial sys-tem expertise and manual efforts Thus we design a toolkitCompLL which allows practitioners to easily develop highly-optimized compression algorithms using GPU capability TheCompLL-generated code is then consumed by CaSync thus en-abling an automated integration of compression algorithmswith CaSync into DNN systems

41 Unified API Abstraction

CompLL provides a unified API abstraction for implement-ing gradient compression algorithms As shown in Figure 4CompLL has two simple APIs encode and decode as wellas a few algorithm-specific parameters (eg compressionrate for sparsification and bitwidth or precision for quan-tization) The encode API takes as input a gradient matrixand generates a compressed gradient as output In particularwe use uint8 as the type of the output matrix because wecan then cast one or multiple uint8 to any type in CUDAOn the other hand the decode API unfolds a compressedgradient into its original form

42 Common Operator Library

By studying the state-of-the-art compression algorithms weobserve that they can generally be specified using a fewcommon operators [4 10 37 62 67 68 74 76] For instancethese algorithms all need to scan the elements of a gradi-ent Alongside scanning they all need to perform operationssuch as filtering or reducing the scanned elements to producecompressed gradients With this observation we generalizea library of common operators that can be used to constructgradient compression algorithms as listed in Table 4 For in-stance the reduce(G maxAbs) operator with a user-definedfunction maxAbs computes the maximum absolute value ofthe gradient matrix 119866 We have carefully optimized thesecommon operators regarding memory access and bank con-flicts in GPU [24] so that any algorithm implementation

1 param EncodeParams

2 uint8 bitwidth assume bitwidth = 2 for clarity

3

4 float min max gap

5 uint2 floatToUint(float elem)

6 float r = (elem minus min) gap

7 return floor(r + randomltfloatgt(0 1))

8

9 void encode(floatlowast gradient uint8lowast compressed

10 EncodeParams params)

11 min = reduce(gradient smaller)

12 max = reduce(gradient greater)

13 gap = (max minus min) ((1 ltlt paramsbitwidth) minus 1)

14 uint8 tail = gradientsize (1 ltlt paramsbitwidth)

15 uint2lowast Q =map(gradient floatToUint)

16 compressed = concat(paramsbitwidth tail

17 min max Q)

18

Figure 5 TernGradrsquos compression logic specified using theAPI common operators and DSL of CompLL

based on these operators can automatically inherent ourGPU optimizations (see details in Section 5)

43 Code Synthesis and Domain-specific Language

We provide two ways for practitioners to implement algo-rithms using CompLL They can invoke our common operatorlibrary directly in their algorithm implementation This how-ever requires them to be familiar with the low-level CUDAprogramming To further relieve the burden we design asimple C-like domain-specific language (DSL) for practition-ers to easily implement their algorithms with the unified APIabstraction filled with common operators without worry-ing about hardware-oriented implementation and optimiza-tion Specifically our DSL supports basic data types suchas uint1 uint2 uint4 uint8 int32 float and array aswell as simple numerical computations and function calls tothe common operators Though not supported our practiceshows that it is often unnecessary to include loops in theDSL code as the iterative processing semantics have alreadybeen covered by the implementation of common operators

To show how DSL works we use it to implement the clas-sic TernGrad compression [74] as an example in Figure 5Line 1-3 specify bitwidth as the algorithm parameter todetermine compression rate Line 5-8 specify a user-definedfunction floatToUint to compress a float number into abitwidth-sized integer The TernGradrsquos logic to implementour encodeAPI begins at line 9 and takes the original gradi-ent as input and outputs the compressed gradient Throughline 11-14 the algorithm metadata which is essential fordecompression is generated At line 15 we pass the user-defined function floatToUint to the common operator mapto generate the compressed gradient matrix Q Finally at

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 6: Gradient Compression Supercharged High-Performance Data

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

Coordinator

Metadata

Per-link task queues

N0 N1N0 N1 aaa bb cc dd

Non-conflicting links

with batched gradients

of balanced sizes

lta N1gt

QCommuworker

ltb N1gt lte N2gt N0 N2N0 N2 eee ff

N1 N0N1 N0 ggg hh ii

N1 N2N1 N2 jjj kk

N2 N0N2 N0

N2 N1N2 N1 qqq rr ss

ltf N2gt

QCommuaggregator

ltc N1gt ltd N1gt

Node0

Node1

Node2

l

n o pm

N0 N1N0 N1 aa bb cc

N1 N2N1 N2 jj kk

N2 N0N2 N0

N0 N1 a b c

N1 N2 j k

N2 N0 nn oo ppm

Metadata

andor

aggregatoraggregatorworker worker

aggregatoraggregatorandorworker worker

andor

Figure 3 The workflow of the compression-aware coordi-nated bulk synchronization

32 Compression-aware Bulk Synchronization

While the above composable pipelined synchronization canalready improve the training performance significantly itdoes not explore the opportunities brought by bulk syn-chronization ETH an important feature that is supported bymost modern DNN systems Instead of computing and com-municating each gradient at a time bulk synchronizationhandles gradients in a batched manner to better take advan-tage of parallelism and reduce the execution overhead [64]Here we extend the conventional bulk synchronization to becompression-aware and additionally introduce batch com-pression to compress gradients in a batched manner Ourmain goal is to reduce the compression and communica-tion overheads Compression-aware bulk synchronizationis particularly important for small gradients as their com-pression and communication overheads are difficult to becompensated by the size reduction brought by compressionThe batch compression in CaSync batches a sequence of

compression-related tasks from119876119888119900119898119901 and schedules them to-gether to GPU for compression This allows a single callbackfunction for a batch of gradients and thus also reduces theCPU-GPU coordination overhead This is feasible as modernDNN systems often employ the operation fusing techniqueto produce multiple gradients at once in GPU memory [6]The bulk communication in CaSync parallelizes the net-

work transmission across training nodes to amortize thecommunication overheads across gradients However decid-ing the appropriate bulk granularity for communication ischallenging As discussed in Section 25 there are pros andcons for both fine-grained and coarse-grained granularityand a proper balance needs to be struck Our high-level de-sign is that we slice the gradient synchronization processinto monotonically increasing time slots and select a groupof network-idle nodes to join each time slot In a slot toavoid bandwidth contention each selected node sends itsgradients to only one other node via its uplink and receives

gradients from its downlink Note that the transmitted gra-dients in a time slot may correspond to different communi-cation steps (see Figure 1) in the gradient synchronizationprocess Together the goal of this design is to enable theadaptive granularity of communication and the optimizednode coordination during gradient synchronization

Specifically we introduce a global coordinator to adapt thecommunication of all gradients indiscriminately (compressedor not) and determine an optimal coordinated communica-tion plan The plan should fulfill two goals 1) maximize theutilization of network bandwidth between pairs of nodesand 2) balance the size of transmitted gradientsThe design of the global coordinator is shown in Fig-

ure 3 Each node (eg 1198731199001198891198900 or 1198730) can serve as a workeror an aggregator or both and it periodically sends the meta-data ⟨gradient_name gradient_size destination_node⟩ ofthe tasks in its communication task queue 119876119888119900119898119898119906 to theglobal coordinator eg lsquogradients 119886 119887 119888 and 119889 to node 1198731rsquoand lsquogradients 119890 and 119891 to node 1198732rsquo (gradient sizes omittedfor clarity) Upon arrival the coordinator places these tasksinto their respective per-link task queues Afterwards thecoordinator looks up these queues and selects a set of non-conflicting links between nodes (eg 3 of 6 links are selected)The coordinator then batches the gradients that need to betransmitted over each selected link with balanced batch sizesamortizing the communication overhead across gradientsThe size of each batch is decided based on a specified timeoutor a size threshold whichever is met firstFinally the coordinator broadcasts the information of

these gradient batches and coordinated communication plansto the relevant nodes (step⑤ in Figure 2) so that the executoron each node can execute these plans in a coordinated man-ner and notify its task manager to clear the dependenciesof the tasks in each batch accordingly (step ⑥ in Figure 2)Altogether our compression-aware coordinated bulk syn-chronization enables both efficient batch compression onGPU and efficient communication of small gradients

33 Selective Compression and Partitioning

Reducing data volume being transmitted does not alwaysoffset the compression-related overhead even with optimizedsynchronization strategies It is more complicatedwhen largegradients require partitioning to leverage parallelism beforecompression Therefore we design a selective compression

and partitioning mechanism with a cost model to analyzethe time cost of synchronizing gradients with and withoutcompression and then make a selective decision to avoidover-compression penalties and further leverage parallelismand load balancing The cost model is simple yet unified andis applicable to different CaSync synchronization strategies

There are a few parameters used in the cost analysis as de-fined in Table 2 Here the compression rate 119903 as well as thecompression cost 119879119890119899119888 (119898) and decompression cost 119879119889119890119888 (119898)

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 2 Notation in selective compression and partitioning

Notation Interpretation

119898 Gradient size in bytes

119870 Number of gradient partitions

119873 Number of workers or aggregators

119903 Compression rate

119879119890119899119888 (119898) Time for compressing an119898-byte gradient

119879119889119890119888 (119898) Time for decompressing an119898-byte gradient

119879119904119890119899119889 (119898) Time for transmitting an119898-byte gradient

Table 3 Synchronization parameters and their values

120572 120573 120574

CaSync-Ring 2(119873 minus 1) 119873 119873

CaSync-PS 2119873 119870 + 1 119873 + 1

are specific to compression algorithms and can be easily pro-filed Moreover 119879119904119890119899119889 (119898) denotes the network transmissiontime for an 119898-byte gradient We omit merge operators asthey are compression-irrelevantWe first analyze the original time to synchronize an119898-

byte gradient with 119870 partitions but without compression

denoted as 119879119900119903119894119892119904119910119899119888 (119898119870) Here we use PS and Ring-allreduce

designed within CaSync as examples denoted as CaSync-PS and CaSync-Ring For simplicity let 119873 be the numberof their respective workers or aggregators We assume thecommon practice used in real world where all nodes are ho-mogeneous [55 56] Also the number of gradient partitions119870 is between 1 and 119873 for both strategies with a discussion

of larger 119870 values later We calculate 119879119900119903119894119892119904119910119899119888 (119898119870) as follows

119879119900119903119894119892119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (

119898

119870) (1)

Here 120572 denotes the total number of serial communicationsteps for synchronizing a gradient and its value dependson the given synchronization strategy As shown in Table 3the 120572 value of CaSync-Ring is 2(119873 minus 1) since it takes 119873 minus 1steps for gradient aggregation and another 119873 minus 1 steps todisseminate the updated gradient (see Figure 1b) and all 119870gradient partitions are synchronized in parallel Similarlythe 120572 value of CaSync-PS is 2119873 where the communicationof gradient partitions is well coordinated so that no networklinks used are conflicting ie all aggregators run in paralleland each takes 119873 steps to receive gradient partitions from 119873

workers and another 119873 steps to return results (see Figure 1a)Next we calculate the time 119879

119888119901119903119904119910119899119888 (119898119870) to synchronize

an119898-byte gradient with 119870 partitions and compression

119879119888119901119903119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (119903 times

119898

119870) + 120573 times119879119890119899119888 (

119898

119870) + 120574 times119879119889119890119888 (119903 times

119898

119870)

(2)Here the 120572 value remains the same but the communicationcost is reduced to119879119904119890119899119889 (119903times

119898119870) because one needs to send only

the compressed gradient partition of the reduced size 119903 times 119898119870

This however comes with an extra compression-relatedcomputational cost We denote the number of encode and

decode operators that do not overlap with gradient trans-mission as 120573 and 120574 whose values are described in Table 3Take CaSync-Ring as an example Its first aggregation phaserequires 119873 minus 1 encode and 119873 minus 1 decode operators and theyare non-overlapping because a node can compress a gradi-ent partition only after it has decompressed and aggregatedthe partition received from its predecessor (ie data depen-dencies) Its second dissemination phase requires only oneencode and 119873 minus 1 decode operators However all decodeoperators except the last one can overlap with gradient trans-mission Therefore for CaSync-Ring 120573 = (119873 minus 1) + 1 = 119873

and also 120574 = (119873 minus 1) + 1 = 119873 We omit the analysis forCaSync-PS due to space limit Note that our cost model canbe relaxed to split a gradient into beyond 119873 partitions toleverage the compression-communication pipeline enabledby CaSync further To do so we simply adapt the calculationof 119879

119888119901119903119904119910119899119888 (119898119870) by grouping 119870 partitions into lceil119870

119873rceil batches

Based on the comparison of 119879119900119903119894119892119904119910119899119888 (119898119870) and 119879

119888119901119903119904119910119899119888 (119898119870)

we decide whether it is beneficial to enable compression fora gradient If so we also compute the optimal number ofpartitions for the best performance This is feasible because1) all parameters in Table 2 can be easily obtained or profiledvia GPU and network measurements where we launch theGPU kernels and peer-to-peer communication tasks withrespect to different gradient sizes to fit the compression andnetwork cost curves respectively 2) the values of 120572 120573 and 120574in Table 3 needed to analyze119879

119888119901119903119904119910119899119888 (119898119870) are determined once

a DNN system with its CaSync synchronization strategy isgiven and 3) the expressions 1 and 2 are convex functionswhich make it straightforward to identify the best setting foreach gradient It is worth mentioning that our cost modelassumes a homogeneous environment where all GPUs andnetwork links have the same capacities and the profilingresults are obtained without considering the variance orinterference of network and GPUs We leave the explorationof the impacts of dynamics on the profiling accuracy of ourcost model as future work

Note that most if not all gradient compression algorithms(including the five state-of-the-art ones we evaluate) arelayer-wised We impose a strict partition-compress-batchorder which is applied to each DNN layer independentlyand thus it does not affect the accuracy and convergence oforiginal compression algorithms For few non-layer-wisedcompression algorithms we simply turn off the selectivecompression and partitioning thus incurring no negativeimpacts on accuracy and convergence of these algorithms

4 Compression Library and Language

As discussed in Section 25 on-GPU compression can greatlyaccelerate compression-related computation alleviate thebandwidth tension between GPU and host and create newopportunities to further optimize the gradient synchroniza-tion process However developing and optimizing gradient

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

1 void encode(floatlowast input uint8lowast output params)

2 void decode(uint8lowast input floatlowast output params)

Figure 4 Unified compression-related API abstraction

Table 4 List of common operators 119866 is a gradient matrix

Operator Interpretation

sort(119866 udf ) Sort elements in 119866 wrt the order given by

the user-defined function udf

filter(119866 udf ) Select elements from 119866 via udf

map(119866 udf ) Return 119867 where 119867 [119894] =udf (119866 [119894])

reduce(119866 udf ) Return a reduced value of 119866 via udf

random(119886 119887) Generate a random intfloat in range of [119886119887)

concat(119886middot middot middot ) Concatenate values together into a vector

extract(119866 prime) Extract metadata from the compressed 119866 prime

compression algorithms on GPU is non-trivial and integrat-ing them into DNN systems usually requires substantial sys-tem expertise and manual efforts Thus we design a toolkitCompLL which allows practitioners to easily develop highly-optimized compression algorithms using GPU capability TheCompLL-generated code is then consumed by CaSync thus en-abling an automated integration of compression algorithmswith CaSync into DNN systems

41 Unified API Abstraction

CompLL provides a unified API abstraction for implement-ing gradient compression algorithms As shown in Figure 4CompLL has two simple APIs encode and decode as wellas a few algorithm-specific parameters (eg compressionrate for sparsification and bitwidth or precision for quan-tization) The encode API takes as input a gradient matrixand generates a compressed gradient as output In particularwe use uint8 as the type of the output matrix because wecan then cast one or multiple uint8 to any type in CUDAOn the other hand the decode API unfolds a compressedgradient into its original form

42 Common Operator Library

By studying the state-of-the-art compression algorithms weobserve that they can generally be specified using a fewcommon operators [4 10 37 62 67 68 74 76] For instancethese algorithms all need to scan the elements of a gradi-ent Alongside scanning they all need to perform operationssuch as filtering or reducing the scanned elements to producecompressed gradients With this observation we generalizea library of common operators that can be used to constructgradient compression algorithms as listed in Table 4 For in-stance the reduce(G maxAbs) operator with a user-definedfunction maxAbs computes the maximum absolute value ofthe gradient matrix 119866 We have carefully optimized thesecommon operators regarding memory access and bank con-flicts in GPU [24] so that any algorithm implementation

1 param EncodeParams

2 uint8 bitwidth assume bitwidth = 2 for clarity

3

4 float min max gap

5 uint2 floatToUint(float elem)

6 float r = (elem minus min) gap

7 return floor(r + randomltfloatgt(0 1))

8

9 void encode(floatlowast gradient uint8lowast compressed

10 EncodeParams params)

11 min = reduce(gradient smaller)

12 max = reduce(gradient greater)

13 gap = (max minus min) ((1 ltlt paramsbitwidth) minus 1)

14 uint8 tail = gradientsize (1 ltlt paramsbitwidth)

15 uint2lowast Q =map(gradient floatToUint)

16 compressed = concat(paramsbitwidth tail

17 min max Q)

18

Figure 5 TernGradrsquos compression logic specified using theAPI common operators and DSL of CompLL

based on these operators can automatically inherent ourGPU optimizations (see details in Section 5)

43 Code Synthesis and Domain-specific Language

We provide two ways for practitioners to implement algo-rithms using CompLL They can invoke our common operatorlibrary directly in their algorithm implementation This how-ever requires them to be familiar with the low-level CUDAprogramming To further relieve the burden we design asimple C-like domain-specific language (DSL) for practition-ers to easily implement their algorithms with the unified APIabstraction filled with common operators without worry-ing about hardware-oriented implementation and optimiza-tion Specifically our DSL supports basic data types suchas uint1 uint2 uint4 uint8 int32 float and array aswell as simple numerical computations and function calls tothe common operators Though not supported our practiceshows that it is often unnecessary to include loops in theDSL code as the iterative processing semantics have alreadybeen covered by the implementation of common operators

To show how DSL works we use it to implement the clas-sic TernGrad compression [74] as an example in Figure 5Line 1-3 specify bitwidth as the algorithm parameter todetermine compression rate Line 5-8 specify a user-definedfunction floatToUint to compress a float number into abitwidth-sized integer The TernGradrsquos logic to implementour encodeAPI begins at line 9 and takes the original gradi-ent as input and outputs the compressed gradient Throughline 11-14 the algorithm metadata which is essential fordecompression is generated At line 15 we pass the user-defined function floatToUint to the common operator mapto generate the compressed gradient matrix Q Finally at

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 7: Gradient Compression Supercharged High-Performance Data

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 2 Notation in selective compression and partitioning

Notation Interpretation

119898 Gradient size in bytes

119870 Number of gradient partitions

119873 Number of workers or aggregators

119903 Compression rate

119879119890119899119888 (119898) Time for compressing an119898-byte gradient

119879119889119890119888 (119898) Time for decompressing an119898-byte gradient

119879119904119890119899119889 (119898) Time for transmitting an119898-byte gradient

Table 3 Synchronization parameters and their values

120572 120573 120574

CaSync-Ring 2(119873 minus 1) 119873 119873

CaSync-PS 2119873 119870 + 1 119873 + 1

are specific to compression algorithms and can be easily pro-filed Moreover 119879119904119890119899119889 (119898) denotes the network transmissiontime for an 119898-byte gradient We omit merge operators asthey are compression-irrelevantWe first analyze the original time to synchronize an119898-

byte gradient with 119870 partitions but without compression

denoted as 119879119900119903119894119892119904119910119899119888 (119898119870) Here we use PS and Ring-allreduce

designed within CaSync as examples denoted as CaSync-PS and CaSync-Ring For simplicity let 119873 be the numberof their respective workers or aggregators We assume thecommon practice used in real world where all nodes are ho-mogeneous [55 56] Also the number of gradient partitions119870 is between 1 and 119873 for both strategies with a discussion

of larger 119870 values later We calculate 119879119900119903119894119892119904119910119899119888 (119898119870) as follows

119879119900119903119894119892119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (

119898

119870) (1)

Here 120572 denotes the total number of serial communicationsteps for synchronizing a gradient and its value dependson the given synchronization strategy As shown in Table 3the 120572 value of CaSync-Ring is 2(119873 minus 1) since it takes 119873 minus 1steps for gradient aggregation and another 119873 minus 1 steps todisseminate the updated gradient (see Figure 1b) and all 119870gradient partitions are synchronized in parallel Similarlythe 120572 value of CaSync-PS is 2119873 where the communicationof gradient partitions is well coordinated so that no networklinks used are conflicting ie all aggregators run in paralleland each takes 119873 steps to receive gradient partitions from 119873

workers and another 119873 steps to return results (see Figure 1a)Next we calculate the time 119879

119888119901119903119904119910119899119888 (119898119870) to synchronize

an119898-byte gradient with 119870 partitions and compression

119879119888119901119903119904119910119899119888 (119898119870) = 120572 times119879119904119890119899119889 (119903 times

119898

119870) + 120573 times119879119890119899119888 (

119898

119870) + 120574 times119879119889119890119888 (119903 times

119898

119870)

(2)Here the 120572 value remains the same but the communicationcost is reduced to119879119904119890119899119889 (119903times

119898119870) because one needs to send only

the compressed gradient partition of the reduced size 119903 times 119898119870

This however comes with an extra compression-relatedcomputational cost We denote the number of encode and

decode operators that do not overlap with gradient trans-mission as 120573 and 120574 whose values are described in Table 3Take CaSync-Ring as an example Its first aggregation phaserequires 119873 minus 1 encode and 119873 minus 1 decode operators and theyare non-overlapping because a node can compress a gradi-ent partition only after it has decompressed and aggregatedthe partition received from its predecessor (ie data depen-dencies) Its second dissemination phase requires only oneencode and 119873 minus 1 decode operators However all decodeoperators except the last one can overlap with gradient trans-mission Therefore for CaSync-Ring 120573 = (119873 minus 1) + 1 = 119873

and also 120574 = (119873 minus 1) + 1 = 119873 We omit the analysis forCaSync-PS due to space limit Note that our cost model canbe relaxed to split a gradient into beyond 119873 partitions toleverage the compression-communication pipeline enabledby CaSync further To do so we simply adapt the calculationof 119879

119888119901119903119904119910119899119888 (119898119870) by grouping 119870 partitions into lceil119870

119873rceil batches

Based on the comparison of 119879119900119903119894119892119904119910119899119888 (119898119870) and 119879

119888119901119903119904119910119899119888 (119898119870)

we decide whether it is beneficial to enable compression fora gradient If so we also compute the optimal number ofpartitions for the best performance This is feasible because1) all parameters in Table 2 can be easily obtained or profiledvia GPU and network measurements where we launch theGPU kernels and peer-to-peer communication tasks withrespect to different gradient sizes to fit the compression andnetwork cost curves respectively 2) the values of 120572 120573 and 120574in Table 3 needed to analyze119879

119888119901119903119904119910119899119888 (119898119870) are determined once

a DNN system with its CaSync synchronization strategy isgiven and 3) the expressions 1 and 2 are convex functionswhich make it straightforward to identify the best setting foreach gradient It is worth mentioning that our cost modelassumes a homogeneous environment where all GPUs andnetwork links have the same capacities and the profilingresults are obtained without considering the variance orinterference of network and GPUs We leave the explorationof the impacts of dynamics on the profiling accuracy of ourcost model as future work

Note that most if not all gradient compression algorithms(including the five state-of-the-art ones we evaluate) arelayer-wised We impose a strict partition-compress-batchorder which is applied to each DNN layer independentlyand thus it does not affect the accuracy and convergence oforiginal compression algorithms For few non-layer-wisedcompression algorithms we simply turn off the selectivecompression and partitioning thus incurring no negativeimpacts on accuracy and convergence of these algorithms

4 Compression Library and Language

As discussed in Section 25 on-GPU compression can greatlyaccelerate compression-related computation alleviate thebandwidth tension between GPU and host and create newopportunities to further optimize the gradient synchroniza-tion process However developing and optimizing gradient

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

1 void encode(floatlowast input uint8lowast output params)

2 void decode(uint8lowast input floatlowast output params)

Figure 4 Unified compression-related API abstraction

Table 4 List of common operators 119866 is a gradient matrix

Operator Interpretation

sort(119866 udf ) Sort elements in 119866 wrt the order given by

the user-defined function udf

filter(119866 udf ) Select elements from 119866 via udf

map(119866 udf ) Return 119867 where 119867 [119894] =udf (119866 [119894])

reduce(119866 udf ) Return a reduced value of 119866 via udf

random(119886 119887) Generate a random intfloat in range of [119886119887)

concat(119886middot middot middot ) Concatenate values together into a vector

extract(119866 prime) Extract metadata from the compressed 119866 prime

compression algorithms on GPU is non-trivial and integrat-ing them into DNN systems usually requires substantial sys-tem expertise and manual efforts Thus we design a toolkitCompLL which allows practitioners to easily develop highly-optimized compression algorithms using GPU capability TheCompLL-generated code is then consumed by CaSync thus en-abling an automated integration of compression algorithmswith CaSync into DNN systems

41 Unified API Abstraction

CompLL provides a unified API abstraction for implement-ing gradient compression algorithms As shown in Figure 4CompLL has two simple APIs encode and decode as wellas a few algorithm-specific parameters (eg compressionrate for sparsification and bitwidth or precision for quan-tization) The encode API takes as input a gradient matrixand generates a compressed gradient as output In particularwe use uint8 as the type of the output matrix because wecan then cast one or multiple uint8 to any type in CUDAOn the other hand the decode API unfolds a compressedgradient into its original form

42 Common Operator Library

By studying the state-of-the-art compression algorithms weobserve that they can generally be specified using a fewcommon operators [4 10 37 62 67 68 74 76] For instancethese algorithms all need to scan the elements of a gradi-ent Alongside scanning they all need to perform operationssuch as filtering or reducing the scanned elements to producecompressed gradients With this observation we generalizea library of common operators that can be used to constructgradient compression algorithms as listed in Table 4 For in-stance the reduce(G maxAbs) operator with a user-definedfunction maxAbs computes the maximum absolute value ofthe gradient matrix 119866 We have carefully optimized thesecommon operators regarding memory access and bank con-flicts in GPU [24] so that any algorithm implementation

1 param EncodeParams

2 uint8 bitwidth assume bitwidth = 2 for clarity

3

4 float min max gap

5 uint2 floatToUint(float elem)

6 float r = (elem minus min) gap

7 return floor(r + randomltfloatgt(0 1))

8

9 void encode(floatlowast gradient uint8lowast compressed

10 EncodeParams params)

11 min = reduce(gradient smaller)

12 max = reduce(gradient greater)

13 gap = (max minus min) ((1 ltlt paramsbitwidth) minus 1)

14 uint8 tail = gradientsize (1 ltlt paramsbitwidth)

15 uint2lowast Q =map(gradient floatToUint)

16 compressed = concat(paramsbitwidth tail

17 min max Q)

18

Figure 5 TernGradrsquos compression logic specified using theAPI common operators and DSL of CompLL

based on these operators can automatically inherent ourGPU optimizations (see details in Section 5)

43 Code Synthesis and Domain-specific Language

We provide two ways for practitioners to implement algo-rithms using CompLL They can invoke our common operatorlibrary directly in their algorithm implementation This how-ever requires them to be familiar with the low-level CUDAprogramming To further relieve the burden we design asimple C-like domain-specific language (DSL) for practition-ers to easily implement their algorithms with the unified APIabstraction filled with common operators without worry-ing about hardware-oriented implementation and optimiza-tion Specifically our DSL supports basic data types suchas uint1 uint2 uint4 uint8 int32 float and array aswell as simple numerical computations and function calls tothe common operators Though not supported our practiceshows that it is often unnecessary to include loops in theDSL code as the iterative processing semantics have alreadybeen covered by the implementation of common operators

To show how DSL works we use it to implement the clas-sic TernGrad compression [74] as an example in Figure 5Line 1-3 specify bitwidth as the algorithm parameter todetermine compression rate Line 5-8 specify a user-definedfunction floatToUint to compress a float number into abitwidth-sized integer The TernGradrsquos logic to implementour encodeAPI begins at line 9 and takes the original gradi-ent as input and outputs the compressed gradient Throughline 11-14 the algorithm metadata which is essential fordecompression is generated At line 15 we pass the user-defined function floatToUint to the common operator mapto generate the compressed gradient matrix Q Finally at

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 8: Gradient Compression Supercharged High-Performance Data

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

1 void encode(floatlowast input uint8lowast output params)

2 void decode(uint8lowast input floatlowast output params)

Figure 4 Unified compression-related API abstraction

Table 4 List of common operators 119866 is a gradient matrix

Operator Interpretation

sort(119866 udf ) Sort elements in 119866 wrt the order given by

the user-defined function udf

filter(119866 udf ) Select elements from 119866 via udf

map(119866 udf ) Return 119867 where 119867 [119894] =udf (119866 [119894])

reduce(119866 udf ) Return a reduced value of 119866 via udf

random(119886 119887) Generate a random intfloat in range of [119886119887)

concat(119886middot middot middot ) Concatenate values together into a vector

extract(119866 prime) Extract metadata from the compressed 119866 prime

compression algorithms on GPU is non-trivial and integrat-ing them into DNN systems usually requires substantial sys-tem expertise and manual efforts Thus we design a toolkitCompLL which allows practitioners to easily develop highly-optimized compression algorithms using GPU capability TheCompLL-generated code is then consumed by CaSync thus en-abling an automated integration of compression algorithmswith CaSync into DNN systems

41 Unified API Abstraction

CompLL provides a unified API abstraction for implement-ing gradient compression algorithms As shown in Figure 4CompLL has two simple APIs encode and decode as wellas a few algorithm-specific parameters (eg compressionrate for sparsification and bitwidth or precision for quan-tization) The encode API takes as input a gradient matrixand generates a compressed gradient as output In particularwe use uint8 as the type of the output matrix because wecan then cast one or multiple uint8 to any type in CUDAOn the other hand the decode API unfolds a compressedgradient into its original form

42 Common Operator Library

By studying the state-of-the-art compression algorithms weobserve that they can generally be specified using a fewcommon operators [4 10 37 62 67 68 74 76] For instancethese algorithms all need to scan the elements of a gradi-ent Alongside scanning they all need to perform operationssuch as filtering or reducing the scanned elements to producecompressed gradients With this observation we generalizea library of common operators that can be used to constructgradient compression algorithms as listed in Table 4 For in-stance the reduce(G maxAbs) operator with a user-definedfunction maxAbs computes the maximum absolute value ofthe gradient matrix 119866 We have carefully optimized thesecommon operators regarding memory access and bank con-flicts in GPU [24] so that any algorithm implementation

1 param EncodeParams

2 uint8 bitwidth assume bitwidth = 2 for clarity

3

4 float min max gap

5 uint2 floatToUint(float elem)

6 float r = (elem minus min) gap

7 return floor(r + randomltfloatgt(0 1))

8

9 void encode(floatlowast gradient uint8lowast compressed

10 EncodeParams params)

11 min = reduce(gradient smaller)

12 max = reduce(gradient greater)

13 gap = (max minus min) ((1 ltlt paramsbitwidth) minus 1)

14 uint8 tail = gradientsize (1 ltlt paramsbitwidth)

15 uint2lowast Q =map(gradient floatToUint)

16 compressed = concat(paramsbitwidth tail

17 min max Q)

18

Figure 5 TernGradrsquos compression logic specified using theAPI common operators and DSL of CompLL

based on these operators can automatically inherent ourGPU optimizations (see details in Section 5)

43 Code Synthesis and Domain-specific Language

We provide two ways for practitioners to implement algo-rithms using CompLL They can invoke our common operatorlibrary directly in their algorithm implementation This how-ever requires them to be familiar with the low-level CUDAprogramming To further relieve the burden we design asimple C-like domain-specific language (DSL) for practition-ers to easily implement their algorithms with the unified APIabstraction filled with common operators without worry-ing about hardware-oriented implementation and optimiza-tion Specifically our DSL supports basic data types suchas uint1 uint2 uint4 uint8 int32 float and array aswell as simple numerical computations and function calls tothe common operators Though not supported our practiceshows that it is often unnecessary to include loops in theDSL code as the iterative processing semantics have alreadybeen covered by the implementation of common operators

To show how DSL works we use it to implement the clas-sic TernGrad compression [74] as an example in Figure 5Line 1-3 specify bitwidth as the algorithm parameter todetermine compression rate Line 5-8 specify a user-definedfunction floatToUint to compress a float number into abitwidth-sized integer The TernGradrsquos logic to implementour encodeAPI begins at line 9 and takes the original gradi-ent as input and outputs the compressed gradient Throughline 11-14 the algorithm metadata which is essential fordecompression is generated At line 15 we pass the user-defined function floatToUint to the common operator mapto generate the compressed gradient matrix Q Finally at

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 9: Gradient Compression Supercharged High-Performance Data

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

Table 5 Comparison of implementation and integrationcosts (measured in lines of code) between open-source (OSS)and CompLL-based compression algorithms

Algo-

rithm

OSS CompLL

logicinteg-

rationlogic udf

common

operators

integ-

ration

onebit 80 445 21 9 4 0

TBQ 100 384 13 18 3 0

TernGrad 170 513 23 7 5 0

DGC 1298 1869 29 15 6 0

GradDrop NA NA 29 21 6 0

line 16 we use the common operator concat to combine allmetadata and Q into the output compressed gradient Weomit the implementation of the TernGradrsquos decompressioncode in the interest of spaceNext CompLLrsquos code generator parses the gradient com-

pression algorithm specified in our DSL traverses its abstractsyntax tree and automatically generates the CUDA imple-mentation When encountering a function call to commonoperators CompLL directly substitutes it with our highly-optimized CUDA implementation and then converts thespecified parameters into their desired formats For otheroperations such as numerical computations CompLL declaresspecified variables and copies the necessary numerical com-putation code accordingly as our DSL supports a subset ofCrsquos syntax For a variable of type (such as uint1) which isnot supported in CUDA CompLL uses a byte to store it anduses bit operations to extract the actual value If it is an arrayof variables of unsupported type CompLL uses consecutivebits of one or more bytes to represent this array compactlywith the minimal zero padding to ensure the total numberof bits is a multiple of 8

44 Case Studies and Discussions

To demonstrate the easy algorithm development enabled byCompLL we use it to implement five state-of-the-art compres-sion algorithms onebit [62] TBQ [67] and TernGrad [74]are quantization algorithms DGC [37] and GradDrop [4] aresparsification ones Onebit TBQ TernGrad and DGC haveopen-source (OSS) implementationsAuto-generated code Table 5 summarizes the comparisonbetween the open-source and CompLL-based implementa-tions of these algorithms The open-source implementationsneed a lot more code to implement these algorithms andspend substantial effort to integrate them into DNN systemsIn contrast with CompLL we use only 3 to 6 common opera-tors to implement these algorithms with fewer than 21 linesof code for user-defined functions and fewer than 29 linesof code for algorithm logic The algorithm is then translatedinto GPU code via our code generator and integrated intoDNN systems by CompLL without manual efforts

MXNet (MX) TensorFlow (TF)

MX adaptor TF adaptor

User script

CASync

(PS Ring-allreduce)

CompLL

(Language+

CodeGen)

Specification

CompLL

(Library)

HiPress Runtime

PT adaptor

PyTorch (PT)

User script User script

Figure 6 The overview of HiPress The shadow boxes arethe new components introduced by HiPress

Compression performance We compare the encode anddecode operations between CompLLrsquos auto-generated imple-mentations and the three open-source (OSS) baselines Com-pLL constantly achieves much faster speed than the base-lines For instance the encode of CompLL-TBQ runs over12times faster than the OSS-TBQrsquos GPU implementation whichtakes 382ms to compress a 256MB gradient Even though theOSS-DGCrsquos GPU implementation is manually optimized ourauto-generated CompLL-DGC still outperforms the encode ofOSS-DGC by up to 51times CompLLrsquos auto-generated code out-performs the CPU implementation even further For instanceCompLL-onebit runs up to 356times faster than the encode ofOSS-onebitrsquos CPU implementation We omit the results ofdecode operation where CompLL achieves a similar speedupExpressiveness and extensibility Beside the classic algo-rithms listed in Table 5 we exercise more gradient compres-sion algorithms and find that they all can be easily specifiedand auto-generated by CompLL For instance AdaComp [12]needs map reduce filter concat and extract commonoperators while 3LC [36] needs reduce map concat fil-ter and extract As an example it requires only 69 lines ofCompLLrsquos DSL code to express the encode function of 3LCwhose zero-run encoding logic is specified by partitioningthe target gradient and applying map and filter over eachpartition For future algorithms possibly requiring new op-erators CompLL is open and allows registering them into thecommon operator library for enjoying our automated codegeneration and integration into DNN systems

5 HiPress Framework

We incorporate the aforementioned coherent design into anopen-source framework HiPress [2] for compression-awaredata parallel DNN training HiPress has 75119896 and 33119896 linesof code in CC++ and Python respectively and is composedof the following main components as shown in Figure 6CaSync We implement CaSync using Horovod [64] a popu-lar gradient synchronization library used by almost all main-stream DNN systems CaSync currently supports both PSand Ring-allreduce We leverage the MPI_all_to_all [46]primitive to execute the bulk communication step introducedin Section 32 We offer another alternative primitive called

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 10: Gradient Compression Supercharged High-Performance Data

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

nccl_bulk_SendRecv by composing the NCCL send andrecv point-to-point communication operatorsWe deploy the global coordinator on one of the training

nodes Though being a centralized component its load isalways light and the coordination overhead is negligible dueto the following reasons (1) only the gradient metadata is ex-changed and (2) the coordination of one gradient batch runsasynchronously with the bulk synchronization of the previ-ous batches thus its cost can be always hidden (confirmedin our experiments)The selective compression and partitioning planer is a

standalone component for producing per-gradient compres-sion and partitioning plans It obtains the variables defined inSection 33 from the training scripts (including the synchro-nization strategy and cluster configurations) the networkand GPU-measurements via the first training iteration Theproduced plans are executed by CaSync at runtimeCompLLWe implement common operators using Thrust [50]the CUDA C++ template library with the following opti-mizations (1) CompLL reuses gradients produced by DNNcomputation and only allocates buffers for the much smallercompressed gradients to avoid the GPU memory contention(2) CompLL uses fast share memory rather than global mem-ory and eliminates bank conflicts [24] bymaking each threadaccess disjoint memory banks when possible We also fusethe decode and merge operators for better performanceLocal aggregation For multiple GPUs per node we firstaggregate the original gradients among local GPUs and thensynchronize the compressed gradients across nodes This isbecause the bandwidth of intra-node connection links (egPCIe NVLink) is often orders of magnitude higher than theinter-node links Local aggregation reduces the number ofgradients exchanged across nodes for better performanceDNNsystems integration HiPress integrates CaSync andCompLL-generated library into three modern DNN systemsTensorFlow MXNet and PyTorch First CaSync is integratedvia Horovod CompLL creates wrapper functions for encodeand decode primitives to obtain pointers to gradients andthe algorithm-specific arguments from the training contextCompLL then invokes the CompLL-generated code Secondwe create adaptors to make training workflows compression-enabled by instrumenting the original training scripts withfunction calls to CaSync Third we add a task queue and adedicated CPU thread to the execution engine of MXNet andTensorFlow to schedule encode and decode operators on GPUPyTorch does not have such an execution engine thus weimplement one to enable the above function

6 Evaluation

Our evaluation answers the following main questions

bull Can HiPress significantly improve the performance ofDNN data parallel training jobs over the baselines

Table 6 Statistics of trained models

Name Total size Max gradient Gradients

VGG19 [66] 54805MB 392MB 38

ResNet50 [26] 9746MB 9MB 155

UGATIT [31] 255875MB 1024MB 148

UGATIT-light [31] 51125MB 128MB 148

Bert-base [19] 42002MB 8942MB 207

Bert-large [19] 128260MB 11923MB 399

LSTM [44] 32797MB 19042MB 10

Transformer [69] 23408MB 6584MB 185

bull What are the performance implications of synchronizationoptimizations and the auto-generated compression code

bull What are the effects of compression rate and networkbandwidth

bull Can CompLL-generated compression algorithms achievethe same training accuracy as their original versions

61 Experimental Setup

Machine configurationsWe conduct experiments in bothAWS EC2 and local clusters to evaluate HiPress with bothhigh-end and low-end machines We use 16 p3dn24xlargeEC2 instances with 128 GPUs Each instance has 96 vCPU8 NVIDIA Tesla V100 GPUs (32GB memory connected byNVLink) and is connected by a 100Gbps network We alsoreplicate the same experiments in our local cluster with 16nodes and 32 GPUs Each local node has two 16-core In-tel E5-2620 processors 2 NVIDIA 1080 Ti GPUs (connectedvia a PCIe switch) and is connected by a 56Gbps Infini-band network EC2 instances and local nodes run Ubuntu1604 and CentOS 76 respectively with the remaining soft-ware being identical such as CUDA 101 OpenMPI 312NCCL 284 MXNet 151 TensorFlow 1155 PyTorch 150Horovod 0192 and BytePS 025BaselinesWe use TensorFlow (TF) MXNet PyTorch withBytePS and Ring-allreduce (Ring) as no-compression base-lines In the interest of space we only demonstrate the end-to-end performance with three out of five generated com-pression algorithms namely onebit DGC and TernGradwith each being evaluated within one DNN system We usethe recently developed BytePS(OSS-onebit) [5 11] andRing(OSS-DGC) [53] from industry as compression-enabledbaselines with open-source (OSS) quantization and sparsifi-cation algorithms Note that for a fair comparison we useour highly optimized on-GPU implementation instead of theoriginal on-CPU implementation for OSS-onebitModels and datasets Following the literature [30 61] wechoose six widely-used DNN models with three computervision (ResNet50 VGG19 and UGATIT) and three naturallanguage processing (Bert Transformer and standard-LSTM)We train ResNet50 andVGG19with the ImageNet dataset [60]and the remainingmodels with the selfie2anime [59] RTE [9]

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 11: Gradient Compression Supercharged High-Performance Data

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e4BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a) MXNet VGG19 batch=32 images

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Imag

ess

ec

1e4BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF ResNet50 batch=32 images

8 16 32 64 128The Number of GPUs

00

05

10

15

20

25

Imag

ess

ec

1e2BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch UGATIT batch=2 images

Figure 7 Throughput of computer vision models AWS EC2 V100 instances 100Gbps cross-node RDMA network

8 16 32 64 128The Number of GPUs

0

2

4

6

Sequ

ence

sse

c

1e5BytePSRingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

(a)MXNet Bert-large batch=32 sequences

8 16 32 64 128The Number of GPUs

00

05

10

15

20To

kens

sec

1e6BytePSRingRing(OSS-DGC)HiPress-CaSync-Ring(CompLL-DGC)Linear-Scaling

(b) TF Transformer batch=2048 tokens

8 16 32 64 128The Number of GPUs

0

1

2

3

4

Sequ

ence

sse

c

1e4BytePSRingHiPress-CaSync-PS(CompLL-TernGrad)Linear-Scaling

(c) PyTorch LSTM batch=80 sequences

Figure 8 Throughput of natural language processing models AWS EC2 V100 instances 100Gbps cross-node RDMA network

Table 7 Compression and partitioning plans of CompLL-onebit In each tuple the first value decides whether tocompress a gradient and the second value indicates the num-ber of partitions

Gradientsize

CaSync-PS CaSync-Ring

4 Nodes 16 Nodes 4 Nodes 16 Nodes

4MB ltyes 2gt ltyes 1gt ltyes 1gt ltno 16gt

16MB ltyes 4gt ltyes 6gt ltyes 4gt ltyes 5gt

392MB ltyes 12gt ltyes 16gt ltyes 4gt ltyes 16gt

WMT17 [63] and wikitext-2 [43] dataset respectively Weadditionally deploy Bert and UGATIT under their light modewith fewer parameters to meet the GPU memory constraintin our local cluster denoted as Bert-base and UGATIT-lightrespectively The model details are summarized in Table 6MetricsWemeasure the total number of samples processedper second as the training throughput the latency break-down of the key steps in the computation-synchronizationpipeline and the training accuracy and convergence speedSystemconfigurationsWe tune the configurations of base-lines for their best performance eg co-locating aggregatorsand workers for BytePS and CaSync-PS We deploy all sys-tems with RDMA enabled except BytePS on EC2 This isbecause BytePS does not support the Elastic Fabric Adapter(EFA) used by EC2 instances at the moment We keep theper-GPU batch size constant as the number of GPUs arescaled up (weak scaling) We set batch sizes across differ-ent models by following literature [19 33 44 69] insteadof setting them to the largest value that a single GPU can

sustain since a too large batch size may lead to convergenceproblems [40 61] For all three compression algorithms weinherit the parameter settings from their original papersTable 7 shows the optimal thresholds for compressing a

gradient and the optimal partition numbers produced byCaSync based on CompLL-onebit algorithm According totwo synchronization strategies CaSync currently supportsand their cluster deployment configurations we set the valueof 120572 120573 and 120574 for CaSync-PS as 2(119873 minus 1) 119870 and 119873 respec-tively This assignment is slightly different from the numbersin Table 3 This is because the evaluated CaSync-PS in Sec-tion 6 co-locates aggregators and workers and the localworkers do not need to send its gradients to the co-locatedaggregator via network activities For CaSync-Ring we setthree parameters as 2(119873 minus 1) 119873 and 119873 respectively Theoptimal thresholds of selective compression and partitionsizes are produced by our cost analysis model With 16 nodesCaSync suggests to compress gradients larger than 4MB andto split the largest VGG gradient into 16 partitions beforecompression for AWS EC2 platform

62 End-to-End Performance

621 AWS EC2 Results Figure 7 and Figure 8 comparethe end-to-end training throughput of HiPress and base-lines with MXNet TensorFlow and PyTorch as the underly-ing DNN system respectively using a total of 128 GPUsAtop MXNet We demonstrate the throughput comparisonresults using MXNet in Figure 7a and 8a For the VGG19model Ring outperforms BytePS by 313-503 across allcluster sizes When not using RDMA Ring still outperformsBytePS by 193-366 These results are not consistent with

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 12: Gradient Compression Supercharged High-Performance Data

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(a) Bert-large

0 2000 4000 6000 8000Time (ms)

020406080

100120

Perc

enta

ge (

) Ring HiPress

(b) UGATIT

Figure 9 GPU utilization of Ring and HiPress when train-ing Bert-large and UGATIT The configurations of HiPressare the same as those used in Figure 8a and 7c

the BytePS paper but valid This is due to we use a newerversion of NCCL library that both BytePS and Ring relieson and we also disable intra-node aggregation in Ringwhich leads to better performance For the Bert-large modelBytePS outperforms Ring by up to 89 across all clustersizes However when enabling the onebit compression algo-rithm BytePS(OSS-onebit) brings only limited improve-ments over the best-performed non-compression baselineseg only up to 73 improvement over BytePS Such surpris-ing result verifies the importance of designing a compression-aware synchronization strategy to release the full potentialof compression algorithms

Unlike limited speedups brought by the latest synchroniza-tion strategies and open-source versions of compression algo-rithms HiPress significantly improves the training through-put over all baselines across all cases Eg with 128 GPUs forVGG19 and Bert-large HiPress-CaSync-PS(CompLL-onebit)outperforms BytePS Ring and BytePS(OSS-onebit) by 1105and 323 604 and 441 695 and 233 respectivelyHiPress-CaSync-Ring(CompLL-onebit) performs similarlyto HiPress-CaSync-PS(CompLL-onebit) and also signifi-cantly outperforms all baselines One important observa-tion is that the improvements of HiPress become largerwhen the number of GPUs increases This implies that whenthe cluster size expands the communication overhead ofthe communication-intensive models increases and thusHiPress becomes even more beneficialAtop TensorFlow We evaluate the integration with Ten-sorFlow using the ResNet50 and Transformer models InFigure 7b the non-compression BytePS and Ring performsimilarly for ResNet50 In contrast for Transformer Ringoutperforms BytePS by up to 309 and 235 when switch-ing onoff RDMA Transformerrsquos scaling efficiency is signifi-cantly lower than that of ResNet50 since it ismore communic-ation-intensive and exchangesmore gradients than ResNet50Note that BytePS(OSS-onebit) cannot be directly ap-

plied to TensorFlow since it is tightly coupled with MXNetThus we exercise DGC integrated into Ring-allreduce

and TensorFlow To compare with Ring(OSS-DGC) we con-figure HiPress with CaSync-Ring rather than CaSync-PSFor the Transformer model Ring(OSS-DGC) outperformsBytePS and Ring by up to 428 and 221 respectively

Bert-base VGG1900

05

10

15

20

25

30

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

RingBytePS(OSS-onebit)HiPress-CaSync-Ring(CompLL-onebit)HiPress-CaSync-PS(CompLL-onebit)Linear-Scaling

Figure 10 Training speedup normalized to BytePS atopMXNet system in a 16-node local cluster connected via56Gbps Infiniband network with RDMA enabled

though brings almost no improvement for ResNet50 Be-cause of the optimized compression-aware synchronizationstrategy design and the highly-efficient on-GPU DGC codegenerated by CompLL HiPress-CaSync-Ring(CompLL-DGC)outperforms Ring(OSS-DGC) by up to 411 and the non-compression baselines such as BytePS and Ring by up to1014 for Transformer Interestingly even for ResNet50HiPress improves its training speed by up to 207 over allbaselines This implies that when the cluster size expandsthe communication cost of the computation-intensive mod-els also increases and can benefit from HiPressAtop PyTorch Here we exercise the UGATIT and LSTMmodels Since PyTorch has no integrated open-sourced com-pression algorithms we only comparewith non-compressionBytePS and Ring baselines In Figure 7c and 8c similarto the results of HiPress atop both MXNet and Tensor-

Flow HiPress over PyTorch with CaSync-PS the CompLL-TernGrad algorithm obtains a speedup up to 21 times comparedto BytePS and Ring for UGATIT and LSTM Such consistentresults verify that HiPress is a general and high performancecompression-aware data parallel frameworkGPUutilization Figure 9 compares the GPU resources usedfor the DNN-related computation of the non-compressionbaseline Ring and the best-performed HiPress configura-tions (Figure 8a and 7c) Here we use nsight instead ofnvidia-smi to measure the GPU utilization of training jobssince the latter does not distinguish the GPU resources usedfor the DNN computation and gradient synchronization Forthe Bert-large and UGATIT model both Ring and HiPress

can use nearly 100 GPU computing resources at the peakHowever the overall GPU usage of Ring is more sparse thanHiPress This is because Ringrsquos GPU utilization drops tozero during gradient transmission which is time-consumingin data parallel training However within HiPress the fastcompression-aware gradient synchronization eliminates thecommunication bottleneck which leads the system to spendmore time doing useful work

622 Local Cluster Results We also replicate all aboveexperiments in our local cluster with low-end GPUs and

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 13: Gradient Compression Supercharged High-Performance Data

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

0 250 500 750Time Cost(ms)

Linear+SeCoPa

+Bulk Sync+Pipeline

+On-GPU+On-CPU

DefaultVGG19 BytePS vs CaSync-PS

SynchronizationComputation

0 200 400 600Time Cost(ms)

Bert-base Ring vs CaSync-Ring

Figure 11 Impacts of enabling synchronization optimiza-tions on the time cost of computation and synchronization

RDMA-enabled 56Gbps network links Similar to the perfor-mance improvements of HiPress in the high-end AWS clus-ter in our local cluster tests the combinations of two CaSyncsynchronization strategies and various CompLL-generated al-gorithms in HiPress significantly outperform all baselinesand HiPressrsquos performance advantages become more ob-vious with more GPUs In the interest of space we onlyshow the performance speedups of all system configura-tions when training Bert-base and VGG19 over MXNet nor-malized to the non-compression baseline BytePS see Fig-ure 10 We use the onebit algorithm to reduce the transmitteddata volume like in Figure 7a and 8a Due to the GPU mem-ory constraint we run Bert-base a light variant Bert withfewer parameters With 16 nodes and 32 GPUs for bothcommunication-intensive models surprisingly the state-of-the-art compression-enabled baseline BytePS(OSS-onebit)runs even 85 slower than the non-compression Ring Bycontrast HiPress outperforms the non-compression base-lines (ie BytePS and Ring) and the compression-enabledbaseline BytePS(OSS-onebit) by up to 1331 and 533respectively Thus HiPress could benefit training jobs withdiverse softwarehardware configurations as long as thecommunication is the bottleneck

63 Effectiveness of Various Optimizations

Next we evaluate the individual performance gains of vari-ous synchronization and compression optimizations we in-troduced We report the latency breakdown when enablingoptimization one by one for training VGG19 and Bert-baseacross 16 local nodes in Figure 11 (the AWS results look sim-ilar and thus are not shown here) We use HiPress(CompLL-onebit) as an example with the same setup as Figure 10(results using other algorithms look similar) We synchro-nize gradients of VGG19 via CaSync-PS and Bert-base viaCaSync-Ring Default are baselines where the state-of-the-art BytePS or Ring is used without compressionCompLL auto-generationCompared toDefault surprisinglydirectly using the open-source on-CPU onebit (denoted as on-CPU) results in 322 more gradient synchronization cost forBytePS on VGG19 This is because the overhead of on-CPUcompression operators largely exceeds the communicationsavings However this does not apply to Bert-base since Ring

AWS Local00

05

10

15

20

Spee

dups

nor

mal

ized

toth

e By

tePS

(non

-com

pres

sion)

Low BandwidthHigh Bandwidth

(a) Diff network bandwidth

2bits 4bits 8bitsTernGrad

0001 001 005DGC

0

1

2

3

Imag

ess

ec

1e3

(b) Diff compression rates

Figure 12 Training performance comparison using differ-ent network bandwidth and compression rates Figure 12aand 12b use Bert-base and VGG19 respectively

uses GPU and does not work with on-CPU compression Incontrast our CompLL-onebit (denoted as on-GPU) reducesthe synchronization cost by 412 and 100 for VGG19 andBert-base respectively We also observe that on-GPU Com-

pLL-onebit imposes negligible negative impact on the localDNN computation time even though they share GPUPipelining Compared to on-GPU pipelining compressionand communication in CaSync further improves the synchro-nization performance of VGG19 and Bert-base by 78 and106 respectively This is because (1) the conventional Ring-allreduce precludes pipeline and (2) although BytePS enablespipelining it incurs multiple extra memory copies whichare eliminated by CompLLrsquos memory-centric optimizationsBulk synchronization Our compression-aware bulk syn-chronization in CaSync achieves 261 and 66 further syn-chronization performance improvements for VGG19 andBert-base respectively This is because our bulk synchro-nization approach improves the network utilization pro-motes parallel compression and reduces the overhead ofsmall tasks The improvement on VGG19 is higher than Bert-base because BytePS does not coordinate data transmissionwhile Ring-allreduce doesSelective compression and partitioning Judicious com-pression and partition decisions (denoted as SeCoPa) furtherreduces the synchronization cost of VGG19 and Bert-base by199 and 74 respectively Bert-base benefits more fromselective compression since 627 of its gradients are below16KB where the over-compressing penalties are eliminatedVGG19 contains a few large gradients (the largest is 392MB)and thus fine-grained partitioning leads to significant perfor-mance boosts When all the four optimizations are stackedup HiPress pushes the scaling efficiency of training VGG19and Bert-base up to 090 which is 1331 and 286 higherthan the two Default baselines respectively

64 Discussion of Other Factors

Impacts of network bandwidth Figure 12a compares theperformance of training Bert-basemodel using HiPresswithidentical GPU configurations but two different networks ForEC2 instances we use 100Gbps and 25Gbps as the high andlow bandwidth networks while 56Gbps and 10Gbps for local

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 14: Gradient Compression Supercharged High-Performance Data

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

0 200 600 800400Time(sec)

50

100

150

200

250

Perp

lexi

ty

Ring-AllreduceHiPress-CaSync-Ring(CompLL-DGC)

14x

0 200 400 600Time(min)

0

02

04

06

08

Top-

1 Ac

cura

cy

BytePSHiPress-CaSync-PS(CompLL-TernGrad)

12x

Figure 13 Convergence time of LSTM (left) and ResNet50(right) The target perplexity for LSTM is 8628 and the targetaccuracy for ResNet50 is 7711 [21 22]

nodes HiPress-CaSync-PS(CompLL-onebit) delivers simi-lar speedups when using different networks in both 16-nodeEC2 and local clusters (CaSync-Ring has similar trends)Thus HiPress can achieve near-optimal performance with-out expensive investment on high-endspecialized networksImpacts of compression rate In Figure 12b we comparethe throughput of TernGrad and DGC algorithms generatedby CompLL on VGG19 using CaSync-PS with the same setupas Figure 10 For TernGrad when increasing bitwidth from2 to 4 and 8-bit the speedup achieved by HiPress decreasesby 128 and 236 respectively As the compression costremains the same with different precisions the performancedrops are mainly due to the increasing data communicationvolumes Varying the compression rate of DGC from 01to 1 and 5 also results in a performance drop of 67and 113 respectively due to the increasing compressionand data communication cost This implies that CaSync stillenables fast compression-aware gradient synchronizationeven with lower gradient size reductionConvergence validationWe conduct the convergence val-idation experiments in our local cluster with 16 nodes 321080Ti GPUs and 56Gbps RDMA network We report theconvergence results in Figure 13 which shows thatHiPress-CaSync-Ring(CompLL-DGC) and HiPress-CaSync-PS(CompLL-Ter-nGrad) converge to almost the same perplexity or ac-curacy for LSTM and ResNet50 as no-compression baselinesbut with up to 286 less time

7 Related Work

Other than gradients compression there are other approachesaiming at addressing the communication bottleneck in dataparallel training such as using RDMA [80] adopting Ring-allreduce [7 8 29] co-designing gradient synchronizationwith the physical topology [35 38] and priority-based sched-uling [25 28 56] Blink generates optimal communicationprimitives [70] and BytePS uses spare CPU and bandwidthresources in the cluster and has already incorporated some ofthe above optimizations [30] However they are all compress-ion-agnostic approaches and some of them rely on high-endnetworks In contrast HiPress enables fast compression-aware data parallel training via software innovations andcan be combined with most existing techniques

Some recent works optimize specific gradient compressionPoseidon [82] synchronizes sufficient factors which are com-pressed forms of gradients of fully connected layers in CVmodels Parallax [32] focuses its optimization on sparse gra-dients and shows superior performance when training NLPmodels where sparse gradients dominate We significantlydiffer from these works by targeting at general gradient com-pression algorithms for any DNN models Grace[79] studiesthe impacts of gradient compression algorithms but it doesnot study nor address the system challenges for alleviatingthe tension between performance gains and programmingoverheads Accordion dynamically sets compression ratesto balance accuracy and performance [3] which can be em-ployed by HiPress as an advanced featureModel Parallelism [15 65] and Pipeline Parallelism [48]

are often combined with Data Parallelism for large-scaledeployment [71 72] which can benefit from HiPress Al-though HiPress focuses on Bulk Synchronous Parallel (BSP)in this paper given its wide adoption [32 47] HiPress isexpected to work with other synchronization methods suchas ASP [23] and SSP [27 73 78] Finally some componentsin HiPress are inspired by other works such as dependencygraph is inspired by Daydream [83] and fine-grained taskmanagement is inspired by MonoTasks [52]

8 Conclusion

Driven by CaSync and CompLL HiPress addresses the funda-mental tensions imposed by gradient compression CaSyncinnovates a general composable and adaptive gradient syn-chronization architecture that is compression-aware CompLLfacilitates an easy development of highly-optimized on-GPUgradient compression and an automated integration intomodern DNN systems with minimal manual efforts HiPressis open-sourced and achieves a scaling efficiency of up to092 and a training speed improvement up to 1105 overthe state-of-the-art baselines across six popular DNNmodelsin a cluster of 16 nodes with 128 NVIDIA V100 GPUs and100Gbps network

Acknowledgments

We thank the anonymous reviewers and our shepherd Li-dong Zhou for their insightful comments We also thankRuohui Wang for his initial exploration as well as LintaoZhang and Youshan Miao for their valuable suggestionsThis work is supported in part by the National Natural Sci-ence Foundation of China under Grant No 61802358 and61772486 the USTC Research Funds of the Double First-ClassInitiative under Grant No YD2150002006 and the NationalScience Foundation under Grant No CAREER-2048044 IIS-1838024 (using resources provided by Amazon Web Servicesas part of the NSF BIGDATA program) and CCF-1756013

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 15: Gradient Compression Supercharged High-Performance Data

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

References[1] Martiacuten Abadi Paul Barham Jianmin Chen Zhifeng Chen Andy Davis

Jeffrey Dean Matthieu Devin Sanjay Ghemawat Geoffrey Irving

Michael Isard et al 2016 TensorFlow A System for Large-Scale

Machine Learning In Proceedings of OSDI Vol 16 265ś283

[2] USTC ADSL 2021 Code of HiPress httpsgitlabcomhipresshipress

[Online accessed Sept-2021]

[3] Saurabh Agarwal Hongyi Wang Kangwook Lee Shivaram Venkatara-

man and Dimitris Papailiopoulos 2020 Accordion Adaptive Gra-

dient Communication via Critical Learning Regime Identification

arXiv201016248 [csLG]

[4] Alham Fikri Aji and Kenneth Heafield 2017 Sparse communication for

distributed gradient descent arXiv preprint arXiv170405021 (2017)

[5] Amazon 2021 Gradient Compression in AWS https

docsgooglecompresentationd1Dt1Sh2ixVF8Or_

Q3lzUM81F4Thj5LT8Xw6QjU1e6iwQeditslide=idp [Online

accessed Sept-2021]

[6] Arash Ashari Shirish Tatikonda Matthias Boehm Berthold Reinwald

Keith Campbell John Keenleyside and P Sadayappan 2015 On opti-

mizing machine learning workloads via kernel fusion ACM SIGPLAN

Notices 50 8 (2015) 173ś182

[7] Baidu 2017 Bringing HPC Techniques to Deep Learning https

githubcombaidu-researchbaidu-allreduce [Online accessed Sept-

2021]

[8] Baidu 2021 PaddlePaddle GitHub Source Code httpsgithubcom

PaddlePaddlePaddle [Online accessed Sept-2021]

[9] Luisa Bentivogli Bernardo Magnini Ido Dagan Hoa Trang Dang and

Danilo Giampiccolo 2009 The Fifth PASCAL Recognizing Textual

Entailment Challenge In Proceedings of the Second Text Analysis Con-

ference TAC 2009 Gaithersburg Maryland USA November 16-17 2009

NIST httpstacnistgovpublications2009additionalpapersRTE5_

overviewproceedingspdf

[10] Jeremy Bernstein Yu-Xiang Wang Kamyar Azizzadenesheli and An-

ima Anandkumar 2018 signSGD Compressed optimisation for non-

convex problems arXiv preprint arXiv180204434 (2018)

[11] BytePS 2021 Open-source Implementation of onebit algo-

rithm httpsgithubcombytedancebytepsblobmasterbyteps

commoncompressorimplonebitcc [Online accessed Sept-2021]

[12] Chia-Yu Chen Jungwook Choi Daniel Brand Ankur Agrawal Wei

Zhang and Kailash Gopalakrishnan 2017 AdaComp Adaptive Resid-

ual Gradient Compression for Data-Parallel Distributed Training (12

2017)

[13] Jianmin Chen Rajat Monga Samy Bengio and Rafal Jozefowicz

2016 Revisiting Distributed Synchronous SGD In Proceedings of In-

ternational Conference on Learning Representations Workshop Track

httpsarxivorgabs160400981

[14] Tianqi Chen Thierry Moreau Ziheng Jiang Lianmin Zheng Eddie

Yan Haichen Shen Meghan Cowan Leyuan Wang Yuwei Hu Luis

Ceze et al 2018 TVM An automated end-to-end optimizing compiler

for deep learning In 13th USENIX Symposium on Operating Systems

Design and Implementation (OSDI 18) 578ś594

[15] Trishul Chilimbi Yutaka Suzue Johnson Apacible and Karthik Kalya-

naraman 2014 Project Adam Building an Efficient and Scalable

Deep Learning Training System In Proceedings of 11th USENIX Sym-

posium on Operating Systems Design and Implementation (OSDI 14)

USENIX Association Broomfield CO 571ś582 httpswwwusenix

orgconferenceosdi14technical-sessionspresentationchilimbi

[16] Henggang Cui Hao Zhang Gregory R Ganger Phillip B Gibbons and

Eric P Xing 2016 GeePS Scalable Deep Learning on Distributed GPUs

with a GPU-Specialized Parameter Server In Proceedings of the Eleventh

European Conference on Computer Systems (London United Kingdom)

(EuroSys rsquo16) Association for Computing Machinery New York NY

USA Article 4 16 pages httpsdoiorg10114529013182901323

[17] Scott Cyphers Arjun K Bansal Anahita Bhiwandiwalla Jayaram

Bobba Matthew Brookhart Avijit Chakraborty Will Constable Chris-

tian Convey Leona Cook Omar Kanawi Robert Kimball Jason

Knight Nikolay Korovaiko Varun Kumar Yixing Lao Christopher R

Lishka JaikrishnanMenon JenniferMyers SandeepAswathNarayana

Adam Procter and Tristan J Webb 2018 Intel nGraph An Inter-

mediate Representation Compiler and Executor for Deep Learning

arXiv180108058 [csDC]

[18] Jeffrey Dean Greg Corrado Rajat Monga Kai Chen Matthieu Devin

Mark Mao Marcrsquoaurelio Ranzato Andrew Senior Paul Tucker Ke

Yang et al 2012 Large scale distributed deep networks In Proceedings

of Advances in neural information processing systems 1223ś1231

[19] Jacob Devlin Ming-Wei Chang Kenton Lee and Kristina Toutanova

2018 Bert Pre-training of deep bidirectional transformers for language

understanding arXiv preprint arXiv181004805 (2018)

[20] Facebook 2021 Gradient Compression in Facebook httpsgithub

compytorchpytorchissues39272 [Online accessed Sept-2021]

[21] Gluon 2021 gluoncv Homepage httpscvgluonaimodel_zoo

classificationhtml [Online accessed Sept-2021]

[22] Gluon 2021 gluonnlp Homepage httpsnlpgluonaimodel_zoo

language_modelindexhtml [Online accessed Sept-2021]

[23] Ido Hakimi Saar Barkai Moshe Gabel and Assaf Schuster 2019 Tam-

ing Momentum in a Distributed Asynchronous Environment CoRR

abs190711612 (2019) arXiv190711612 httparxivorgabs1907

11612

[24] Mark Harris 2013 Bank conflict in GPU httpsdevblogsnvidiacom

using-shared-memory-cuda-cc [Online accessed Sept-2021]

[25] Sayed Hadi Hashemi Sangeetha Abdu Jyothi and Roy H Campbell

2018 TicTac Accelerating distributed deep learning with communica-

tion scheduling arXiv preprint arXiv180303288 (2018)

[26] Kaiming He Xiangyu Zhang Shaoqing Ren and Jian Sun 2016 Deep

residual learning for image recognition In Proceedings of the IEEE

conference on computer vision and pattern recognition 770ś778

[27] Qirong Ho James Cipar Henggang Cui Seunghak Lee Jin Kyu Kim

Phillip B Gibbons Garth A Gibson Greg Ganger and Eric P Xing

2013 More effective distributed ml via a stale synchronous parallel

parameter server In Proceedings of Advances in neural information

processing systems 1223ś1231

[28] Anand Jayarajan JinliangWei Garth Gibson Alexandra Fedorova and

Gennady Pekhimenko 2019 Priority-based parameter propagation

for distributed DNN training arXiv preprint arXiv190503960 (2019)

[29] Xianyan Jia Shutao Song Wei He Yangzihao Wang Haidong Rong

Feihu Zhou Liqiang Xie Zhenyu Guo Yuanzhou Yang Liwei Yu

et al 2018 Highly scalable deep learning training system with

mixed-precision Training imagenet in four minutes arXiv preprint

arXiv180711205 (2018)

[30] Yimin Jiang Yibo Zhu Chang Lan Bairen Yi Yong Cui and Chuanx-

iong Guo 2020 A Unified Architecture for Accelerating Distributed

DNN Training in Heterogeneous GPUCPU Clusters In 14th USENIX

Symposium on Operating Systems Design and Implementation (OSDI 20)

USENIX Association 463ś479 httpswwwusenixorgconference

osdi20presentationjiang

[31] Junho Kim Minjae Kim Hyeonwoo Kang and Kwang Hee Lee

2020 U-GAT-IT Unsupervised Generative Attentional Networks with

Adaptive Layer-Instance Normalization for Image-to-Image Transla-

tion In International Conference on Learning Representations https

openreviewnetforumid=BJlZ5ySKPH

[32] Soojeong Kim Gyeong-In Yu Hojin Park Sungwoo Cho Eunji Jeong

Hyeonmin Ha Sanha Lee Joo Seong Jeong and Byung-Gon Chun

2019 Parallax Sparsity-aware Data Parallel Training of Deep Neural

Networks In Proceedings of the Fourteenth EuroSys Conference 2019

ACM 43

[33] Alexandros Koliousis Pijika Watcharapichat Matthias Weidlich Luo

Mai Paolo Costa and Peter Pietzuch 2019 CROSSBOW scaling deep

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 16: Gradient Compression Supercharged High-Performance Data

SOSP rsquo21 October 26ś29 2021 Virtual Event Germany Youhui Bai Cheng Li Quan Zhou Jun Yi Ping Gong Feng Yan Ruichuan Chen Yinlong Xu

learning with small batch sizes on multi-gpu servers arXiv preprint

arXiv190102244 (2019)

[34] Mu Li David G Andersen Jun Woo Park Alexander J Smola Amr

Ahmed Vanja Josifovski James Long Eugene J Shekita and Bor-Yiing

Su 2014 Scaling Distributed Machine Learning with the Parameter

Server In Proceedings of OSDI Vol 14 583ś598

[35] Youjie Li Iou-Jen Liu Yifan Yuan Deming Chen Alexander Schwing

and Jian Huang 2019 Accelerating Distributed Reinforcement Learn-

ing with In-Switch Computing In Proceedings of the 46th International

Symposium on Computer Architecture (Phoenix Arizona) (ISCA rsquo19)

Association for Computing Machinery New York NY USA 279ś291

httpsdoiorg10114533076503322259

[36] Hyeontaek Lim David Andersen and Michael Kaminsky 2018 3LC

Lightweight and Effective Traffic Compression for Distributed Ma-

chine Learning (02 2018)

[37] Yujun Lin Song Han Huizi Mao Yu Wang and William J Dally 2017

Deep gradient compression Reducing the communication bandwidth

for distributed training arXiv preprint arXiv171201887 (2017)

[38] Liang Luo Jacob Nelson Luis Ceze Amar Phanishayee and Arvind

Krishnamurthy 2018 Parameter hub a rack-scale parameter server

for distributed deep neural network training In Proceedings of the

ACM Symposium on Cloud Computing ACM 41ś54

[39] MARVELL 2021 MARVELL White Paper for 25Gb Ether-

net httpswwwmarvellcomcontentdammarvellenpublic-

collateralethernet-adaptersandcontrollersmarvell-ethernet-

adapters-fastlinq-25gb-ethernet-white-paperpdf [Online accessed

Sept-2021]

[40] Dominic Masters and Carlo Luschi 2018 Revisiting small batch train-

ing for deep neural networks arXiv preprint arXiv180407612 (2018)

[41] Mellanox 2021 Mellanox Corporate Update httpswwwmellanox

comrelated-docscompanyMLNX_Corporate_Deckpdf [Online

accessed Sept-2021]

[42] Mark F Mergen Volkmar Uhlig Orran Krieger and Jimi Xenidis 2006

Virtualization for high-performance computing ACM SIGOPS Operat-

ing Systems Review 40 2 (2006) 8ś11

[43] Stephen Merity 2016 The wikitext long term dependency language

modeling dataset httpswwwsalesforcecomproductseinsteinai-

researchthe-wikitext-dependency-language-modeling-dataset

[Online accessed Sept-2021]

[44] Stephen Merity Nitish Shirish Keskar and Richard Socher 2017 Reg-

ularizing and optimizing LSTM language models arXiv preprint

arXiv170802182 (2017)

[45] Hiroaki Mikami Hisahiro Suganuma Pongsakorn U-Chupala Yoshiki

Tanaka and Yuichi Kageyama 2018 ImageNetResNet-50 Training in

224 Seconds ArXiv abs181105233 (2018)

[46] MPICH 2021 MPI_Alltoall httpswwwmpichorgstaticdocslatest

www3MPI_Alltoallhtml [Online accessed Sept-2021]

[47] msalvaris 2021 Distributed training of deep learning models on

Azure httpsdocsmicrosoftcomen-usazurearchitecturereference-

architecturesaitraining-deep-learning [Online accessed Sept-2021]

[48] Deepak Narayanan Aaron Harlap Amar Phanishayee Vivek Seshadri

Nikhil R Devanur Gregory R Ganger Phillip B Gibbons and Matei

Zaharia 2019 PipeDream Generalized Pipeline Parallelism for DNN

Training In Proceedings of the 27th ACM Symposium on Operating

Systems Principles (Huntsville Ontario Canada) (SOSP rsquo19) Association

for Computing Machinery New York NY USA 1ś15 httpsdoiorg

10114533413013359646

[49] NVIDIA 2021 A Timeline of Innovation for NVIDIA httpswww

nvidiacomen-usabout-nvidiacorporate-timeline [Online ac-

cessed Sept-2021]

[50] NVIDIA 2021 The API reference guide for Thrust the CUDAC++ tem-

plate library httpsdocsnvidiacomcudathrustindexhtml [Online

accessed Sept-2021]

[51] OpenAI 2021 AI and Compute httpsopenaicomblogai-and-

compute [Online accessed Sept-2021]

[52] Kay Ousterhout Christopher Canel Sylvia Ratnasamy and Scott

Shenker 2017 Monotasks Architecting for Performance Clarity in

Data Analytics Frameworks In Proceedings of the 26th Symposium

on Operating Systems Principles (Shanghai China) (SOSP rsquo17) As-

sociation for Computing Machinery New York NY USA 184ś200

httpsdoiorg10114531327473132766

[53] Yuechao Pan 2018 Deep gradient compression implementation in

the common layer using CUDA httpsgithubcomhorovodhorovod

pull453 [Online accessed Sept-2021]

[54] Pitch Patarasuk and Xin Yuan 2009 Bandwidth optimal all-reduce

algorithms for clusters of workstations J Parallel and Distrib Comput

69 2 (2009) 117ś124

[55] Yanghua Peng Yixin Bao Yangrui Chen Chuan Wu and Chuanx-

iong Guo 2018 Optimus An Efficient Dynamic Resource Scheduler

for Deep Learning Clusters In Proceedings of the Thirteenth EuroSys

Conference (Porto Portugal) (EuroSys rsquo18) ACM New York NY USA

Article 3 14 pages httpsdoiorg10114531905083190517

[56] Yanghua Peng Yibo Zhu Yangrui Chen Yixin Bao Bairen Yi Chang

Lan ChuanWu and Chuanxiong Guo 2019 A generic communication

scheduler for distributed DNN training acceleration In Proceedings of

the 27th ACM Symposium on Operating Systems Principles (ACM SOSP

2019) Huntsville Ontario Canada October 27-30 2019

[57] PyTorch 2021 PyTorch TVM httpsgithubcompytorchtvm [On-

line accessed Sept-2021]

[58] Nadav Rotem Jordan Fix Saleem Abdulrasool Garret Catron Summer

Deng Roman Dzhabarov Nick Gibson James Hegeman Meghan Lele

Roman Levenstein Jack Montgomery Bert Maher Satish Nadathur

Jakob Olesen Jongsoo Park Artem Rakhov Misha Smelyanskiy and

Man Wang 2019 Glow Graph Lowering Compiler Techniques for

Neural Networks arXiv180500907 [csPL]

[59] Arnaud ROUGETET 2019 selfie2anime in Kaggle httpswwwkaggle

comarnaud58selfie2anime [Online accessed Sept-2021]

[60] Olga Russakovsky Jia Deng Hao Su Jonathan Krause Sanjeev

Satheesh Sean Ma Zhiheng Huang Andrej Karpathy Aditya Khosla

Michael Bernstein et al 2015 Imagenet large scale visual recogni-

tion challenge International journal of computer vision 115 3 (2015)

211ś252

[61] Amedeo Sapio Marco Canini Chen-Yu Ho Jacob Nelson Panos Kalnis

Changhoon Kim Arvind Krishnamurthy Masoud Moshref Dan Ports

and Peter Richtarik 2021 Scaling Distributed Machine Learning with

In-Network Aggregation In 18th USENIX Symposium on Networked

Systems Design and Implementation (NSDI 21) USENIX Association

785ś808 httpswwwusenixorgconferencensdi21presentation

sapio

[62] Frank Seide Hao Fu Jasha Droppo Gang Li and Dong Yu 2014 1-

bit stochastic gradient descent and its application to data-parallel

distributed training of speech dnns In Fifteenth Annual Conference of

the International Speech Communication Association

[63] Rico Sennrich Alexandra Birch Anna Currey Ulrich Germann Barry

Haddow Kenneth Heafield Antonio Valerio Miceli Barone and Philip

Williams 2017 The University of Edinburghrsquos Neural MT Systems for

WMT17 In Proceedings of the Second Conference onMachine Translation

Association for Computational Linguistics Copenhagen Denmark

389ś399 httpsdoiorg1018653v1W17-4739

[64] Alexander Sergeev and Mike Del Balso 2018 Horovod fast and easy

distributed deep learning in TensorFlow CoRR abs180205799 (2018)

arXiv180205799 httparxivorgabs180205799

[65] Noam Shazeer Youlong Cheng Niki Parmar Dustin Tran Ashish

Vaswani Penporn Koanantakool Peter Hawkins HyoukJoong Lee

Mingsheng Hong Cliff Young Ryan Sepassi and Blake Hechtman

2018 Mesh-TensorFlow Deep Learning for Supercomputers In Neural

Information Processing Systems

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References
Page 17: Gradient Compression Supercharged High-Performance Data

Gradient Compression Supercharged High-Performance Data Parallel DNN Training SOSP rsquo21 October 26ś29 2021 Virtual Event Germany

[66] Karen Simonyan and Andrew Zisserman 2014 Very deep convo-

lutional networks for large-scale image recognition arXiv preprint

arXiv14091556 (2014)

[67] Nikko Strom 2015 Scalable distributed DNN training using com-

modity GPU cloud computing In Proceedings of Sixteenth Annual

Conference of the International Speech Communication Association

[68] Jun Sun Tianyi Chen Georgios Giannakis and Zaiyue Yang 2019

Communication-efficient distributed learning via lazily aggregated

quantized gradients In Proceedings of Advances in Neural Information

Processing Systems 3365ś3375

[69] Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion

Jones Aidan N Gomez undefinedukasz Kaiser and Illia Polosukhin

2017 Attention is All You Need In Proceedings of the 31st International

Conference on Neural Information Processing Systems (Long Beach

California USA) (NIPSrsquo17) Curran Associates Inc Red Hook NY

USA 6000ś6010

[70] Guanhua Wang Shivaram Venkataraman Amar Phanishayee Jorgen

Thelin Nikhil Devanur and Ion Stoica 2020 Blink Fast and Generic

Collectives for Distributed ML In Conference on Machine Learning and

Systems (MLSys 2020) httpswwwmicrosoftcomen-usresearch

publicationblink-fast-and-generic-collectives-for-distributed-ml

[71] Minjie Wang Chien-Chin Huang and Jinyang Li 2018 Unifying Data

Model and Hybrid Parallelism in Deep Learning via Tensor Tiling

CoRR abs180504170 (2018) arXiv180504170 httparxivorgabs

180504170

[72] Minjie Wang Chien-chin Huang and Jinyang Li 2019 Supporting

Very Large Models Using Automatic Dataflow Graph Partitioning

In Proceedings of the Fourteenth EuroSys Conference 2019 (Dresden

Germany) (EuroSys rsquo19) Association for Computing Machinery New

York NY USA Article 26 17 pages httpsdoiorg1011453302424

3303953

[73] Jinliang Wei Wei Dai Aurick Qiao Qirong Ho Henggang Cui Gre-

gory R Ganger Phillip B Gibbons Garth A Gibson and Eric P Xing

2015 Managed communication and consistency for fast data-parallel

iterative analytics In Proceedings of the Sixth ACM Symposium on

Cloud Computing ACM 381ś394

[74] Wei Wen Cong Xu Feng Yan Chunpeng Wu Yandan Wang Yiran

Chen and Hai Li 2017 Terngrad Ternary gradients to reduce com-

munication in distributed deep learning In Proceedings of Advances in

neural information processing systems 1509ś1519

[75] Wikipedia 2021 List of NVIDIA Graphics Processing Units httpsen

wikipediaorgwikiList_of_Nvidia_graphics_processing_units [On-

line accessed Sept-2021]

[76] Jiaxiang Wu Weidong Huang Junzhou Huang and Tong Zhang 2018

Error compensated quantized SGD and its applications to large-scale

distributed optimization arXiv preprint arXiv180608054 (2018)

[77] Wencong Xiao Romil Bhardwaj Ramachandran Ramjee Muthian Si-

vathanu Nipun Kwatra Zhenhua Han Pratyush Patel Xuan Peng

Hanyu Zhao Quanlu Zhang Fan Yang and Lidong Zhou 2018 Gan-

diva Introspective Cluster Scheduling for Deep Learning In Proceed-

ings of 13th USENIX Symposium on Operating Systems Design and Im-

plementation (OSDI 18) USENIX Association Carlsbad CA 595ś610

httpswwwusenixorgconferenceosdi18presentationxiao

[78] Eric P Xing Qirong Ho Wei Dai Jin-Kyu Kim Jinliang Wei Seunghak

Lee Xun Zheng Pengtao Xie Abhimanu Kumar and Yaoliang Yu 2015

Petuum A New Platform for Distributed Machine Learning on Big

Data In Proceedings of the 21th ACM SIGKDD International Conference

on Knowledge Discovery and Data Mining (Sydney NSW Australia)

(KDD rsquo15) Association for Computing Machinery New York NY USA

1335ś1344 httpsdoiorg10114527832582783323

[79] Hang Xu Chen-Yu Ho Ahmed M Abdelmoniem Aritra Dutta

El Houcine Bergou Konstantinos Karatsenidis Marco Canini and

Panos Kalnis 2021 GRACE A Compressed Communication Frame-

work for Distributed Machine Learning In Proceedings of ICDCSrsquo21

[80] Jilong Xue Youshan Miao Cheng Chen Ming Wu Lintao Zhang and

Lidong Zhou 2019 Fast Distributed Deep Learning over RDMA In

Proceedings of the Fourteenth EuroSys Conference 2019 1ś14

[81] Zhilin Yang Zihang Dai Yiming Yang Jaime G Carbonell Ruslan

Salakhutdinov and Quoc V Le 2019 XLNet Generalized Autoregres-

sive Pretraining for Language Understanding CoRR abs190608237

(2019) arXiv190608237 httparxivorgabs190608237

[82] Hao Zhang Zeyu Zheng Shizhen Xu Wei Dai Qirong Ho Xiaodan

Liang Zhiting Hu Jinliang Wei Pengtao Xie and Eric P Xing 2017

Poseidon An efficient communication architecture for distributed deep

learning on GPU clusters In Proceedings of USENIX Annual Technical

Conference 2017(USENIX ATC 17) 181ś193

[83] Hongyu Zhu Amar Phanishayee and Gennady Pekhimenko 2020

Daydream Accurately Estimating the Efficacy of Optimizations for

DNN Training In 2020 USENIX Annual Technical Conference (USENIX

ATC 20) USENIX Association 337ś352 httpswwwusenixorg

conferenceatc20presentationzhu-hongyu

[84] Martin A Zinkevich Markus Weimer Alex Smola and Lihong Li 2010

Parallelized Stochastic Gradient Descent In Proceedings of the 23rd

International Conference on Neural Information Processing Systems -

Volume 2 (Vancouver British Columbia Canada) Red Hook NY USA

2595ś2603

  • Abstract
  • 1 Introduction
  • 2 Background and Motivation
    • 21 Data Parallel DNN Training
    • 22 Gradient Synchronization
    • 23 Computation and Communication Tension
    • 24 Gradient Compression
    • 25 System Challenges and Opportunities
      • 3 Compression-Aware Synchronization
        • 31 Composable Pipelined Synchronization
        • 32 Compression-aware Bulk Synchronization
        • 33 Selective Compression and Partitioning
          • 4 Compression Library and Language
            • 41 Unified API Abstraction
            • 42 Common Operator Library
            • 43 Code Synthesis and Domain-specific Language
            • 44 Case Studies and Discussions
              • 5 HiPress Framework
              • 6 Evaluation
                • 61 Experimental Setup
                • 62 End-to-End Performance
                • 63 Effectiveness of Various Optimizations
                • 64 Discussion of Other Factors
                  • 7 Related Work
                  • 8 Conclusion
                  • Acknowledgments
                  • References