[论文解读] A unified sparse matrix data format for modern processors with wide SIMD units
本文提出 SELL-C-σ,一种专为具备宽 SIMD 单元的现代处理器优化的统一稀疏矩阵格式。通过结合通用 GPU 计算与向量计算的思想,该格式在多种硬件(Intel Sandy Bridge、Xeon Phi、Tesla K20)和矩阵上均实现了高性能,通过高效的内存访问与 SIMD 利用率超越了 CRS 和 ELLPACK,其两个可调参数实现了与硬件无关的高效性。
Sparse matrix-vector multiplication (spMVM) is the most time-consuming kernel in many numerical algorithms and has been studied extensively on all modern processor and accelerator architectures. However, the optimal sparse matrix data storage format is highly hardware-specific, which could become an obstacle when using heterogeneous systems. Also, it is as yet unclear how the wide single instruction multiple data (SIMD) units in current multiand many-core processors should be used most efficiently if there is no structure in the sparsity pattern of the matrix. We suggest SELL-C-σ, a variant of Sliced ELLPACK, as a SIMD-friendly data format which combines long-standing ideas from General Purpose Graphics Processing Units (GPGPUs) and vector computer programming. We discuss the advantages of SELL-C-σ compared to established formats like Compressed Row Storage (CRS) and ELLPACK and show its suitability on a variety of hardware platforms (Intel Sandy Bridge, Intel Xeon Phi and Nvidia Tesla K20) for a wide range of test matrices from different application areas. Using appropriate performance models we develop deep insight into the data transfer properties of the SELL-C-σ spMVM kernel. SELL-C-σ comes with two tuning parameters whose performance impact across the range of test matrices is studied and for which reasonable choices are proposed. This leads to a hardware-independent (“catch-all”) sparse matrix format, which achieves very high efficiency for all test matrices across all hardware platforms.
研究动机与目标
- 解决异构计算环境中硬件特定最优稀疏矩阵格式的挑战。
- 提升现代多核与众核处理器(具备宽 SIMD 单元)上稀疏矩阵-向量乘法(spMVM)的性能。
- 开发一种与硬件无关的稀疏矩阵格式,使其在不同稀疏模式与架构下均保持高效。
- 优化数据布局,以实现不规则稀疏模式下的高效内存访问与 SIMD 指令完全利用。
- 提供一种统一格式,融合 CRS 与 ELLPACK 等现有格式的优势,同时克服其在现代硬件上的局限性。
提出的方法
- 提出 SELL-C-σ,即切片 ELLPACK 的变体,专为现代处理器上的高效 SIMD 执行而设计。
- 将矩阵数据组织为固定宽度行的切片,以实现内存访问的连续性并最大化 SIMD 指令级并行性。
- 引入两个可调参数——切片宽度与每切片行数——以平衡负载与内存访问模式。
- 利用性能建模分析数据传输特性,并指导在不同硬件平台上的参数调优。
- 适配该格式,使其在多种架构(包括 Intel Sandy Bridge、Xeon Phi 和 Nvidia Tesla K20)上均能高效运行。
- 借鉴长期积累的 GPGPU 与向量计算原理,设计一种对不规则稀疏模式具有鲁棒性的格式。
实验结果
研究问题
- RQ1如何通过单一稀疏矩阵格式在具备宽 SIMD 单元的多种现代处理器架构上实现高性能?
- RQ2在不同矩阵与硬件上,SELL-C-σ 的两个调优参数应如何配置以最大化 spMVM 性能?
- RQ3SELL-C-σ 在内存访问效率与 SIMD 利用率方面相较于 CRS 与 ELLPACK 等成熟格式的提升程度如何?
- RQ4与硬件无关的稀疏矩阵格式是否能在广泛的真实世界矩阵(具有不同稀疏模式)上保持高效?
- RQ5SELL-C-σ 内核的数据传输特性在不同硬件平台与矩阵类型之间如何变化?
主要发现
- SELL-C-σ 在所有测试硬件平台(Intel Sandy Bridge、Xeon Phi 和 Nvidia Tesla K20)上均表现出高效率,展现出硬件独立性。
- 由于更优的内存访问模式与 SIMD 单元的完全利用,该格式在 spMVM 性能上优于 CRS 与 ELLPACK。
- SELL-C-σ 中的两个调优参数对性能有显著影响,合理的默认值可在多种矩阵上提供稳健的高效性。
- 性能建模表明,SELL-C-σ 最小化了数据传输开销,并在宽 SIMD 单元上最大化算术强度。
- 即使在传统格式表现不佳的不规则稀疏模式矩阵上,该格式仍能保持高效率。
- SELL-C-σ 通过将数据布局与 SIMD 执行模型对齐,使现代处理器实现接近峰值性能。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。