Benanza:自动生成$μ$基准测试,以计算“下限”延迟并通知GPU上深度学习模型的优化
Benanza: Automatic $μ$Benchmark Generation to Compute "Lower-bound" Latency and Inform Optimizations of Deep Learning Models on GPUs
摘要:
随着深度学习(DL)模型越来越多地用于延迟敏感型应用,人们对改善其响应时间的兴趣也越来越大。这种改进的一个重要途径是分析这些模型的执行情况,并描述其性能,以确定可能的优化机会。然而,目前的分析工具缺乏高度期望的能力,以表征理想的性能,确定低效率的来源,并量化潜在的优化的好处。这些缺陷导致缓慢的表征/优化周期,无法跟上引入新DL模型的快速步伐。我们提出了Benanza,这是一个可持续和可扩展的基准测试和分析设计,可以加快GPU上DL模型的表征/优化周期。Benanza由四个主要组件组成:一个模型处理器,它将模型解析为内部表示;一个可配置的基准生成器,它在给定一组模型的情况下自动生成微基准;一个基准结果数据库;以及一个分析器,它使用基准数据计算DL模型的“下限”延迟,并通知模型执行的优化。“下限”延迟度量估计GPU系统上的理想模型执行,并作为识别框架或系统库中优化机会的基础。我们使用Benanza在从Kepler到最新的Turing的7个GPU上评估了MXNet,ONNX和PyTorch中的30个ONNX模型,并确定了并行层执行,cuDNN卷积算法选择,框架效率低下,层融合和使用Tensor Cores的优化。
英文摘要:
As Deep Learning (DL) models have been increasingly used in latency-sensitive applications, there has been a growing interest in improving their response time. An important venue for such improvement is to profile the execution of these models and characterize their performance to identify possible optimization opportunities. However, the current profiling tools lack the highly desired abilities to characterize ideal performance, identify sources of inefficiency, and quantify the benefits of potential optimizations. Such deficiencies have led to slow characterization/optimization cycles that cannot keep up with the fast pace at which new DL models are introduced. We propose Benanza, a sustainable and extensible benchmarking and analysis design that speeds up the characterization/optimization cycle of DL models on GPUs. Benanza consists of four major components: a model processor that parses models into an internal representation, a configurable benchmark generator that automatically generates micro-benchmarks given a set of models, a database of benchmark results, and an analyzer that computes the "lower-bound" latency of DL models using the benchmark data and informs optimizations of model execution. The "lower-bound" latency metric estimates the ideal model execution on a GPU system and serves as the basis for identifying optimization opportunities in frameworks or system libraries. We used Benanza to evaluate 30 ONNX models in MXNet, ONNX Runtime, and PyTorch on 7 GPUs ranging from Kepler to the latest Turing, and identified optimizations in parallel layer execution, cuDNN convolution algorithm selection, framework inefficiency, layer fusion, and using Tensor Cores.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。