Abstract
Compilers employ system models, sometimes implicitly, to make code optimization decisions. These models are analytic; they reflect their implementor’s understanding and beliefs of the system. While their decisions can be made almost instantaneously, unless the model is perfect their decisions may be flawed. To avoid exercising unique characteristics of a particular machine, such models are necessarily general and conservative. An alternative is to construct an empirical model. Building an empirical model involves extensive search of a parameter space to determine optimal settings. But this search is performed on the actual machine on which the compiler is to be deployed so that, once constructed, its decisions automatically reflect any eccentricities of the target system. Unfortunately, constructing accurate empirical models is expensive and, therefore, their applicability is limited to library generators such as ATLAS and FFTW. Here the high up-front installation cost can amortized over many future uses. In this paper we examine a hybrid approach. Active learning in an Explanation-Based paradigm allows the hybrid system to greatly increase the search range while drastically reducing the search time. Individual search points are analyzed for their information content using an known-imprecise qualitative analytic model. Next-search-points are chosen which have the highest expected information content with respect to refinement of the empirical model being constructed. To evaluate our approach we compare it with a leading analytic model and a leading empirical model. Our results show that the performance of the libraries generated using the hybrid approach is comparable to the performance of libraries generated via extensive search techniques and much better than that of the libraries generated by optimization based solely on an analytic model.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
ATLAS home page, http://math-atlas.sourceforge.net/faq.html#NB80
Allan, R., Kennedy, K.: Optimizing Compilers for Modern Architectures. Morgan Kaufmann Publishers, San Francisco (2002)
Bilmes, J., Asanović, K., Chin, C., Demmel, J.: OptimizingMatrixMultiply using PHiPAC: a Portable, High-Performance, ANSI C Coding Methodology. In: Proc. of Int. Conf. on Supercomputing, Vienna, Austria (July 1997)
Boulet, P., Darte, A., Risset, T., Robert, Y. (Pen)-ultimate Tiling? Integration, the VLSI Journal 17, 33–51 (1994)
Callahan, D., Carr, S., Kennedy, K.: Improving Register Allocation for Subscripted Variables. In: Proc. of PLDI, pp. 53–65 (1990)
Carr, S., Ding, C., Sweany, P.: Improving software pipelining with unroll-and-jam. In: Proc. of 29th Hawaii International Conference on System Sciences (1996)
Coleman, S., McKinley, K.S.: Tile Size Selection Using Cache Organization and Data Layout. In: Proc. of PLDI. ACM Press, New York (1995)
Cooper, K., Waterman, T.: Investigating Adaptive Compilation Using the MIPSPro Compiler. In: Proc. of the LACSI Symposium, Los Alamos Computer Science Institute (October 2003)
Cooper, K.D., Subramanian, D., Torczon, L.: Adaptive optimizing compilers for the 21st century. The Journal of Supercomputing 23(1) (2002)
DeJong, G.: Explanation-based learning. In: Tucker, A. (ed.) Computer Science Handbook, 2nd edn., p. 68.1–68.18. Chapman & Hall/CRC and ACM (2004)
Diniz, P., Rinard, M.: Dynamic feedback: An effective technique for adaptive computing. In: Proc. of PLDI (1997)
Frigo, M., Johnson, S.G.: FFTW: An Adaptive Software Architecture for the FFT. In: Proc. IEE Intl. Conf. on Acoustics, Speech, and Signal Processing, vol. 3, pp. 1381–1384 (1998)
Li, X., Garzaran, M.J., Padua, D.A.: A dynamically tuned sorting library. In: CGO, pp. 111–124 (2004)
Robert, C.P.: The Bayesian Choice. Springer, Heidelberg (1994)
Thomas, N., Tanase, G., Tkachyshyn, O., Perdue, J., Amato, N.M., Rauchwerger, L.: A framework for adaptive algorithm selection in stapl. In: Proc. ACM SIGPLAN Symp. Prin. Prac. Par. Prog, PPOPP (2005) (to appear)
Triantafyllis, S., Vachharajani, M., Vachharajani, N., August, D.: Compiler optimizationspace exploration. In: Int. Symp. on CGO (2003)
Whaley, R.C., Petitet, A., Dongarra, J.J.: Automated Empirical Optimization of Software and the ATLAS Project. Parallel Computing 27(1–2), 3–35 (2001)
Wolfe, M.: Iteration Space Tiling for Memory Hierarchies. In: Third SIAM Conf. on Parallel Processing for Scientific Computing (December 1987)
Xiong, J., Johnson, J., Johnson, R., Padua, D.: SPL: A Language and a Compiler for DSP Algorithms. In: Proc. of PLDI, pp. 298–308 (2001)
Yotov, K., Li, X., Ren, G., Cibulskis, M., DeJong, G., Garzaran, M., Padua, D., Pengali, K., Stodghill, P., Wu, P.: A Comparison of Empirical and Model-driven Optimization. In: Proc. of PLDI, pp. 63–76 (2003)
Yotov, K., Li, X., Ren, G., Garzarán, M.J., Padua, D., Pingali, K., Stodghill, P.: Is Search Really Necessary to Generate a High Performance Blas? Proc. of the IEEE, special issue on Program Generation, Optimization, and Platform Adaptation 23, 358–386 (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Epshteyn, A. et al. (2006). Analytic Models and Empirical Search: A Hybrid Approach to Code Optimization. In: Ayguadé, E., Baumgartner, G., Ramanujam, J., Sadayappan, P. (eds) Languages and Compilers for Parallel Computing. LCPC 2005. Lecture Notes in Computer Science, vol 4339. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69330-7_18
Download citation
DOI: https://doi.org/10.1007/978-3-540-69330-7_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69329-1
Online ISBN: 978-3-540-69330-7
eBook Packages: Computer ScienceComputer Science (R0)