arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1205.1098cs.MScs.PFcs.PL
收藏

高性能矩阵代数的可靠生成

Reliable Generation of High-Performance Matrix Algebra

Geoffrey Belter, Elizabeth Jessup, Thomas Nelson, Boyana Norris, Jeremy G. Siek

摘要:

科学程序员经常转向供应商调整的基本线性代数子程序(BLAS),以获得可移植的高性能。然而,许多数值算法需要几个BLAS调用顺序,这些连续的调用导致次优性能。整个序列需要协调一致地优化。程序员可以从Fortran或C的源代码开始,而不是供应商调优的BLAS(例如,基于Netlib BLAS),并使用最先进的优化编译器。然而,我们的实验表明,优化编译器往往只能达到手工优化代码的四分之一的性能。在本文中,我们提出了一个特定于域的矩阵代数编译器,建立订单BLAS(BTO),可靠地实现高性能,使用可扩展的搜索算法选择最佳组合的循环融合,数组收缩,多线程的数据并行。BTO编译器生成的代码比手工优化的代码慢16%到39%。

英文摘要:

Scientific programmers often turn to vendor-tuned Basic Linear Algebra Subprograms (BLAS) to obtain portable high performance. However, many numerical algorithms require several BLAS calls in sequence, and those successive calls result in suboptimal performance. The entire sequence needs to be optimized in concert. Instead of vendor-tuned BLAS, a programmer could start with source code in Fortran or C (e.g., based on the Netlib BLAS) and use a state-of-the-art optimizing compiler. However, our experiments show that optimizing compilers often attain only one-quarter the performance of hand-optimized code. In this paper we present a domain-specific compiler for matrix algebra, the Build to Order BLAS (BTO), that reliably achieves high performance using a scalable search algorithm for choosing the best combination of loop fusion, array contraction, and multithreading for data parallelism. The BTO compiler generates code that is between 16% slower and 39% faster than hand-optimized code.

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

↑