提升 Matrix-Free HOSFEM 中矩阵-向量乘法的 Roofline 上限
Towards a Higher Roofline for Matrix-Vector Multiplication in Matrix-Free HOSFEM
AI总结:
针对无矩阵 HOSFEM 中几何因子导致的内存带宽瓶颈,提出首个低开销的几何因子即时重计算方案,结合 Tensor Core 等硬件感知优化,在 A100 等平台上实现最高 4.10x 加速。
摘要:
现代 GPGPU 提供了巨大的算术吞吐量,但许多科学计算内核仍受限于内存带宽。特别是,重复加载预计算的辅助数据浪费了大量计算资源,同时给内存层次结构带来压力。一种有前景的策略是用低成本的重新计算代替内存流量,从而缓解带宽压力,使应用能更好地利用异构计算单元。在此策略指导下,我们优化了高阶/谱有限元方法(HOSFEM),这是一种广泛用于求解偏微分方程的方法。其性能主要由 AxLocal 决定,这是一个用于单元局部矩阵-向量乘法的无矩阵内核。在 AxLocal 中,几何因子主导了内存访问,但对计算贡献极小,造成了限制性能 Roofline 上限的带宽瓶颈。为应对这一挑战,我们提出了针对三线性和平行六面体单元的几何因子的首个实用、低开销的即时重计算方案。这种重构减少了数据移动并提高了可达的 Roofline,揭示了张量收缩的未开发优化潜力。通过循环展开、Tensor Core 加速和常量内存利用等硬件感知技术,优化后的内核达到了 Roofline 效率的 85%-100%。与 Nek 系列中的最先进实现相比,它们在 NVIDIA A100 上实现了 1.74x-4.10x 的加速,在 Hygon K100 上实现了 1.99x-3.78x 的加速,在完整的 HOSFEM 基准测试中带来了 1.12x-1.40x 的提升。这些结果表明,结合算法重构和硬件特定调优可以消除长期存在的瓶颈,并充分发挥大规模高阶模拟的性能潜力。
英文摘要:
Modern GPGPUs provide massive arithmetic throughput, yet many scientific kernels remain limited by memory bandwidth. In particular, repeatedly loading precomputed auxiliary data wastes abundant compute resources while stressing the memory hierarchy. A promising strategy is to replace memory traffic with inexpensive recomputation, thereby alleviating bandwidth pressure and enabling applications to better exploit heterogeneous compute units. Guided by this strategy, we optimize the high-order/spectral finite element method (HOSFEM), a widely used approach for solving PDEs. Its performance is largely determined by AxLocal, a matrix-free kernel for element-local matrix-vector multiplications. In AxLocal, geometric factors dominate memory accesses while contributing minimally to computation, creating a bandwidth bottleneck that caps the performance roofline. To address this challenge, we propose the first practical, low-overhead on-the-fly recomputation of geometric factors for trilinear and parallelepiped elements. This reformulation reduces data movement and raises the achievable roofline, revealing untapped optimization potential for tensor contractions. With hardware-aware techniques including loop unrolling, Tensor Core acceleration, and constant memory utilization, the optimized kernels reach 85%-100% of the roofline efficiency. Compared with state-of-the-art implementations in the Nek series, they deliver speedups of 1.74x-4.10x on NVIDIA A100 and 1.99x-3.78x on Hygon K100, leading to a 1.12x-1.40x improvement in the full HOSFEM benchmark. These results demonstrate that combining algorithmic reformulation with hardware-specific tuning can remove long-standing bottlenecks and fully exploit the performance potential of large-scale high-order simulations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。