Program generation for small-scale linear algebra applications

Program generation for small-scale linear algebra applications
复制标题

DOI:
10.1145/3168812
复制
发表时间:
2018-02
期刊:
Proceedings of the 2018 International Symposium on Code Generation and Optimization
影响因子:
--
通讯作者:
Daniele G. Spampinato;Diego Fabregat-Traver;P. Bientinesi;Markus Püschel
Daniele G. Spampinato;Diego Fabregat-Traver;P. Bientinesi;Markus Püschel
中科院分区:
其他
文献类型:
--
作者:
Daniele G. Spampinato;Diego Fabregat-Traver;P. Bientinesi;Markus Püschel

文献摘要

被引文献

相似文献

本文介绍了一个线性代数程序生成系统SLinGen。SLinGen的输入是用我们定义的线性代数启发语言(LA)数学表示的应用程序。LA提供基本的标量/向量/矩阵加法/乘法和更高级别的运算,包括线性系统解算器、Cholesky和LU分解。SLinGen的输出是经过性能优化的单源C代码,可以选择使用内部函数向量化。SLinGen的目标是在固定大小的操作数上进行小规模计算,对于这种计算,使用优化库(例如,BLAS或LAPACK)的直接实现已知会产生次优的性能(除了增加代码大小和引入相关性),但这在控制、信号处理、计算机视觉和其他领域是至关重要的。在内部,SLinGen使用合成和基于DSL的技术在高抽象级别进行优化。我们对我们的程序生成器进行了三个典型应用的基准测试:卡尔曼滤波、高斯过程回归和L1分析凸求解器,以及包括Cholesky因式分解和连续时间Lyapunov和Sylvester方程的求解器在内的基本例程。结果表明,与使用英特尔ICC的直接C语言、使用多面体优化器的CLANG以及基于库和基于模板的实现相比,速度有显著提高。
We present SLinGen, a program generation system for linear algebra. The input to SLinGen is an application expressed mathematically in a linear-algebra-inspired language (LA) that we define. LA provides basic scalar/vector/matrix additions/multiplications and higher level operations including linear systems solvers, Cholesky and LU factorizations. The output of SLinGen is performance-optimized single-source C code, optionally vectorized with intrinsics. The target of SLinGen are small-scale computations on fixed-size operands, for which a straightforward implementation using optimized libraries (e.g., BLAS or LAPACK) is known to yield suboptimal performance (besides increasing code size and introducing dependencies), but which are crucial in control, signal processing, computer vision, and other domains. Internally, SLinGen uses synthesis and DSL-based techniques to optimize at a high level of abstraction. We benchmark our program generator on three prototypical applications: the Kalman filter, Gaussian process regression, and an L1-analysis convex solver, as well as basic routines including Cholesky factorization and solvers for the continuous-time Lyapunov and Sylvester equations. The results show significant speed-ups compared to straightforward C with Intel icc and clang with a polyhedral optimizer, as well as library-based and template-based implementations.