PetaBricks: A Language and Compiler for Algorithmic Choice

被引:67
作者
Ansel, Jason [1 ]
Chan, Cy [1 ]
Wong, Yee Lok [1 ]
Olszewski, Marek [1 ]
Zhao, Qin [1 ]
Edelman, Alan [1 ]
Amarasinghe, Saman [1 ]
机构
[1] MIT, Comp Sci & Artificial Intelligence Lab, Cambridge, MA 02139 USA
来源
PLDI'09 PROCEEDINGS OF THE 2009 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION | 2009年
基金
美国国家科学基金会;
关键词
IMPLEMENTATION;
D O I
10.1145/1542476.1542481
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
It is often impossible to obtain a one-size-fits-all solution for high performance algorithms when considering different choices for data distributions, parallelism, transformations, and blocking. The best solution to these choices is often tightly coupled to different architectures, problem sizes, data, and available system resources. In some cases, completely different algorithms may provide the best performance. Current compiler and programming language techniques are able to change some of these parameters, but today there is no simple way for the programmer to express or the compiler to choose different algorithms to handle different parts of the data. Existing solutions normally can handle only coarse-grained, library level selections or hand coded cutoffs between base cases and recursive cases. We present PetaBricks, a new implicitly parallel language and compiler where having multiple implementations of multiple algorithms to solve a problem is the natural way of programming. We make algorithmic choice a first class construct of the language. Choices are provided in a way that also allows our compiler to tune at a finer granularity. The PetaBricks compiler autotunes programs by making both fine-grained as well as algorithmic choices. Choices also include different automatic parallelization techniques, data distributions, algorithmic parameters, transformations, and blocking. Additionally, we introduce novel techniques to autotune algorithms for different convergence criteria. When choosing between various direct and iterative methods, the PetaBricks compiler is able to tune a program in such a way that delivers near-optimal efficiency for any desired level of accuracy. The compiler has the flexibility of utilizing different convergence criteria for the various components within a single algorithm, providing the user with accuracy choice alongside algorithmic choice.
引用
收藏
页码:38 / 49
页数:12
相关论文
共 29 条
[1]  
Ali A., 2007, ICS '07: Proceedings of the 21st anjiual international conference on Supercomputing, P293
[2]  
Anderson E, 1999, LAPACK USERS GUIDE, DOI [10.1137/1.9780898719604, DOI 10.1137/1.9780898719604]
[3]  
[Anonymous], 1997, Applied Numerical Linear Algebra
[4]  
[Anonymous], 2005, P 10 ACM SIGPLAN S P, DOI DOI 10.1145/1065944.1065981
[5]  
[Anonymous], J PHYS C SERIES
[6]  
Bilmes J., 1997, P 1997 ACM INT C SUP, P340
[7]  
BREWER EA, 1995, P 5 ACM SIGPLAN S PR, P80
[8]   The implementation of the Cilk-5 multithreaded language [J].
Frigo, M ;
Leiserson, CE ;
Randall, KH .
ACM SIGPLAN NOTICES, 1998, 33 (05) :212-223
[9]   The design and implementation of FFTW3 [J].
Frigo, M ;
Johnson, SG .
PROCEEDINGS OF THE IEEE, 2005, 93 (02) :216-231
[10]  
Frigo M, 1998, INT CONF ACOUST SPEE, P1381, DOI 10.1109/ICASSP.1998.681704