一句话:提出NeuSight,将深度学习内核按tile分解,用机器学习与性能定律预测未见GPU上训练/推理的端到端延迟。
深度学习内核具有可预测的访存与计算模式,但模型和GPU快速演进,难以直接在新GPU上运行新模型来评估性能。现有方法直接用机器学习预测内核延迟,面对未见模型与新GPU时误差很高。NeuSight将内核预测分解为独立执行的tile粒度工作集,用机器学习预测每个tile,并通过基本性能定律约束,再聚合为端到端延迟;它同时利用GPU硬件行为与软件库优化,支持训练和推理。在多种负载与最新GPU上,NeuSight优于现有工作;对H100上GPT3的训练与推理延迟预测,误差分别从121.4%和30.8%降至2.3%。
Deep learning kernels exhibit a high level of predictable memory accesses and compute patterns, making GPU's architecture well-suited for their execution. Moreover, software and runtime system for GPUs further enable optimizations that aim to better utilize the stream multiprocessors, on-chip bandwidth, multiple levels of cache hierarchy, and off-chip high-bandwidth memory. In the context of deep learning, the entire space of models and GPUs is constantly evolving, as newer models emerge with simultaneous upgrades to the device. However, access to newer GPUs is often limited, raising important questions about the performance of new model architectures on existing GPUs, existing models on new GPUs, and new model architectures on new GPUs. To address these questions, we introduce NeuSight, a forecasting framework to predict the performance of a diverse range of deep learning models, for both training and inference, on unseen GPUs, without requiring actual execution of the target model on the target GPU. The framework leverages both GPU hardware behavior and software library optimizations to estimate the end-to-end performance of these models. We observe that prior work in this area suffers from high absolute error percentages when forecasting performance on unseen models and new GPUs, as they attempt to model the complex task of predicting the latency of a deep learning kernel on a GPU directly using a machine learning approach. Instead, with NeuSight, we decompose the prediction into smaller problems, while bounding the prediction through fundamental performance laws. NeuSight decomposes a single deep learning kernel prediction into smaller working sets called tiles, which are executed independently on the GPU. Tile-granularity predictions are determined using a machine learning approach and aggregated to estimate the end-to-end latency. As such, NeuSight outperforms prior work across a variety of deep learning workloads and the most up-to-date GPUs. It reduces the percentage error from 121.4% and 30.8% to 2.3% in predicting the latency of GPT3 model for training and inference on H100, in comparison to state-of-the-art prior work, respectively, where GPT3 and H100 were not used to train any framework.