Abstract
This article aims at making iterative optimization practical and usable by speeding up the evaluation of a large range of optimizations. Instead of using a full run to evaluate a single program optimization, we take advantage of periods of stable performance, called phases. For that purpose, we propose a low-overhead phase detection scheme geared toward fast optimization space pruning, using code instrumentation and versioning implemented in a production compiler.
Our approach is driven by simplicity and practicality. We show that a simple phase detection scheme can be sufficient for optimization space pruning. We also show it is possible to search for complex optimizations at run-time without resorting to sophisticated dynamic compilation frameworks. Beyond iterative optimization, our approach also enables one to quickly design self-tuned applications.
Considering 5 representative SpecFP2000 benchmarks, our approach speeds up iterative search for the best program optimizations by a factor of 32 to 962. Phase prediction is 99.4% accurate on average, with an overhead of only 2.6%. The resulting self-tuned implementations bring an average speed-up of 1.4.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
PAPI: A Portable Interface to Hardware Performance Counters (2005), http://icl.cs.utk.edu/papi
PathScale EKOPath Compilers (2005), http://www.pathscale.com
Almagor, L., Cooper, K., Grosul, A., Harvey, T., Reeves, S., Subramanian, D., Torczon, L., Waterman, T.: Finding effective compilation sequences. In: Proc. Languages, Compilers, and Tools for Embedded Systems (LCTES), pp. 231–239 (2004)
Auslander, J., Philipose, M., Chambers, C., Eggers, S.J., Bershad, B.N.: Fast, effective dynamic compilation. In: Conference on Programming Language Design and Implementation (PLDI), pp. 149–159 (1996)
Bala, V., Duesterwald, E., Banerjia, S.: Dynamo: A transparent dynamic optimization system. ACM SIGPLAN Notices (2000)
Bilmes, J., Asanović, K., Chin, C., Demmel, J.: Optimizing matrix multiply using PHiPAC: A portable, high-performance, ANSI C coding methodology. In: Proc. ICS, pp. 340–347 (1997)
Bodin, F., Kisuki, T., Knijnenburg, P., O’Boyle, M., Rohou, E.: Iterative compilation in a non-linear optimisation space. In: Proc. ACM Workshop on Profile and Feedback Directed Compilation. Organized in conjunction with PACT 1998 (1998)
Browne, S., Dongarra, J., Garner, N., Ho, G., Mucci, P.: A portable programming interface for performance evaluation on modern processors. The International Journal of High Performance Computing Applications 14(3), 189–204 (2000)
Byler, M., Wolfe, M., Davies, J.R.B., Huson, C., Leasure, B.: Multiple version loops. In: ICPP 1987, pp. 312–318 (2005)
Chen, H., Lu, J., Hsu, W.-C., Yew, P.-C.: Continuous adaptive object-code re-optimization framework. In: Yew, P.-C., Xue, J. (eds.) ACSAC 2004. LNCS, vol. 3189, pp. 241–255. Springer, Heidelberg (2004)
Cohen, A., Girbal, S., Parello, D., Sigler, M., Temam, O., Vasilache, N.: Facilitating the search for compositions of program transformations. In: ACM Int. Conf on Supercomputing ICS 2005 (June 2005)
Cooper, K., Schielke, P., Subramanian, D.: Optimizing for reduced code space using genetic algorithms. In: Proc. Languages, Compilers, and Tools for Embedded Systems (LCTES), pp. 1–9 (1999)
Cooper, K., Subramanian, D., Torczon, L.: Adaptive optimizing compilers for the 21st century. J. of Supercomputing 23(1) (2002)
Cooper, K.D., Hall, M.W., Kennedy, K.: Procedure cloning. In: Proceedings of the 1992 IEEE International Conference on Computer Language, pp. 96–105 (1992)
Cooper, K.D., Kennedy, K., Torczon, L.: The impact of interprocedural analysis and optimization in the Rn programming environment. ACM Transactions on Programming Languages and Systems 8, 491–523 (1986)
Diniz, P., Rinard, M.: Dynamic feedback: An effective technique for adaptive computing. In: Proc. PLDI, pp. 71–84 (1997)
Duesterwald, E., Cascaval, C., Dwarkadas, S.: Characterizing and predicting program behavior and its variability. In: Malyshkin, V.E. (ed.) PaCT 2003. LNCS, vol. 2763, pp. 220–231. Springer, Heidelberg (2003)
Engler, D.: Vcode: a portable, very fast dynamic code generation system. In: Proceedings of PLDI (1996)
Fursin, G., O’Boyle, M., Knijnenburg, P.: Evaluating iterative compilation. In: Proc. Languages and Compilers for Parallel Computers (LCPC), pp. 305–315 (2002)
Heydeman, K., Bodin, F., Knijnenburg, P., Morin, L.: Ufc: a global trade-off strategy for loop unrolling for vliw architectures. In: Proc. CPC, pp. 59–70 (2003)
Hu, S., Valluri, M., John, L.K.: Effective adaptive computing environment management via dynamic optimization. In: IEEE / ACM International Symposium on Code Generation and Optimization, CGO 2005 (2005)
Kisuki, T., Knijnenburg, P., O’Boyle, M., Wijshoff, H.: Iterative compilation in program optimization. In: Proc. Compilers for Parallel Computers (CPC 2000), pp. 35–44 (2000)
Lau, J., Schoenmackers, S., Calder, B.: Transition phase classification and prediction. In: International Symposium on High Performance Computer Architecture (2005)
Lu, J., Chen, H., Yew, P.-C., Hsu, W.-C.: Design and implementation of a lightweight dynamic optimization system. The Journal of Instruction-Level Parallelism 6 (2004)
Monsifrot, A., Bodin, F., Quiniou, R.: A machine learning approach to automatic production of compiler heuristics. In: Scott, D. (ed.) AIMSA 2002. LNCS, vol. 2443, pp. 41–50. Springer, Heidelberg (2002)
Parello, D., Temam, O., Cohen, A., Verdun, J.-M.: Toward a systematic, pragmatic and architecture-aware program optimization process for complex processors. In: Proc. Int. Conference on Supercomputing (2004)
Perelman, E., Hamerly, G., Biesbrouck, M.V., Sherwood, T., Calder, B.: Using simpoint for accurate and efficient simulation. In: ACM SIGMETRICS the International Conference on Measurement and Modeling of Computer Systems (2003)
Saavedra, R.H., Park, D.: Improving the effectiveness of software prefetching with adaptive execution. In: Conference on Parallel Architectures and Compilation Techniques, PACT 1996 (1996)
Shen, X., Zhong, Y., Ding, C.: Locality phase prediction. ACM SIGARCH Computer Architecture News, 165–176 (2004)
Sherwood, T., Perelman, E., Hamerly, G., Calder, B.: Automatically characterizing large scale program behavior. In: 10th International Conference on Architectural Support for Programming Languages and Operating Systems (2002)
Sherwood, T., Perelman, E., Hamerly, G., Calder, B.: Automatically characterizing large scale program behavior. In: Proceedings of ASPLOS-X (2002)
Stephenson, M., Amarasinghe, S.: Predicting unroll factors using supervised classification. In: IEEE / ACM International Symposium on Code Generation and Optimization (CGO 2005). IEEE Computer Society, Los Alamitos (2005)
Stephenson, M., Martin, M., O’Reilly, U.: Meta optimization: Improving compiler heuristics with machine learning. In: Proc. PLDI, pp. 77–90 (2003)
Triantafyllis, S., Vachharajani, M., August, D.I.: Compiler optimization-space exploration. Journal of Instruction-level Parallelism (2005)
Vera, X., Abella, J., González, A., Llosa, J.: Optimizing program locality through CMEs and GAs. In: Proc. PACT, pp. 68–78 (2003)
Voss, M., Eigemann, R.: High-level adaptive program optimization with adapt. In: Proceedings of the Symposium on Principles and practices of parallel programming (2001)
Voss, M., Eigenmann, R.: Adapt: Automated de-coupled adaptive program transformation. In: Proc. ICPP (2000)
Whaley, R.C., Dongarra, J.J.: Automatically tuned linear algebra software. In: Proc. Alliance (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Fursin, G., Cohen, A., O’Boyle, M., Temam, O. (2005). A Practical Method for Quickly Evaluating Program Optimizations. In: Conte, T., Navarro, N., Hwu, Wm.W., Valero, M., Ungerer, T. (eds) High Performance Embedded Architectures and Compilers. HiPEAC 2005. Lecture Notes in Computer Science, vol 3793. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11587514_4
Download citation
DOI: https://doi.org/10.1007/11587514_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-30317-6
Online ISBN: 978-3-540-32272-6
eBook Packages: Computer ScienceComputer Science (R0)