arXiv:2410.22249cs.ARcs.DB2024-10中稿 · the 57th MICRO被引 6

优化GPU上推荐系统推理,提升3倍性能

Pushing the Performance Envelope of DNN-based Recommendation Systems Inference on GPUs

  • 通过编译器优化实现嵌入层最高利用率
  • 嵌入阶段性能提升103%,整体推理快77%
  • 适合大规模推荐系统部署者参考

个性化推荐在互联网中广泛应用,众多行业和超大规模公司使用深度学习推荐模型(DLRMs)满足个性化需求(如广告投放或电影推荐)。随着模型与数据集规模增长,计算与内存需求激增,GPU逐渐成为执行DLRM推理的首选。然而,新式DLRM在保证可接受延迟的同时仍面临挑战,传统部署方式日益消耗更多GPU资源,导致推理成本上升。本文表明,嵌入阶段仍是GPU推理流水线的主要瓶颈,导致仅嵌入操作就出现高达3.2倍的性能下降。我们通过微架构剖析发现标准嵌入核存在低占用问题。借助直接编译器优化,实现最优占用率,性能最多提升53%。但长内存延迟停顿依然存在。为此,我们提出基于插件的软件预取和L2固定技术,有效隐藏并减少延迟。进一步地,将两者结合,因彼此互补而效果更佳。在A100 GPU上对大模型与大数据集的实验表明,所提技术使嵌入阶段性能提升最高达103%,整体DLRM推理管道提升77%。

原文摘要 · Abstract (English)

Personalized recommendation is a ubiquitous application on the internet, with many industries and hyperscalers extensively leveraging Deep Learning Recommendation Models (DLRMs) for their personalization needs (like ad serving or movie suggestions). With growing model and dataset sizes pushing computation and memory requirements, GPUs are being increasingly preferred for executing DLRM inference. However, serving newer DLRMs, while meeting acceptable latencies, continues to remain challenging, making traditional deployments increasingly more GPU-hungry, resulting in higher inference serving costs. In this paper, we show that the embedding stage continues to be the primary bottleneck in the GPU inference pipeline, leading up to a 3.2x embedding-only performance slowdown. To thoroughly grasp the problem, we conduct a detailed microarchitecture characterization and highlight the presence of low occupancy in the standard embedding kernels. By leveraging direct compiler optimizations, we achieve optimal occupancy, pushing the performance by up to 53%. Yet, long memory latency stalls continue to exist. To tackle this challenge, we propose specialized plug-and-play-based software prefetching and L2 pinning techniques, which help in hiding and decreasing the latencies. Further, we propose combining them, as they complement each other. Experimental evaluations using A100 GPUs with large models and datasets show that our proposed techniques improve performance by up to 103% for the embedding stage, and up to 77% for the overall DLRM inference pipeline.

推荐系统GPU优化嵌入加速编译优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。