arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1909.03947cs.LGcs.DCstat.ML
收藏

基于监督学习的并行线性代数算法调度优化

Scheduling optimization of parallel linear algebra algorithms using Supervised Learning

Polytechnique Montréal(蒙特利尔高等理工学院);Louisiana State University(路易斯安那州立大学)

G. Laberge, S. Shirzad, P. Diehl, H. Kaiser, S. Prudhomme, A. Lemoine

摘要:

线性代数算法在机器学习、数值物理和电子游戏图形学等领域有着广泛的应用。对于所有这些应用程序,需要循环级并行来实现高性能。然而,找到在线程之间调度工作负载的最佳方式是一个不平凡的问题,因为它取决于被并行化的算法的结构和可执行文件在其上运行的硬件。在异步多任务运行时系统的领域中,调度问题的一个关键方面是预测适当的块大小,其中块大小被定义为作为一个任务分配给线程的for循环的迭代次数。在本文中,我们研究的应用程序的监督学习模型预测块的大小,产生最大的性能在多个并行线性代数运算使用HPX后端的Blaze的线性代数库。更准确地说,我们通过测量应用程序的性能来生成训练集和测试集,这些应用程序具有不同的块大小,用于多个线性代数运算;向量加法,矩阵向量乘法,矩阵矩阵加法和矩阵矩阵乘法。我们比较使用逻辑回归,神经网络和决策树与新开发的决策树为基础的模型,以预测块大小的最佳值。我们的研究结果表明,经典的决策树和我们的自定义决策树模型能够预测块的大小,这导致线性代数运算的良好性能。

英文摘要:

Linear algebra algorithms are used widely in a variety of domains, e.g machine learning, numerical physics and video games graphics. For all these applications, loop-level parallelism is required to achieve high performance. However, finding the optimal way to schedule the workload between threads is a non-trivial problem because it depends on the structure of the algorithm being parallelized and the hardware the executable is run on. In the realm of Asynchronous Many Task runtime systems, a key aspect of the scheduling problem is predicting the proper chunk-size, where the chunk-size is defined as the number of iterations of a for-loop assigned to a thread as one task. In this paper, we study the applications of supervised learning models to predict the chunk-size which yields maximum performance on multiple parallel linear algebra operations using the HPX backend of Blaze's linear algebra library. More precisely, we generate our training and tests sets by measuring performance of the application with different chunk-sizes for multiple linear algebra operations; vector-addition, matrix-vector-multiplication, matrix-matrix addition and matrix-matrix-multiplication. We compare the use of logistic regression, neural networks and decision trees with a newly developed decision tree based model in order to predict the optimal value for chunk-size. Our results show that classical decision trees and our custom decision tree model are able to forecast a chunk-size which results in good performance for the linear algebra operations.

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

↑