基于FPGA的电子排斥积分的计算与压缩
Computing and Compressing Electron Repulsion Integrals on FPGAs
摘要:
高斯型轨道上电子排斥积分的计算是基于量子力学的原子模拟中一个具有挑战性的问题。在实际模拟中,每个时间步长可能需要计算数万亿个ERI。在这项工作中,我们调查FPGA作为加速器的ERI计算。我们在英特尔oneAPI工具流程中使用模板参数,根据轨道为256种不同的ERI四重态类创建定制设计。为了最大限度地提高数据重用率,所有中间数据都缓冲在FPGA片内存储器中,并采用定制布局。中间体的预先计算也有助于克服多维递归关系引起的数据依赖。所涉及的循环结构被部分甚至完全展开,以实现FPGA内核的高吞吐量。此外,利用任意位宽整数的有损压缩算法集成在FPGA内核中。据我们所知,这是第一个在FPGA上进行ERI计算的工作,它支持的不仅仅是最基本的四元组类。此外,ERI计算和压缩的集成是一个新奇的东西,到目前为止,CPU或GPU库甚至还没有涵盖。我们的评估表明,使用16位整数进行ERI压缩,最快的FPGA内核在一个Intel Stratix 10 GX 2800 FPGA上的性能超过10个GERIS(每秒$10 \times 10^9$ ERI),最大绝对误差约为$10^{-7}$ - $10^{-5}$ Hartree。测量的吞吐量可以准确地解释的性能模型。部署在2个FPGA上的FPGA内核,在采用相同处理技术的40个Xeon Gold 6148 CPU内核的双插槽服务器上使用广泛使用的libint参考进行类似计算时,性能最高可达6.0倍,在采用128个EPYC 7713 CPU内核的新双插槽服务器上性能最高可达1.9倍。
英文摘要:
The computation of electron repulsion integrals (ERIs) over Gaussian-type orbitals (GTOs) is a challenging problem in quantum-mechanics-based atomistic simulations. In practical simulations, several trillions of ERIs may have to be computed for every time step. In this work, we investigate FPGAs as accelerators for the ERI computation. We use template parameters, here within the Intel oneAPI tool flow, to create customized designs for 256 different ERI quartet classes, based on their orbitals. To maximize data reuse, all intermediates are buffered in FPGA on-chip memory with customized layout. The pre-calculation of intermediates also helps to overcome data dependencies caused by multi-dimensional recurrence relations. The involved loop structures are partially or even fully unrolled for high throughput of FPGA kernels. Furthermore, a lossy compression algorithm utilizing arbitrary bitwidth integers is integrated in the FPGA kernels. To our best knowledge, this is the first work on ERI computation on FPGAs that supports more than just the single most basic quartet class. Also, the integration of ERI computation and compression it a novelty that is not even covered by CPU or GPU libraries so far. Our evaluation shows that using 16-bit integer for the ERI compression, the fastest FPGA kernels exceed the performance of 10 GERIS ($10 \times 10^9$ ERIs per second) on one Intel Stratix 10 GX 2800 FPGA, with maximum absolute errors around $10^{-7}$ - $10^{-5}$ Hartree. The measured throughput can be accurately explained by a performance model. The FPGA kernels deployed on 2 FPGAs outperform similar computations using the widely used libint reference on a two-socket server with 40 Xeon Gold 6148 CPU cores of the same process technology by factors up to 6.0x and on a new two-socket server with 128 EPYC 7713 CPU cores by up to 1.9x.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。