[Paper Review] ECM modeling and performance tuning of SpMV and Lattice QCD on A64FX
This paper presents an Execution-Cache-Memory (ECM) performance model to analyze and optimize sparse matrix-vector multiplication (SpMV) and lattice QCD domain wall kernels on the A64FX processor. By leveraging architectural insights and compiler tuning, the authors demonstrate that the SELL-C-σ format achieves memory bandwidth saturation in SpMV, while optimized data layouts improve cache reuse and energy efficiency in QCD kernels, enabling the A64FX to outperform Intel Cascade Lake AP by 2x and match NVIDIA V100 performance in memory-bound workloads.
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.
Motivation & Objective
- To understand the performance characteristics of the A64FX CPU, a high-bandwidth Arm-based processor, for HPC workloads.
- To identify architectural peculiarities and optimization opportunities in the A64FX's cache hierarchy, memory bandwidth, and power management features.
- To develop and validate an Execution-Cache-Memory (ECM) performance model for single-core steady-state loops on A64FX.
- To optimize SpMV and lattice QCD domain wall kernels using ECM modeling, focusing on data layout and compiler tuning.
- To compare A64FX performance and energy efficiency against state-of-the-art Intel Cascade Lake AP and NVIDIA V100 systems.
Proposed method
- Developed an Execution-Cache-Memory (ECM) performance model to analyze single-core performance contributions on A64FX.
- Conducted a detailed architectural analysis of the A64FX, including SVE vector units, out-of-order execution, sector cache, and hardware barrier features.
- Validated the ECM model using streaming kernels to ensure accuracy in predicting memory bandwidth and cache behavior.
- Applied the ECM model to SpMV, evaluating CRS vs. SELL-C-σ matrix formats and identifying bandwidth saturation with SELL-C-σ.
- Analyzed the lattice QCD domain wall kernel with cache-reuse modeling, testing data layouts (e.g., split RRII) to reduce port pressure.
- Explored power tuning knobs on Fugaku to achieve energy savings without performance loss, using compiler and data layout optimization.
Experimental results
Research questions
- RQ1How does the A64FX’s memory hierarchy and high bandwidth (800+ GB/s) affect performance in memory-bound kernels like SpMV and lattice QCD?
- RQ2Why is the standard CRS format inefficient for SpMV on A64FX, and what data format (e.g., SELL-C-σ) enables memory bandwidth saturation?
- RQ3How do data layout choices impact cache reuse and memory port pressure in the lattice QCD domain wall kernel?
- RQ4To what extent can power tuning knobs on the Fugaku system reduce energy consumption without sacrificing performance?
- RQ5How does the A64FX compare in performance and energy efficiency to Intel Cascade Lake AP and NVIDIA V100 for memory-bound HPC workloads?
Key findings
- The SELL-C-σ matrix format achieves memory bandwidth saturation in SpMV on A64FX, outperforming the standard CRS format due to better data access patterns.
- The A64FX achieves a 2x performance speedup over Intel Cascade Lake AP for large, memory-bound SpMV datasets and matches NVIDIA V100 performance.
- A split RRII data layout for complex arrays in the lattice QCD domain wall kernel reduces port pressure and improves energy efficiency by nearly 20%.
- Compiler optimization quality is suboptimal for A64FX; both GCC and FCC fail to generate efficient code, highlighting the need for targeted tuning.
- Power tuning via system knobs reduces energy consumption by 31% for SpMV and 18% for the domain wall kernel, with minimal performance impact.
- The ECM model successfully identifies performance bottlenecks and guides effective optimization strategies for both memory-bound and compute-bound kernels on A64FX.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.