arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2303.05098cs.LGcs.DCcs.NAcs.PFmath.NA
收藏

通过自动格式选择和机器学习优化稀疏线性代数

Optimizing Sparse Linear Algebra Through Automatic Format Selection and Machine Learning

EPCC, The University of Edinburgh(爱丁堡大学EPCC)

Christodoulos Stylianou, Michele Weiland

摘要:

稀疏矩阵是科学模拟的一个组成部分。随着硬件的发展,提出了新的稀疏矩阵存储格式,旨在利用特定于新硬件的优化。在异构计算时代,用户通常需要为其应用程序使用多种格式,以便在不同的可用硬件上保持最佳状态,从而导致更长的开发时间和维护开销。这个问题的潜在解决方案是使用由机器学习(ML)驱动的轻量级自动调谐器,其将从可用格式池中为用户选择将匹配稀疏模式、目标硬件和要执行的操作的特性的最佳格式。在本文中,我们介绍了Morpheus-Oracle,它提供了一个轻量级的ML自动调谐器,能够准确预测多个后端的最佳格式,针对主要的HPC架构,旨在消除最终用户输入的任何格式选择。从2000多个实际矩阵中,我们在现有系统中分别实现了92.63%和80.22%的平均分类准确率和平衡准确率。自动调谐器的采用导致CPU上的平均加速1.1倍,NVIDIA和AMD GPU上的平均加速1.5倍至8倍,最大加速分别达到7倍和1000倍。

英文摘要:

Sparse matrices are an integral part of scientific simulations. As hardware evolves new sparse matrix storage formats are proposed aiming to exploit optimizations specific to the new hardware. In the era of heterogeneous computing, users often are required to use multiple formats for their applications to remain optimal across the different available hardware, resulting in larger development times and maintenance overhead. A potential solution to this problem is the use of a lightweight auto-tuner driven by Machine Learning (ML) that would select for the user an optimal format from a pool of available formats that will match the characteristics of the sparsity pattern, target hardware and operation to execute. In this paper, we introduce Morpheus-Oracle, a library that provides a lightweight ML auto-tuner capable of accurately predicting the optimal format across multiple backends, targeting the major HPC architectures aiming to eliminate any format selection input by the end-user. From more than 2000 real-life matrices, we achieve an average classification accuracy and balanced accuracy of 92.63% and 80.22% respectively across the available systems. The adoption of the auto-tuner results in average speedup of 1.1x on CPUs and 1.5x to 8x on NVIDIA and AMD GPUs, with maximum speedups reaching up to 7x and 1000x respectively.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑