arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2207.07736cs.LG
收藏

深度强化学习中的数据汇集优化

Optimizing Data Collection in Deep Reinforcement Learning

University of Toronto(多伦多大学);Vector Institute(向量研究所)

James Gleeson, Daniel Snider, Yvonne Yang, Moshe Gabel, Eyal de Lara, Gennady Pekhimenko

摘要:

众所周知,强化学习(RL)工作负载需要很长的训练时间,因为在运行时从模拟器收集了大量的样本。不幸的是,集群扩展方法仍然昂贵,并且模拟器的常用CPU实现在GPU计算之间来回切换时会产生很高的开销。我们探索了两种优化方法,通过提高GPU利用率来提高RL数据汇集效率:(1)GPU矢量化:在GPU上并行化模拟以提高硬件并行性,以及(2)模拟器内核融合:融合多个模拟步骤以在单个GPU中运行内核启动以降低全局内存带宽需求。我们发现,GPU矢量化可以实现高达$1024\times$加速比常用的CPU模拟器。我们分析了不同实现的性能,并表明对于一个简单的模拟器,GPU矢量化的ML编译器实现(XLA)通过减少重复Python到DL后端API调用的CPU开销,通过$13.4\times$优于DNN框架(PyTorch)。我们发现,模拟器内核融合加速与一个简单的模拟器$11.3\times$和增加高达$1024\times$作为模拟器的复杂性增加方面的内存带宽的要求。我们表明,从模拟器内核融合的加速是正交的,并与GPU矢量化相结合,导致乘法加速。

英文摘要:

Reinforcement learning (RL) workloads take a notoriously long time to train due to the large number of samples collected at run-time from simulators. Unfortunately, cluster scale-up approaches remain expensive, and commonly used CPU implementations of simulators induce high overhead when switching back and forth between GPU computations. We explore two optimizations that increase RL data collection efficiency by increasing GPU utilization: (1) GPU vectorization: parallelizing simulation on the GPU for increased hardware parallelism, and (2) simulator kernel fusion: fusing multiple simulation steps to run in a single GPU kernel launch to reduce global memory bandwidth requirements. We find that GPU vectorization can achieve up to $1024\times$ speedup over commonly used CPU simulators. We profile the performance of different implementations and show that for a simple simulator, ML compiler implementations (XLA) of GPU vectorization outperform a DNN framework (PyTorch) by $13.4\times$ by reducing CPU overhead from repeated Python to DL backend API calls. We show that simulator kernel fusion speedups with a simple simulator are $11.3\times$ and increase by up to $1024\times$ as simulator complexity increases in terms of memory bandwidth requirements. We show that the speedups from simulator kernel fusion are orthogonal and combinable with GPU vectorization, leading to a multiplicative speedup.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑