使用自适应并行加速深度神经网络引导的MCTS
Accelerating Deep Neural Network guided MCTS using Adaptive Parallelism
AI总结:
针对DNN-MCTS中CPU端搜索树运算串行导致的瓶颈问题,提出自适应选择最优并行方案及高效搜索通信批量大小的方法,在Alphazero棋类基准上实现1.5×-3×加速。
摘要:
深度神经网络引导的蒙特卡洛树搜索(DNN-MCTS)是一类功能强大的AI算法。在DNN-MCTS中,深度神经网络模型与动态蒙特卡洛搜索树协同训练,以引导智能体选择能产生最高回报的动作。尽管DNN运算具备高度可并行性,但MCTS涉及的搜索树运算是串行的,往往成为系统瓶颈。现有共享内存多核CPU平台上的MCTS并行方案,要么利用数据并行性却牺牲了内存访问延迟,要么借助本地缓存实现低延迟内存访问却将树搜索限制在单线程内。本研究分析了这些并行方案的权衡关系,并基于应用与硬件参数为两类并行方案构建了性能模型。我们提出一种新颖的实现方式,通过为CPU上的MCTS组件自适应选择最优并行方案来解决上述权衡问题。此外,针对CPU上的MCTS组件与卸载到加速器(GPU)的DNN运算对接的场景,我们提出了一种搜索最优通信批量大小的高效方法。我们使用具有代表性的DNN-MCTS算法——Alphazero在棋类基准测试上开展实验,结果表明该并行框架能够自适应生成性能最优的并行实现,在CPU与CPU-GPU平台上相比基线方法可实现1.5倍至3倍的加速比。
英文摘要:
Deep Neural Network guided Monte-Carlo Tree Search (DNN-MCTS) is a powerful class of AI algorithms. In DNN-MCTS, a Deep Neural Network model is trained collaboratively with a dynamic Monte-Carlo search tree to guide the agent towards actions that yields the highest returns. While the DNN operations are highly parallelizable, the search tree operations involved in MCTS are sequential and often become the system bottleneck. Existing MCTS parallel schemes on shared-memory multi-core CPU platforms either exploit data parallelism but sacrifice memory access latency, or take advantage of local cache for low-latency memory accesses but constrain the tree search to a single thread. In this work, we analyze the tradeoff of these parallel schemes and develop performance models for both parallel schemes based on the application and hardware parameters. We propose a novel implementation that addresses the tradeoff by adaptively choosing the optimal parallel scheme for the MCTS component on the CPU. Furthermore, we propose an efficient method for searching the optimal communication batch size as the MCTS component on the CPU interfaces with DNN operations offloaded to an accelerator (GPU). Using a representative DNN-MCTS algorithm - Alphazero on board game benchmarks, we show that the parallel framework is able to adaptively generate the best-performing parallel implementation, leading to a range of $1.5\times - 3\times$ speedup compared with the baseline methods on CPU and CPU-GPU platforms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。