Skip to main content
QUICK REVIEW

[论文解读] CuLDA_CGS: Solving Large-scale LDA Problems on GPUs

Xiaolong Xie, Yun Liang|arXiv (Cornell University)|Mar 13, 2018
Advanced Neural Network Applications参考文献 32被引用 3
一句话总结

CuLDA_CGS 是一种基于 GPU 加速的、高度可扩展的潜在狄利克雷分布(LDA)框架,通过优化工作负载划分、内存访问和多 GPU 同步,实现了在单个 GPU 上相较于最先进 CPU 和 GPU LDA 解决方案高达 7.3 倍的加速,而在四张 GPU 上额外实现了 3.0 倍的加速,显著提升了大规模主题建模的吞吐量。

ABSTRACT

Latent Dirichlet Allocation(LDA) is a popular topic model. Given the fact that the input corpus of LDA algorithms consists of millions to billions of tokens, the LDA training process is very time-consuming, which may prevent the usage of LDA in many scenarios, e.g., online service. GPUs have benefited modern machine learning algorithms and big data analysis as they can provide high memory bandwidth and computation power. Therefore, many frameworks, e.g. Ten- sorFlow, Caffe, CNTK, support to use GPUs for accelerating the popular machine learning data-intensive algorithms. However, we observe that LDA solutions on GPUs are not satisfying. In this paper, we present CuLDA_CGS, a GPU-based efficient and scalable approach to accelerate large-scale LDA problems. CuLDA_CGS is designed to efficiently solve LDA problems at high throughput. To it, we first delicately design workload partition and synchronization mechanism to exploit the benefits of mul- tiple GPUs. Then, we offload the LDA sampling process to each individual GPU by optimizing from the sampling algorithm, par- allelization, and data compression perspectives. Evaluations show that compared with state-of-the-art LDA solutions, CuLDA_CGS outperforms them by a large margin (up to 7.3X) on a single GPU. CuLDA_CGS is able to achieve extra 3.0X speedup on 4 GPUs. The source code is publicly available on https://github.com/cuMF/ CuLDA_CGS.

研究动机与目标

  • 解决由于 CPU 和分布式系统中内存带宽限制导致的大规模 LDA 训练性能瓶颈。
  • 克服现有基于 GPU 的 LDA 解决方案因不规则内存访问和多 GPU 扩展性差而导致的 GPU 硬件利用率不足的问题。
  • 设计一种在单机架构下实现高吞吐量和强可扩展性的系统,适用于多 GPU 平台。
  • 通过算法优化、并行化和数据压缩技术,优化 LDA 采样过程,以最小化内存占用并最大化 GPU 利用率。

提出的方法

  • 采用自定义的工作负载划分策略,在多个 GPU 之间平衡计算负载,同时最小化 GPU 间的通信开销。
  • 实现细粒度的同步机制,以减少 GPU 间模型更新过程中的开销。
  • 通过重用子表达式和压缩数据结构,优化折叠吉布斯采样算法,以减轻内存带宽压力。
  • 利用软件管理的缓存和内存访问模式,提升缓存效率并减少全局内存访问次数。
  • 设计一种多 GPU 数据布局,实现高效的并行采样和模型聚合,同时将同步延迟降至最低。
  • 利用 CUDA 内核,充分挖掘 GPU 架构的海量并行能力,尤其针对 LDA 中每个词元的 O(K) 采样步骤。

实验结果

研究问题

  • RQ1如何高效地将 LDA 训练映射到 GPU 架构上,以克服内存带宽瓶颈?
  • RQ2何种工作负载划分和同步策略能够实现在多 GPU 上 LDA 训练的高可扩展性?
  • RQ3单机多 GPU LDA 系统是否能在吞吐量和收敛速度方面超越基于分布式 CPU 的系统?
  • RQ4所提出的优化栈(算法、并行化、数据布局)在真实工作负载中与现有 GPU 和 CPU 基础的 LDA 解决方案相比表现如何?
  • RQ5CuLDA_CGS 在不同代 GPU 和不同数量 GPU 上的可扩展性达到何种程度?

主要发现

  • CuLDA_CGS 在所有评估平台和数据集上,其采样速度相比最先进 CPU 基础的 WarpLDA 最高提升了 7.3 倍。
  • 在单张 Titan X GPU 上,CuLDA_CGS 在 NYTimes 数据集上的处理速度达到每秒 173.6M 个词元,优于在更强大的 GTX 1080 GPU 上运行的 SaberLDA(120M 词元/秒)。
  • CuLDA_CGS 在多 GPU 上表现出高效的可扩展性,在四张 GPU 上相比单 GPU 实现了 2.99 倍的加速,展现出强大的多 GPU 可扩展性。
  • 该系统在不同 GPU 架构(包括 Volta 和 Pascal)上均保持高性能,表明其具备良好的跨平台可移植性和优化能力。
  • 通过数据压缩和子表达式重用最小化内存占用,CuLDA_CGS 有效减轻了内存带宽压力,使其效率高于缓存优化的 CPU 解决方案。
  • CuLDA_CGS 的性能优势归因于其对 GPU 内存带宽的高效利用和较低的同步开销,优于受限于网络的分布式 LDA 系统。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。