Terra: A Multi-Stage Language for High-Performance Computing

被引:46
作者
DeVito, Zachary [1 ]
Hegarty, James [1 ]
Aiken, Alex [1 ]
Hanrahan, Pat [1 ]
Vitek, Jan [2 ]
机构
[1] Stanford Univ, Stanford, CA 94305 USA
[2] Purdue Univ, W Lafayette, IN 47907 USA
关键词
Design; Performance; Lua; Staged computation; DSL;
D O I
10.1145/2499370.2462166
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
High-performance computing applications, such as auto-tuners and domain-specific languages, rely on generative programming techniques to achieve high performance and portability. However, these systems are often implemented in multiple disparate languages and perform code generation in a separate process from program execution, making certain optimizations difficult to engineer. We leverage a popular scripting language, Lua, to stage the execution of a novel low-level language, Terra. Users can implement optimizations in the high-level language, and use built-in constructs to generate and execute high-performance Terra code. To simplify meta-programming, Lua and Terra share the same lexical environment, but, to ensure performance, Terra code can execute independently of Lua's runtime. We evaluate our design by reimplementing existing multi-language systems entirely in Terra. Our Terra-based auto-tuner for BLAS routines performs within 20% of ATLAS, and our DSL for stencil computations runs 2.3x faster than hand-written C.
引用
收藏
页码:105 / 115
页数:11
相关论文
共 32 条
[1]  
[Anonymous], PPOPP
[2]  
[Anonymous], PACT
[3]  
[Anonymous], PPOPP
[4]  
[Anonymous], 2011, SC
[5]  
[Anonymous], 2004, CGO
[6]  
Bawden A., 1988, LFP
[7]   Cython: The Best of Both Worlds [J].
Behnel, Stefan ;
Bradshaw, Robert ;
Citro, Craig ;
Dalcin, Lisandro ;
Seljebotn, Dag Sverre ;
Smith, Kurt .
COMPUTING IN SCIENCE & ENGINEERING, 2011, 13 (02) :31-39
[9]  
Cohen A., 2004, METAOCAML WORKSH
[10]   Implicitly heterogeneous multi-stage programming [J].
Eckhardt, Jason. ;
Kaiabachev, Roumen ;
Pasalic, Emir ;
Swadi, Kedar ;
Taha, Walid .
NEW GENERATION COMPUTING, 2007, 25 (03) :305-336