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

分布式GPU上的批处理矩阵运算及其在理论物理中的应用

Batched matrix operations on distributed GPUs with application in theoretical physics

Nenad Mijić, Davor Davidović

摘要:

矩阵-矩阵乘法(GEMM)是许多线性代数函数中最重要和最常用的运算之一,它也是许多科学代码获得高性能的关键组成部分。它是一个计算密集型函数,需要$O(n^3)$操作,其高计算强度使其非常适合使用GPU进行显著加速。今天,许多研究问题需要解决大量相对较小的GEMM操作,这些操作无法利用整个GPU。为了克服这个瓶颈,开发了特殊的函数,将多个GEMM操作打包成一个,然后在GPU上同时计算它们,这被称为批处理操作。在这项研究工作中,我们提出了一种不同的方法,基于链接多个GEMM操作到MPI行列,然后绑定多个MPI行列到一个GPU。为了提高GPU利用率,增加了更多的MPI秩(即GEMM操作)。我们在理论物理领域实现并测试了这种方法,通过模拟退火蒙特卡罗模拟量子自旋链来计算纠缠特性。对于特定的用例,我们能够模拟更大的自旋系统,并实现了高达$35\times$的速度提升,与仅使用并行CPU的版本相比。

英文摘要:

One of the most important and commonly used operations in many linear algebra functions is matrix-matrix multiplication (GEMM), which is also a key component in obtaining high performance of many scientific codes. It is a computationally intensive function requiring $O(n^3)$ operations, and its high computational intensity makes it well-suited to be significantly accelerated with GPUs. Today, many research problems require solving a very large number of relatively small GEMM operations that cannot utilise the entire GPU. To overcome this bottleneck, special functions have been developed that pack several GEMM operations into one and then compute them simultaneously on a GPU, which is called a batch operation. In this research work, we have proposed a different approach based on linking multiple GEMM operations to MPI ranks and then binding multiple MPI ranks to a single GPU. To increase GPU utilisation, more MPI ranks (i.e. GEMM operations) are added. We implement and test this approach in the field of theoretical physics to compute entanglement properties through simulated annealing Monte Carlo simulation of quantum spin chains. For the specific use case, we were able to simulate a much larger spin system and achieve a speed-up of up to $35\times$ compared to the parallel CPU-only version.

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

↑