[论文解读] ECM modeling and performance tuning of SpMV and Lattice QCD on A64FX
本论文提出了一种执行-缓存-内存(ECM)性能模型,用于分析和优化A64FX处理器上的稀疏矩阵-向量乘法(SpMV)与格点QCD域墙核函数。通过利用架构洞察与编译器调优,作者证明SLL-C-σ格式在SpMV中实现了内存带宽饱和,而优化的数据布局则提升了QCD核函数的缓存重用率与能效,使A64FX在性能上比Intel Cascade Lake AP快2倍,并在内存带宽受限的工作负载中达到NVIDIA V100的性能水平。
The A64FX CPU is arguably the most powerful Arm-based processor design to date. Although it is a traditional cache-based multicore processor, its peak performance and memory bandwidth rival accelerator devices. A good understanding of its performance features is of paramount importance for developers who wish to leverage its full potential. We present an architectural analysis of the A64FX used in the Fujitsu FX1000 supercomputer at a level of detail that allows for the construction of Execution-Cache-Memory (ECM) performance models for steady-state loops. In the process we identify architectural peculiarities that point to viable generic optimization strategies. After validating the model using simple streaming loops we apply the insight gained to sparse matrix-vector multiplication (SpMV) and the domain wall (DW) kernel from quantum chromodynamics (QCD). For SpMV we show why the CRS matrix storage format is not a good practical choice on this architecture and how the SELL-C-sigma format can achieve bandwidth saturation. For the DW kernel we provide a cache-reuse analysis and show how an appropriate choice of data layout for complex arrays can realize memory-bandwidth saturation in this case as well. A comparison with state-of-the-art high-end Intel Cascade Lake AP and Nvidia V100 systems puts the capabilities of the A64FX into perspective. We also explore the potential for power optimizations using the tuning knobs provided by the Fugaku system, achieving energy savings of about 31% for SpMV and 18% for DW.
研究动机与目标
- 理解A64FX CPU(一种高带宽Arm架构处理器)在高性能计算(HPC)工作负载中的性能特征。
- 识别A64FX缓存层次结构、内存带宽与功耗管理特性中的架构特异点及优化机会。
- 开发并验证一种用于A64FX单核稳定状态循环的执行-缓存-内存(ECM)性能模型。
- 利用ECM建模优化SpMV与格点QCD域墙核函数,重点聚焦于数据布局与编译器调优。
- 将A64FX在性能与能效方面与最先进的Intel Cascade Lake AP与NVIDIA V100系统进行对比。
提出的方法
- 开发了执行-缓存-内存(ECM)性能模型,用于分析A64FX上单核性能的贡献因素。
- 对A64FX进行了详细的架构分析,包括SVE向量单元、乱序执行、扇区缓存与硬件屏障功能。
- 通过流式内核验证ECM模型,确保其在预测内存带宽与缓存行为方面的准确性。
- 将ECM模型应用于SpMV,对比CRS与SELL-C-σ矩阵格式,识别出SLL-C-σ可实现带宽饱和。
- 通过缓存重用建模分析格点QCD域墙核函数,测试不同数据布局(如拆分RRII)以减轻端口压力。
- 探索Fugaku系统上的功耗调优控制参数,通过编译器与数据布局优化实现能效降低而性能无损。
实验结果
研究问题
- RQ1A64FX的内存层次结构与高达800+ GB/s的高带宽如何影响内存带宽受限内核(如SpMV与格点QCD)的性能?
- RQ2为何标准CRS格式在A64FX上对SpMV效率低下?何种数据格式(如SLL-C-σ)可实现内存带宽饱和?
- RQ3在格点QCD域墙核函数中,数据布局选择如何影响缓存重用率与内存端口压力?
- RQ4Fugaku系统上的功耗调优控制参数在多大程度上可降低能耗而不损失性能?
- RQ5在内存带宽受限的HPC工作负载中,A64FX与Intel Cascade Lake AP及NVIDIA V100相比,在性能与能效方面表现如何?
主要发现
- SLL-C-σ矩阵格式在A64FX上实现SpMV的内存带宽饱和,相较于标准CRS格式因更优的数据访问模式而表现更优。
- A64FX在大规模内存带宽受限的SpMV数据集上相较Intel Cascade Lake AP实现2倍性能提升,并与NVIDIA V100性能持平。
- 格点QCD域墙核函数中,对复数数组采用拆分RRII数据布局可降低端口压力,并将能效提升近20%。
- A64FX的编译器优化质量欠佳;GCC与FCC均未能生成高效代码,凸显了针对性调优的必要性。
- 通过系统级功耗调优控制参数,SpMV能耗降低31%,域墙核函数能耗降低18%,且性能损失可忽略。
- ECM模型成功识别出性能瓶颈,并有效指导了A64FX上内存带宽受限与计算带宽受限内核的优化策略。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。