利用动态稀疏矩阵实现可移植线性代数运算
Exploiting dynamic sparse matrices for performance portable linear algebra operations
摘要:
稀疏矩阵和线性代数是科学模拟的核心。多年来,已经开发了70多种稀疏矩阵存储格式,针对各种硬件架构和矩阵类型。每种格式都是为了利用架构的特定优势或矩阵的特定稀疏模式而开发的,选择正确的格式对于实现最佳性能至关重要。动态稀疏矩阵的采用可以改变底层数据结构以匹配运行时的计算,而不会引入过高的开销,具有通过动态格式选择优化性能的潜力。在本文中,我们介绍Morpheus,一个库,提供了一个有效的抽象动态稀疏矩阵。采用动态矩阵的目的是提高开发人员和最终用户的生产力,他们不需要知道和理解不同格式的实现细节,但仍然希望利用优化机会来提高其应用程序的性能。我们证明,通过将HPCG移植到Morpheus,并且无需进一步的代码更改,1)HPCG现在可以针对异构环境,2)通过在每个MPI进程上运行时选择最佳格式,SpMV内核的性能在CPU和GPU上分别提高了2.5倍和7倍。
英文摘要:
Sparse matrices and linear algebra are at the heart of scientific simulations. More than 70 sparse matrix storage formats have been developed over the years, targeting a wide range of hardware architectures and matrix types. Each format is developed to exploit the particular strengths of an architecture, or the specific sparsity patterns of matrices, and the choice of the right format can be crucial in order to achieve optimal performance. The adoption of dynamic sparse matrices that can change the underlying data-structure to match the computation at runtime without introducing prohibitive overheads has the potential of optimizing performance through dynamic format selection. In this paper, we introduce Morpheus, a library that provides an efficient abstraction for dynamic sparse matrices. The adoption of dynamic matrices aims to improve the productivity of developers and end-users who do not need to know and understand the implementation specifics of the different formats available, but still want to take advantage of the optimization opportunity to improve the performance of their applications. We demonstrate that by porting HPCG to use Morpheus, and without further code changes, 1) HPCG can now target heterogeneous environments and 2) the performance of the SpMV kernel is improved up to 2.5x and 7x on CPUs and GPUs respectively, through runtime selection of the best format on each MPI process.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。