A Basic Linear Algebra Compiler

A Basic Linear Algebra Compiler
复制标题

基本线性代数编译器

DOI:
--
复制
发表时间:
2014
期刊:
IEEE/ACM International Symposium on Code Generation and Optimization
影响因子:
--
通讯作者:
Markus Püschel
Markus Püschel
中科院分区:
--
文献类型:
--
作者:
Daniele G. Spampinato;Markus Püschel

文献摘要

被引文献

相似文献

媒体处理、控制、图形和其他领域中的许多应用需要高效的小规模线性代数计算。然而,大多数现有的用于线性代数的高性能库,例如ATLAS或Intel MKL,更适合于大规模问题(数百或更大的矩阵大小)和特定接口(例如,BLAS)。在本文中,我们提出LGen:一个小规模的,基本的线性代数计算编译器。LGen的输入是一个固定大小的线性代数表达式;输出是一个相应的C函数,可选地包括内部函数,以有效地使用SIMD向量扩展。LGen使用两个级别的数学领域特定语言(DSL)生成代码。在生成最终代码之前,DSL用于在高抽象级别上执行平铺、循环融合和向量化。此外,搜索用于在替代的生成的实现中进行选择。我们展示了LGen生成的代码与英特尔MKL和IPP以及其他生成器(如基于C++模板的Eigen和BTO编译器)的基准测试。所实现的加速通常约为2到3倍。
Many applications in media processing, control, graphics, and other domains require efficient small-scale linear algebra computations. However, most existing high performance libraries for linear algebra, such as ATLAS or Intel MKL are more geared towards large-scale problems (matrix sizes in the hundreds and larger) and towards specific interfaces (e.g., BLAS). In this paper we present LGen: a compiler for small-scale, basic linear algebra computations. The input to LGen is a fixed-size linear algebra expression; the output is a corresponding C function optionally including intrinsics to efficiently use SIMD vector extensions. LGen generates code using two levels of mathematical domain-specific languages (DSLs). The DSLs are used to perform tiling, loop fusion, and vectorization at a high level of abstraction, before the final code is generated. In addition, search is used to select among alternative generated implementations. We show benchmarks of code generated by LGen against Intel MKL and IPP as well as against alternative generators, such as the C++ template-based Eigen and the BTO compiler. The achieved speed-up is typically about a factor of two to three.