arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1804.01698cs.DC
收藏

基于英特尔KNL和多核架构的高性能稀疏矩阵-矩阵产品

High-performance sparse matrix-matrix products on Intel KNL and multicore architectures

Yusuke Nagasaka, Satoshi Matsuoka, Ariful Azad, Aydın Buluç

摘要:

稀疏矩阵-矩阵乘法(SpGEMM)是一种计算原语,广泛应用于从传统数值应用到最近的大数据分析和机器学习等领域。虽然已经提出了许多SpGEMM算法,但缺乏针对多核和众核处理器的硬件特定优化,并且无法详细分析其在各种用例和矩阵下的性能。我们首先在英特尔至强融核(Knights Landing或KNL)上识别并缓解存储管理和线程调度的多个瓶颈。具体针对多核和众核处理器,我们开发了一个基于哈希表的算法,并优化了一个基于堆的共享内存SpGEMM算法。我们研究他们的表现与其他公开可用的代码。与文献不同的是,我们的评估还包括代表实数图算法的用例,例如多源广度优先搜索或三角形计数。在大多数情况下,我们的哈希表和基于堆的算法显示出来自库的显著加速,而不同的算法在具有不同矩阵大小、稀疏性、压缩因子和操作类型的其他场景中占主导地位。我们总结了深入的评估结果,并制定了一个食谱,以给出最好的SpGEMM算法的目标场景。一个关键的发现是,如果不需要在输出矩阵的每一行中对非零进行排序,则基于哈希表的SpGEMM的性能将得到显着提升。

英文摘要:

Sparse matrix-matrix multiplication (SpGEMM) is a computational primitive that is widely used in areas ranging from traditional numerical applications to recent big data analysis and machine learning. Although many SpGEMM algorithms have been proposed, hardware specific optimizations for multi- and many-core processors are lacking and a detailed analysis of their performance under various use cases and matrices is not available. We firstly identify and mitigate multiple bottlenecks with memory management and thread scheduling on Intel Xeon Phi (Knights Landing or KNL). Specifically targeting multi- and many-core processors, we develop a hash-table-based algorithm and optimize a heap-based shared-memory SpGEMM algorithm. We examine their performance together with other publicly available codes. Different from the literature, our evaluation also includes use cases that are representative of real graph algorithms, such as multi-source breadth-first search or triangle counting. Our hash-table and heap-based algorithms are showing significant speedups from libraries in the majority of the cases while different algorithms dominate the other scenarios with different matrix size, sparsity, compression factor and operation type. We wrap up in-depth evaluation results and make a recipe to give the best SpGEMM algorithm for target scenario. A critical finding is that hash-table-based SpGEMM gets a significant performance boost if the nonzeros are not required to be sorted within each row of the output matrix.

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

↑