矩阵-粒子-细胞:利用矩阵外积实现高性能粒子-细胞模拟
Matrix-PIC: Harnessing Matrix Outer-product for High-Performance Particle-in-Cell Simulations
AI总结:
MatrixPIC通过矩阵外积优化,实现PIC模拟在新兴CPU架构上的高性能加速,提升运行效率达2.63倍。
摘要:
粒子-细胞(PIC)模拟在执行时间中大部分用于粒子-网格相互作用,其中细粒度的原子更新成为传统多核CPU上的主要瓶颈。最近的CPU架构集成了专门的矩阵处理单元(MPUs),能够高效支持矩阵外积操作,为克服这一限制提供了新的机会。借助这一架构转变,本工作聚焦于在以矩阵为中心的执行模型下重新设计PIC模拟的当前沉积步骤。我们提出了MatrixPIC,这是首个针对现代CPU上的混合MPU-VPU SIMD模型,针对沉积内核、数据布局和增量粒子排序的全面协同设计。MatrixPIC引入:(i)当前沉积算法的块矩阵公式,能够自然映射到MPU外积原语;(ii)结合MPU基于高密度积累和VPU基于数据准备和控制流的混合执行流水线;(iii)基于间隔填充内存数组的O(1)摊还增量排序器,以保持数据局部性以实现高效的MPU执行。在下一代HPC平台上评估,MatrixPIC实现了显著的性能提升。在激光等离子体加速(LWFA)模拟中,其总运行时间达到2.63倍的加速。对于第三阶沉积,核心内核比基线加速8.7倍,比最佳手优化VPU实现加速2.0倍。此外,MatrixPIC达到83.08%的理论CPU峰值性能,几乎比数据中心GPU上的高度优化CUDA内核高2.8倍。这些结果证明了面向矩阵的协同设计在新兴CPU架构上加速PIC模拟的有效性。
英文摘要:
Particle-in-Cell (PIC) simulations spend most of their execution time on particle--grid interactions, where fine-grained atomic updates become a major bottleneck on traditional many-core CPUs. Recent CPU architectures integrate specialized Matrix Processing Units (MPUs) that efficiently support matrix outer-product operations, offering new opportunities to overcome this limitation. Leveraging this architectural shift, this work focuses on redesigning the current deposition step of PIC simulations under a matrix-centric execution model. We present MatrixPIC, the first holistic co-design of the deposition kernel, data layout, and incremental particle sorting tailored to the hybrid MPU--VPU SIMD model on modern CPUs. MatrixPIC introduces: (i)~a block-matrix formulation of the current deposition algorithm that maps naturally to MPU outer-product primitives; (ii)~a hybrid execution pipeline that combines MPU-based high-density accumulation with VPU-based data preparation and control flow; and (iii)~an $O(1)$-amortized incremental sorter based on a gapped packed-memory array to preserve data locality for efficient MPU execution. Evaluated on a next-generation HPC platform, MatrixPIC achieves significant performance gains. In Laser-Wakefield Acceleration (LWFA) simulations, it delivers up to $2.63\times$ speedup in total runtime. For third-order deposition, the core kernel is accelerated by $8.7\times$ over the baseline and $2.0\times$ over the best hand-optimized VPU implementation. Moreover, MatrixPIC reaches $83.08\%$ of theoretical CPU peak performance, nearly $2.8\times$ higher than a highly optimized CUDA kernel on a data center GPU. These results demonstrate the effectiveness of matrix-oriented co-design for accelerating PIC simulations on emerging CPU architectures.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。