Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/11587514_4guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

A practical method for quickly evaluating program optimizations

Published: 17 November 2005 Publication History

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.

References

[1]
PAPI: A Portable Interface to Hardware Performance Counters. http://icl.cs.utk.edu/papi, 2005.
[2]
PathScale EKOPath Compilers. http://www.pathscale.com, 2005.
[3]
L. Almagor, K. Cooper, A. Grosul, T. Harvey, S. Reeves, D. Subramanian, L. Torczon, and T. Waterman. Finding effective compilation sequences. In Proc. Languages, Compilers, and Tools for Embedded Systems (LCTES), pages 231-239, 2004.
[4]
J. Auslander, M. Philipose, C. Chambers, S. J. Eggers, and B. N. Bershad. Fast, effective dynamic compilation. In Conference on Programming Language Design and Implementation (PLDI), pages 149-159, 1996.
[5]
V. Bala, E. Duesterwald, and S. Banerjia. Dynamo: A transparent dynamic optimization system. In ACM SIGPLAN Notices, 2000.
[6]
J. Bilmes, K. Asanovic, C. Chin, and J. Demmel. Optimizing matrix multiply using PHiPAC: A portable, high-performance, ANSI C coding methodology. In Proc. ICS, pages 340-347, 1997.
[7]
F. Bodin, T. Kisuki, P. Knijnenburg, M. O'Boyle, and E. Rohou. Iterative compilation in a non-linear optimisation space. In Proc. ACM Workshop on Profile and Feedback Directed Compilation, 1998. Organized in conjunction with PACT98.
[8]
S. Browne, J. Dongarra, N. Garner, G. Ho, and P. Mucci. A portable programming interface for performance evaluation on modern processors. The International Journal of High Performance Computing Applications, 14(3):189-204, 2000.
[9]
M. Byler, M. Wolfe, J. R. B. Davies, C. Huson, and B. Leasure. Multiple version loops. In ICPP 1987, pages 312-318, 2005.
[10]
H. Chen, J. Lu, W.-C. Hsu, and P.-C. Yew. Continuous adaptive object-code re-optimization framework. In Ninth Asia-Pacific Computer Systems Architecture Conference (ACSAC 2004), pages 241-255, 2004.
[11]
A. Cohen, S. Girbal, D. Parello, M. Sigler, O. Temam, and N. Vasilache. Facilitating the search for compositions of program transformations. ACM Int. Conf on Supercomputing (ICS'05), June 2005.
[12]
K. Cooper, P. Schielke, and D. Subramanian. Optimizing for reduced code space using genetic algorithms. In Proc. Languages, Compilers, and Tools for Embedded Systems (LCTES), pages 1-9, 1999.
[13]
K. Cooper, D. Subramanian, and L. Torczon. Adaptive optimizing compilers for the 21st century. J. of Supercomputing, 23(1), 2002.
[14]
K. D. Cooper, M. W. Hall, and K. Kennedy. Procedure cloning. In Proceedings of the 1992 IEEE International Conference on Computer Language, pages 96-105, 1992.
[15]
K. D. Cooper, K. Kennedy, and L. Torczon. The impact of interprocedural analysis and optimization in the R n programming environment. ACM Transactions on Programming Languages and Systems, 8:491-523, 1986.
[16]
P. Diniz and M. Rinard. Dynamic feedback: An effective technique for adaptive computing. In Proc. PLDI, pages 71-84, 1997.
[17]
E. Duesterwald, C. Cascaval, and S. Dwarkadas. Characterizing and predicting program behavior and its variability. In IEEE PACT 2003, pages 220-231, 2003.
[18]
D. Engler. Vcode: a portable, very fast dynamic code generation system. In Proceedings of PLDI, 1996.
[19]
G. Fursin, M. O'Boyle, and P. Knijnenburg. Evaluating iterative compilation. In Proc. Languages and Compilers for Parallel Computers (LCPC), pages 305-315, 2002.
[20]
K. Heydeman, F. Bodin, P. Knijnenburg, and L. Morin. Ufc: a global trade-off strategy for loop unrolling for vliw architectures. In Proc. CPC, pages 59-70, 2003.
[21]
S. Hu, M. Valluri, and L. K. John. Effective adaptive computing environment management via dynamic optimization. In IEEE / ACM International Symposium on Code Generation and Optimization (CGO 2005), 2005.
[22]
T. Kisuki, P. Knijnenburg, M. O'Boyle, and H. Wijshoff. Iterative compilation in program optimization. In Proc. Compilers for Parallel Computers (CPC2000), pages 35-44, 2000.
[23]
J. Lau, S. Schoenmackers, and B. Calder. Transition phase classification and prediction. In International Symposium on High Performance Computer Architecture, 2005.
[24]
J. Lu, H. Chen, P.-C. Yew, and W.-C. Hsu. Design and implementation of a lightweight dynamic optimization system. In The Journal of Instruction-Level Parallelism, volume 6, 2004.
[25]
A. Monsifrot, F. Bodin, and R. Quiniou. A machine learning approach to automatic production of compiler heuristics. In Proc. AIMSA, LNCS 2443, pages 41-50, 2002.
[26]
D. Parello, O. Temam, A. Cohen, and J.-M. Verdun. Toward a systematic, pragmatic and architecture-aware program optimization process for complex processors. In Proc. Int. Conference on Supercomputing, 2004.
[27]
E. Perelman, G. Hamerly, M. V. Biesbrouck, T. Sherwood, and B. Calder. Using simpoint for accurate and efficient simulation. In ACM SIGMETRICS the International Conference on Measurement and Modeling of Computer Systems, 2003.
[28]
R. H. Saavedra and D. Park. Improving the effectiveness of software prefetching with adaptive execution. In Conference on Parallel Architectures and Compilation Techniques (PACT'96), 1996.
[29]
X. Shen, Y. Zhong, and C. Ding. Locality phase prediction. In ACM SIGARCH Computer Architecture News, pages 165-176, 2004.
[30]
T. Sherwood, E. Perelman, G. Hamerly, and B. Calder. Automatically characterizing large scale program behavior. In 10th International Conference on Architectural Support for Programming Languages and Operating Systems, 2002.
[31]
T. Sherwood, E. Perelman, G. Hamerly, and B. Calder. Automatically characterizing large scale program behavior. In Proceedings of ASPLOS-X, 2002.
[32]
M. Stephenson and S. Amarasinghe. Predicting unroll factors using supervised classification. In IEEE / ACM International Symposium on Code Generation and Optimization (CGO 2005). IEEE Computer Society, 2005.
[33]
M. Stephenson, M. Martin, and U. O'Reilly. Meta optimization: Improving compiler heuristics with machine learning. In Proc. PLDI, pages 77-90, 2003.
[34]
S. Triantafyllis, M. Vachharajani, and D. I. August. Compiler optimization-space exploration. In Journal of Instruction-level Parallelism, 2005.
[35]
X. Vera, J. Abella, A. González, and J. Llosa. Optimizing program locality through CMEs and GAs. In Proc. PACT, pages 68-78, 2003.
[36]
M. Voss and R. Eigemann. High-level adaptive program optimization with adapt. In Proceedings of the Symposium on Principles and practices of parallel programming, 2001.
[37]
M. Voss and R. Eigenmann. Adapt: Automated de-coupled adaptive program transformation. In Proc. ICPP, 2000.
[38]
R. C. Whaley and J. J. Dongarra. Automatically tuned linear algebra software. In Proc. Alliance, 1998.

Cited By

View all
  • (2022)Improving Vectorization Heuristics in a Dynamic Compiler with Machine Learning ModelsProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567679(36-47)Online publication date: 29-Nov-2022
  • (2022)Machine-Learning-Based Self-Optimizing Compiler Heuristics✱Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes10.1145/3546918.3546921(98-111)Online publication date: 14-Sep-2022
  • (2018)A Survey on Compiler Autotuning using Machine LearningACM Computing Surveys10.1145/319797851:5(1-42)Online publication date: 18-Sep-2018
  • Show More Cited By

Index Terms

  1. A practical method for quickly evaluating program optimizations
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image Guide Proceedings
      HiPEAC'05: Proceedings of the First international conference on High Performance Embedded Architectures and Compilers
      November 2005
      317 pages
      ISBN:3540303170
      • Editors:
      • Tom Conte,
      • Nacho Navarro,
      • Wen-mei W. Hwu,
      • Mateo Valero,
      • Theo Ungerer

      Publisher

      Springer-Verlag

      Berlin, Heidelberg

      Publication History

      Published: 17 November 2005

      Qualifiers

      • Article

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)0
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 06 Oct 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2022)Improving Vectorization Heuristics in a Dynamic Compiler with Machine Learning ModelsProceedings of the 14th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages10.1145/3563838.3567679(36-47)Online publication date: 29-Nov-2022
      • (2022)Machine-Learning-Based Self-Optimizing Compiler Heuristics✱Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes10.1145/3546918.3546921(98-111)Online publication date: 14-Sep-2022
      • (2018)A Survey on Compiler Autotuning using Machine LearningACM Computing Surveys10.1145/319797851:5(1-42)Online publication date: 18-Sep-2018
      • (2014)Collective mindScientific Programming10.1155/2014/79734822:4(309-329)Online publication date: 1-Oct-2014
      • (2013)MultiverseACM SIGPLAN Notices10.1145/2544173.250952548:10(533-552)Online publication date: 29-Oct-2013
      • (2013)MultiverseProceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications10.1145/2509136.2509525(533-552)Online publication date: 29-Oct-2013
      • (2012)Extendable pattern-oriented optimization directivesACM Transactions on Architecture and Code Optimization10.1145/2355585.23555879:3(1-37)Online publication date: 5-Oct-2012
      • (2012)Parallel iterative compilationProceedings of third international workshop on MapReduce and its Applications Date10.1145/2287016.2287023(33-40)Online publication date: 18-Jun-2012
      • (2012)Iterative optimization for the data centerACM SIGPLAN Notices10.1145/2248487.215098347:4(49-60)Online publication date: 3-Mar-2012
      • (2012)Iterative optimization for the data centerACM SIGARCH Computer Architecture News10.1145/2189750.215098340:1(49-60)Online publication date: 3-Mar-2012
      • Show More Cited By

      View Options

      View options

      Get Access

      Login options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media