高效线性代数程序的自动生成
Automatic Generation of Efficient Linear Algebra Programs
摘要:
应用程序专家推理线性代数计算的抽象级别与高性能数值线性代数库开发人员使用的抽象级别不匹配。前者可以方便地被高级语言和库(如Matlab和Eigen)捕获,而后者表示BLAS和LAPACK库中包含的内核。不幸的是,从高级计算到有效的内核序列的转换是一项任务,远非微不足道,需要广泛的线性代数和高性能计算知识。在内部,几乎所有的高级语言和库都使用有效的内核;然而,翻译算法过于简单,因此导致所述内核的次优使用,具有显著的性能损失。为了实现高级语言的生产力,并利用低级别内核的效率,我们正在开发Linnea,一个用于线性代数问题的代码生成器。作为输入,Linnea采用线性代数问题的高级描述,并生成对高性能内核的有效调用序列作为输出。在25个应用程序问题中,Linnea生成的代码始终优于Matlab,Julia,Eigen和Armadillo,加速高达并超过10倍。
英文摘要:
The level of abstraction at which application experts reason about linear algebra computations and the level of abstraction used by developers of high-performance numerical linear algebra libraries do not match. The former is conveniently captured by high-level languages and libraries such as Matlab and Eigen, while the latter expresses the kernels included in the BLAS and LAPACK libraries. Unfortunately, the translation from a high-level computation to an efficient sequence of kernels is a task, far from trivial, that requires extensive knowledge of both linear algebra and high-performance computing. Internally, almost all high-level languages and libraries use efficient kernels; however, the translation algorithms are too simplistic and thus lead to a suboptimal use of said kernels, with significant performance losses. In order to both achieve the productivity that comes with high-level languages, and make use of the efficiency of low level kernels, we are developing Linnea, a code generator for linear algebra problems. As input, Linnea takes a high-level description of a linear algebra problem and produces as output an efficient sequence of calls to high-performance kernels. In 25 application problems, the code generated by Linnea always outperforms Matlab, Julia, Eigen and Armadillo, with speedups up to and exceeding 10x.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。