skip to main content
10.1145/3167132.3167263acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
research-article

An approach based on a DSL + API for programming runtime adaptivity and autotuning concerns

Published: 09 April 2018 Publication History

Abstract

In the context of compiler optimizations, tuning of parameters and selection of algorithms, runtime adaptivity and autotuning are becoming increasingly important, especially due to the complexity of applications, workloads, computing devices and execution environments. For identifying and specifying adaptivity, different phases are required: analysis of program hotspots and adaptivity opportunities, code restructuring, and programming of adaptivity strategies. These phases usually require different tools and modifications to the source code that may result in difficult to maintain and error prone code. This paper presents a flexible approach to support the different phases when developing adaptive applications. The approach is based on a single domain-specific language (DSL), able to specify and evaluate multiple strategies and to maintain a separation of concerns. We describe the requirements and the design of the DSL, an accompanying API, and of a Java-to-Java compiler that implements the approach. In addition, we present and evaluate the use of the approach to specify runtime adaptivity strategies in the context of Java programs, especially when considering runtime autotuning of optimization parameters and runtime selection of algorithms. Although simple, the case studies shown truly demonstrate the main advantages of the approach in terms of the programming model and of the performance impact.

References

[1]
Jason Ansel, Cy Chan, Yee Lok Wong, Marek Olszewski, Qin Zhao, Alan Edelman, and Saman Amarasinghe. 2009. PetaBricks: A Language and Compiler for Algorithmic Choice. In Proc. ACM SIGPLAN Conf. on Programming Language Design and Implementation. ACM, New York, NY, USA, 38--49.
[2]
Jason Ansel, Shoaib Kamil, Kalyan Veeramachaneni, Jonathan Ragan-Kelley, Jeffrey Bosboom, Una-May O'Reilly, and Saman Amarasinghe. 2014. Opentuner: An extensible framework for program autotuning. In Proc. Intl' Conf. on Parallel architectures and compilation. ACM, 303--316.
[3]
John Aycock. 2003. A Brief History of Just-in-time. ACM Comput. Surv. 35, 2 (June 2003), 97--113.
[4]
João M.P. Cardoso, Tiago Carvalho, Jossé G.F. Coutinho, Ricardo Nobre, Razvan Nane, Pedro C. Diniz, Zlatko Petrov, Wayne Luk, and Koen Bertels. 2013. Controlling a complete hardware synthesis toolchain with LARA aspects. Microprocessors and Microsystems 37 (2013), 1073 -- 1089.
[5]
Tiago Carvalho, Pedro Pinto, and J. M. P. Cardoso. 2015. Programming Strategies for Contextual Runtime Specialization. In Proc. 18th Int'l Workshop on Software and Compilers for Embedded Systems (SCOPES '15). ACM, New York, NY, USA, 3--11.
[6]
Henri-Pierre Charles, Damien Couroussé, Victor Lomüller, Fernando A Endo, and Rémy Gauguey. 2014. deGoal a Tool to Embed Dynamic Code Generators into Applications. In Proc. 23rd Int'l Conf. on Compiler Construction. Springer, 107--112.
[7]
Isaac J Dooley. 2010. Intelligent runtime tuning of parallel applications with control points. Ph.D. Dissertation. Dept. of Computer Science, University of Illinois, USA.
[8]
Robert Fisher, Simon Perkins, Ashley Walker, Erik Wolfart, N Brown, N Cammas, A Fitzgibbon, S Horne, K Koryllos, A Murdoch, and others. 2005. HIPR2: Image processing learning resources. (2005). http://homepages.inf.ed.ac.uk/rbf/HIPR2/ http://homepages.inf.ed.ac.uk/rbf/HIPR2/.
[9]
D. Gadioli, G. Palermo, and C. Silvano. 2015. Application autotuning to support runtime adaptivity in multicore architectures. In Int'l Conf. on Embedded Computer Systems: Architectures, Modeling, and Simulation (SAMOS). 173--180.
[10]
Henry Hoffmann, Stelios Sidiroglou, Michael Carbin, Sasa Misailovic, Anant Agarwal, and Martin Rinard. 2011. Dynamic knobs for responsive power-aware computing. In ACM SIGPLAN Notices, Vol. 46. ACM, 199--212.
[11]
Sanath Jayasena, Milinda Fernando, Tharindu Rusira, Chalitha Perera, and Chamara Philips. 2015. Auto-tuning the Java Virtual Machine. In Proc. IEEE Int'l Parallel and Distributed Symposium Workshop (IPDPSW). IEEE, 1261--1270.
[12]
J. O. Kephart and D. M. Chess. 2003. The vision of autonomic computing. Computer 36, 1 (Jan 2003), 41--50.
[13]
Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Lopes, Jean-Marc Loingtier, and John Irwin. 1997. Aspect-oriented programming. In ECOOP'97 --- Object-Oriented Programming. Lecture Notes in Computer Science, Vol. 1241. Springer, 220--242.
[14]
Eugene Kuleshov. 2007. Using the ASM framework to implement common Java bytecode transformation patterns. Aspect-Oriented Software Development (AOSD) (2007).
[15]
M. Lichman. 2013. UCI Machine Learning Repository. (2013). http://archive.ics.uci.edu/ml Adult Data Set. https://archive.ics.uci.edu/ml/datasets/adult.
[16]
Tim Lindholm and Frank Yellin. 1997. Inside the Java virtual machine. Unix Review 15, 1 (1997), 7.
[17]
Jai Menon. 1986. A Study of Sort Algorithms for Multiprocessor Database Machines. In Proc. 12th Int'l Conf. on Very Large Data Bases. San Francisco, CA, USA, 197--206.
[18]
Davide Pasetto and Albert Akhriev. 2011. A Comparative Study of Parallel Sort Algorithms. In Proc. ACM Int'l Conf. Companion on Object Oriented Programming Systems Languages and Applications Companion. ACM, New York, NY, USA, 203--204.
[19]
Sanjay J Patel and Steven S Lumetta. 2001. rePLay: A hardware framework for dynamic optimization. IEEE Trans. Comput. 50, 6 (2001), 590--608.
[20]
Renaud Pawlak, Martin Monperrus, Nicolas Petitprez, Carlos Noguera, and Lionel Seinturier. 2015. Spoon: A Library for Implementing Analyses and Transformations of Java Source Code. Software: Practice and Experience Wiley, 46 (2015), 1155--1179.
[21]
A. C. Santos, P. C. Diniz, J. M. P. Cardoso, and D. R. Ferreira. 2011. A Domain-Specific Language for the Specification of Adaptable Context Inference. In IFIP 9th Int'l Conf. on Embedded and Ubiquitous Computing. 268--273.
[22]
Michael J. Voss and Rudolf Eigemann. 2001. High-level Adaptive Program Optimization with ADAPT. In Proc. 8th ACM SIGPLAN Symposium on Principles and Practices of Parallel Programming (PPoPP '01). ACM, New York, NY, USA, 93--102.
[23]
John Robert Wernsing and Greg Stitt. 2010. Elastic computing: a framework for transparent, portable, and adaptive multi-core heterogeneous computing. In ACM SIGPLAN Notices, Vol. 45. 115--124.
[24]
Hao Yu and Lawrence Rauchwerger. 2006. An Adaptive Algorithm Selection Framework for Reduction Parallelization. IEEE Trans. Parallel Distrib. Syst. 17, 10 (Oct. 2006), 1084--1096.

Index Terms

  1. An approach based on a DSL + API for programming runtime adaptivity and autotuning concerns

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      SAC '18: Proceedings of the 33rd Annual ACM Symposium on Applied Computing
      April 2018
      2327 pages
      ISBN:9781450351911
      DOI:10.1145/3167132
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 09 April 2018

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. aspect-oriented programming
      2. autotuning
      3. runtime adaptivity

      Qualifiers

      • Research-article

      Funding Sources

      • Fundação para a Ciência e a Tecnologia

      Conference

      SAC 2018
      Sponsor:
      SAC 2018: Symposium on Applied Computing
      April 9 - 13, 2018
      Pau, France

      Acceptance Rates

      Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

      Upcoming Conference

      SAC '25
      The 40th ACM/SIGAPP Symposium on Applied Computing
      March 31 - April 4, 2025
      Catania , Italy

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • 0
        Total Citations
      • 70
        Total Downloads
      • Downloads (Last 12 months)4
      • Downloads (Last 6 weeks)1
      Reflects downloads up to 16 Feb 2025

      Other Metrics

      Citations

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media