scalable distributed training with parameter hub a
play

Scalable Distributed Training with Parameter Hub: a whirlwind tour - PowerPoint PPT Presentation

Scalable Distributed Training with Parameter Hub: a whirlwind tour TVM Stack Optimization High-Level Differentiable IR AutoTVM Tensor Expression IR LLVM, CUDA, Metal VTA AutoVTA Edge Cloud Hardware ASIC FPGA FPGA Fleet


  1. Scalable Distributed Training with Parameter Hub: 
 a whirlwind tour

  2. TVM Stack Optimization High-Level Differentiable IR AutoTVM Tensor Expression IR LLVM, CUDA, Metal VTA AutoVTA Edge Cloud Hardware ASIC FPGA FPGA Fleet

  3. Optimization High-Level Differentiable IR AutoTVM Tensor Expression IR LLVM, CUDA, Metal VTA AutoVTA Hardware Edge Cloud ASIC Fleet FPGA FPGA Active Topology Probing Your Cloud Groundwork for bringing TVM to the distributed world for training and inference, on commercial cloud, or in your own cluster.

  4. Parameter Hub Optimized, topology-aware and dynamic mechanism for inter-machine communication 4 Liang Luo, Jacob Nelson, Luis Ceze, Amar Phanishayee and Arvind Krishnamurthy

  5. Parameter Hub Optimized, topology-aware and dynamic mechanism for inter-machine communication * In the cloud-based training context 4 Liang Luo, Jacob Nelson, Luis Ceze, Amar Phanishayee and Arvind Krishnamurthy

  6. Deep Learning constitutes an important workload in cloud today. Major cloud providers all have an ecosystem for cloud learning. 5

  7. Deep Learning constitutes an important workload in cloud today. Major cloud providers all have an ecosystem for cloud learning. 5

  8. Server demand for DL inference across data centers nearly quadrupled in less than 2 years. Source: Facebook 6

  9. Server demand for DL inference across data centers nearly quadrupled in less than 2 years. Source: Facebook 6

  10. EC2 reclaims your GPU instances as they run out of capacity 7

  11. EC2 reclaims your GPU instances as they run out of capacity 7

  12. Distributed Training INDEPENDENT FORWARD/BACKWARD PASSES + COORDINATED PARAMETER EXCHANGE Time Parameter A1 O1 A2 O2 Server Worker 1 F1 B1 F2 B2 F3 B2 Worker 2 F1 B1 F2 B2 F3 B2 (F)orward Pass (B)ackward Pass (A)ggregation (O)ptimization Parameter Server Worker 8

  13. Distributed Training INDEPENDENT FORWARD/BACKWARD PASSES + COORDINATED PARAMETER EXCHANGE Time Parameter A1 O1 A2 O2 Sever Worker 1 F1 B1 F2 B2 F3 B2 Worker 2 F1 B1 F2 B2 F3 B2 (F)orward Pass (B)ackward Pass (A)ggregation (O)ptimization Parameter Server Worker 9

  14. Distributed Training Today IN THE CONTEXT OF THE CLOUD Network Core ToR ToR Machine with GPUs Machine with GPUs Machine Machine 10

  15. Distributed Training Today FORWARD AND BACKWARD PASSES IN WORKER Network Core ToR ToR Worker 1 PS 2 PS 1 Worker 2 11

  16. Distributed Training Today AGGREGATION AND OPTIMIZATION IN PS Network Core ToR ToR Worker 1 PS 2 PS 1 Worker 2 12

  17. Distributed training is communication bound ResNet 269 - Problem gets worse 1.8 GPU idle, waiting on network over time: shifting GPU and Network active 1.35 bottleneck. Seconds - With modern GPUs 0.9 most of the time is spent 0.45 on communication. 0 - Making GPUs faster will GRID 520 K80 M60 V100 do little to increase throughput 2012 2014 2015 2017 - Wasting compute resources. 13

  18. Distributed training is communication bound AlexNet ResNet 269 GoogleNet Inception V3

  19. Bottlenecks in DDNN training MAPPING OF TRAINING WORKLOAD TO THE CLOUD IS INEFFICIENT. Network Core ToR ToR Worker 1 PS 2 PS 1 Worker 2 15

  20. Bottlenecks in DDNN training FRAMEWORK BOTTLENECKS Network Core ToR ToR Worker 1 PS 2 PS 1 Worker 2 16

  21. Bottlenecks in DDNN training FRAMEWORK BOTTLENECKS Training Framework … Network Core Network GPU ToR ToR Worker 1 PS 2 PS 1 Worker 2 16

  22. Bottlenecks in DDNN training FRAMEWORK BOTTLENECKS 17

  23. Bottlenecks in DDNN training FRAMEWORK BOTTLENECKS ResNet 269 Compute Inception Data Copy and Communication Aggregator GoogleNet Optimizer Synchronization and other Overheads AlexNet 0 0.4 0.8 1.2 1.6 Seconds 17

  24. Bottlenecks in DDNN training MAPPING OF TRAINING WORKLOAD TO THE CLOUD IS INEFFICIENT. Network Core ToR ToR Worker 1 PS 2 PS 1 Worker 2 18

  25. Bottlenecks in DDNN training BANDWIDTH BOTTLENECK Network Core ToR ToR Worker 1 PS 2 Worker 2 PS 1 19

  26. Bottlenecks in Cloud-based DDNN training INSUFFICIENT BANDWIDTH Minimum bandwidth required 1300 Gbps for each of the popular NNs for communication to not 1000 Gbps bottleneck computation? 8 workers, GTX 1080 Ti, central parameter servers. MxNet 25 Gbps 10 Gbps 20

  27. Bottlenecks in Cloud-based DDNN training INSUFFICIENT BANDWIDTH Minimum bandwidth required 1300 Gbps for each of the popular NNs for communication to not 1000 Gbps bottleneck computation? 8 workers, GTX 1080 Ti, central parameter servers. MxNet 25 Gbps Cloud Bandwidth 10 Gbps 20

  28. Bottlenecks in Cloud-based DDNN training INSUFFICIENT BANDWIDTH Minimum bandwidth required 1300 Gbps for each of the popular NNs for communication to not 1000 Gbps bottleneck computation? 8 workers, GTX 1080 Ti, central parameter servers. MxNet GoogleNet / Inception: 40 Gbps 25 Gbps Cloud Bandwidth 10 Gbps 20

  29. Bottlenecks in Cloud-based DDNN training INSUFFICIENT BANDWIDTH Minimum bandwidth required 1300 Gbps for each of the popular NNs for communication to not 1000 Gbps bottleneck computation? ResNet: 100 Gbps 8 workers, GTX 1080 Ti, central parameter servers. MxNet GoogleNet / Inception: 40 Gbps 25 Gbps Cloud Bandwidth 10 Gbps 20

  30. Bottlenecks in Cloud-based DDNN training INSUFFICIENT BANDWIDTH Minimum bandwidth required 1300 Gbps AlexNet: 1200 Gbps for each of the popular NNs for communication to not 1000 Gbps bottleneck computation? ResNet: 100 Gbps 8 workers, GTX 1080 Ti, central parameter servers. MxNet GoogleNet / Inception: 40 Gbps 25 Gbps Cloud Bandwidth 10 Gbps 20

  31. Bottlenecks in Cloud-based DDNN training MAPPING OF TRAINING WORKLOAD TO THE CLOUD IS INEFFICIENT. Network Core ToR ToR Worker 1 PS 2 PS 1 Worker 2 21

  32. Bottlenecks in Cloud-based DDNN training DEPLOYMENT-RELATED OVERHEAD Network Core ToR ToR Worker 1 PS 2 PS 1 Worker 2 22

  33. Bottlenecks in Cloud-based DDNN training DEPLOYMENT-RELATED OVERHEAD 1 2 3 4 5 6 7 8 • Transient congestion, or 1 9 Gbps Cluster 1: 1 3 4 5 7 2 4. oversubscription by Cluster 2: 2 6 8 7 design 3 8. 4. Hosts • Cross-rack 9 7 communication cost is 4 8. 4. 8. 9 7 9 higher than Intra-rack 5 8. 4. 8. 8. communication. 9 7 9 9 4 Gbps 6 4. 9. 4. 4. 4. 7 0 7 7 7 Hosts 7 8. 4. 9. 8. 9. 4. 23 9 7 0 9 0 7

  34. Parameter Hub Optimizations CODESIGNING SOFTWARE, HARDWARE WITH CLUSTER CONFIGURATION FOR EFFICIENT CLOUD- BASED DDNN TRAINING ToR ToR PS 2 PS 1 Worker 2 24

  35. Eliminating framework bottlenecks: PHub Optimizations: streamlining DDNN training pipeline Data Copy Aggregation Optimization … Network Core GPU Network ToR ToR Worker 1 PS 2 PS 1 Worker 2 25

  36. Eliminating framework bottlenecks: PHub Optimizations: streamlining DDNN training pipeline Data Copy Aggregation Optimization … Network Core GPU Network ToR ToR Worker 1 PS 2 PS 1 Worker 2 26

  37. Software Optimizations GRADIENTS Network MEMORY Core ToR ToR CPU Worker 1 PS 2 PS 1 Worker 2 27

  38. Software Optimizations GRADIENTS Network MEMORY Core ToR ToR CPU Worker 1 PS 2 PS 1 Worker 2 27

  39. Software Optimizations GRADIENT AGGREGATION AND OPTIMIZATION Requires synchronization. Great locality. No synchronization Great locality. No synchronization Too much coherence and synchronization NUMA 0 NUMA 1 Each core reads the input Q For each input Q, launch a Sequentially aggregates the Organize processors into from different workers and series of threads for same portion of gradients hierarchy. Perform NUMA writes to different locations to aggregation. This is used in within each queue. (Tall aware tree reduction. the output queue MxNet. (Wide Aggregation) Aggregation) 28

  40. Software Optimizations GRADIENT AGGREGATION AND OPTIMIZATION Requires synchronization. Great locality. No synchronization Great locality. No synchronization Too much coherence and synchronization NUMA 0 NUMA 1 Each core reads the input Q For each input Q, launch a Sequentially aggregates the Organize processors into from different workers and series of threads for same portion of gradients hierarchy. Perform NUMA writes to different locations to aggregation. This is used in within each queue. (Tall aware tree reduction. the output queue MxNet. (Wide Aggregation) Aggregation) 28

  41. Software Optimizations TALL AGGREGATION AND OPTIMIZATION - Chunk a gradient into a series of virtual gradients deterministically. - A virtual gradient is mapped to a particular core on the server. Core Mappings Gradient Array for Key 0 from 8 workers 29

  42. Software Optimizations TALL AGGREGATION AND OPTIMIZATION - Chunk a gradient into a series of virtual gradients deterministically. - A virtual gradient is mapped to a particular core on the server. Core Mappings Gradient Array for Key 0 from 8 workers 29

  43. Software Optimizations TALL AGGREGATION AND OPTIMIZATION - Chunk a gradient into a series of virtual gradients deterministically. - A virtual gradient is mapped to a particular core on the server. Core Mappings - Virtual gradients are transferred independently. Gradient Array for Key 0 from 8 workers 29

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend