Skip to main content
QUICK REVIEW

[论文解读] Optimizing Sparse Matrix-Vector Multiplication on Emerging Many-Core Architectures

Shizhao Chen, Jianbin Fang|arXiv (Cornell University)|May 29, 2018
Parallel Computing and Optimization Techniques参考文献 41被引用 6
一句话总结

本文提出了一种基于机器学习的框架,可自动为新兴的多核架构——英特尔至强融核(KNL)和基于ARM的FT-2000Plus(FTP)——选择最优的稀疏矩阵-向量乘法(SpMV)存储格式。通过在956个稀疏矩阵和五种存储格式上,基于9,500次性能分析运行进行离线模型训练,该系统在KNL和FTP上分别实现了最佳性能的95%和91%,且无任何运行时性能分析开销。

ABSTRACT

Sparse matrix vector multiplication (SpMV) is one of the most common operations in scientific and high-performance applications, and is often responsible for the application performance bottleneck. While the sparse matrix representation has a significant impact on the resulting application performance, choosing the right representation typically relies on expert knowledge and trial and error. This paper provides the first comprehensive study on the impact of sparse matrix representations on two emerging many-core architectures: the Intel's Knights Landing (KNL) XeonPhi and the ARM-based FT-2000Plus (FTP). Our large-scale experiments involved over 9,500 distinct profiling runs performed on 956 sparse datasets and five mainstream SpMV representations. We show that the best sparse matrix representation depends on the underlying architecture and the program input. To help developers to choose the optimal matrix representation, we employ machine learning to develop a predictive model. Our model is first trained offline using a set of training examples. The learned model can be used to predict the best matrix representation for any unseen input for a given architecture. We show that our model delivers on average 95% and 91% of the best available performance on KNL and FTP respectively, and it achieves this with no runtime profiling overhead.

研究动机与目标

  • 研究稀疏矩阵表示对两种新兴多核架构——英特尔至强融核(KNL)和FT-2000Plus(FTP)——的影响。
  • 确认最优SpMV表示法取决于底层架构和输入矩阵的稀疏模式。
  • 开发一种预测模型,可在无需运行时性能分析的前提下,为给定架构上的任意未见输入自动选择最优矩阵表示。
  • 通过轻量级、可部署的解决方案,实现在多种多核系统上自动、高性能的SpMV工作负载。
  • 为涉及稀疏矩阵的高性能计算(HPC)工作负载提供性能可移植性和优化的框架。

提出的方法

  • 在KNL和FTP架构上,对956个代表性稀疏数据集进行了大规模性能评估,共执行超过9,500次性能分析运行。
  • 评估了五种主流稀疏矩阵表示法:CSR、CSR5、ELL、SELL和HYB,测量其在不同稀疏模式和架构下的性能表现。
  • 提取了一组可量化的矩阵特征(如稀疏模式、非零元素分布、矩阵维度)作为机器学习模型的输入。
  • 利用这些特征及其对应的最佳表示选择结果,离线训练机器学习模型,以预测新输入的最佳格式。
  • 在运行时部署训练好的模型,以选择最优表示,且无需额外的性能分析或计算开销。
  • 采用一种可泛化至不同架构和矩阵的预测建模方法,实现无需源代码修改的即时部署。

实验结果

研究问题

  • RQ1不同的稀疏矩阵表示法在KNL和FTP等新兴多核架构上的SpMV性能表现如何?
  • RQ2影响KNL和FTP上SpMV表示法性能的关键架构因素和矩阵特定因素有哪些?
  • RQ3在代表性矩阵和架构数据集上训练的机器学习模型,能否准确预测未见输入的最优SpMV表示?
  • RQ4此类预测模型在KNL和FTP上无需运行时性能分析,能在多大程度上实现接近最优的性能?
  • RQ5在这些架构上,最优表示的性能如何随不同稀疏模式和矩阵规模而变化?

主要发现

  • SpMV的最优稀疏矩阵表示法在很大程度上取决于底层架构(KNL与FTP)以及输入矩阵的稀疏模式。
  • 表示选择错误会严重降低SpMV性能,凸显了自动化选择的必要性。
  • 所提出的机器学习模型在KNL上实现了未见输入下最佳性能的95%,在FTP上实现了91%。
  • 该模型实现了接近最优的性能,且无运行时性能分析开销,适用于生产环境部署。
  • 本研究首次对KNL和FTP上的SpMV表示性能进行了全面分析,揭示了架构特定的性能特征。
  • 该框架可立即部署,无需修改源代码,可无缝集成到现有HPC工作流中。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。