Abstract
Many modern applications (such as multimedia processing, machine learning, and big data analytics) exhibit a natural tradeoff between the accuracy of the results they produce and the application’s execution time or energy consumption. These applications allow us to investigate new, more aggressive program optimization approaches. This chapter outlines the foundation of program optimization systems that expose and profitably exploit tradeoffs between the accuracy of the results that the program produces and the time and energy required to produce those results. These systems apply accuracy-aware program transformations that intentionally change the semantics of optimized programs. We discuss program analysis techniques that quantify the loss of accuracy introduced by program transformations.
We will present the fundamental techniques for the accuracy-aware compilation that help us discover and characterize the accuracy–performance tradeoffs in sequential programs. Through two case studies, we will describe two main directions in developing accuracy-aware compilers: (1) sensitivity profiling-based techniques speculatively execute candidate transformed programs and use dynamic program analysis to reason about their accuracy, while (2) analysis-based techniques use static analysis to derive formulas that characterize acceptable results and use mathematical optimization to find the best performing program versions, without executing them.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Despite the name “accuracy metric” being traditionally used, these functions commonly compute the accuracy loss compared to some reference result. When these functions evaluate to a value close to 0, that means that the result of the approximate program is more accurate. They also do not always satisfy all the properties of mathematical metrics. For instance, distortion is not symmetric.
References
Kildall, G. A. (1973). A unified approach to global program optimization. In Proceedings of the POPL.
Carbin, M., Kim, D., Misailovic, S., & Rinard, M. (2012). Proving acceptability properties of relaxed nondeterministic approximate programs. In Proceedings of the PLDI.
Rinard, M. (2006). Probabilistic accuracy bounds for fault-tolerant computations that discard tasks. In Proceedings of the ICS.
Chakradhar, S., Raghunathan, A., & Meng, J. (2009). Best-effort parallel execution framework for recognition and mining applications. In International Symposium on Parallel & Distributed Processing (IPDPS).
Meng, J., Raghunathan, A., Chakradhar, S., & Byna, S. (2010). Exploiting the forgiving nature of applications for scalable parallel execution. In International Symposium on Parallel & Distributed Processing (IPDPS).
Misailovic, S., Sidiroglou, S., Hoffmann, H., & Rinard, M. (2010). Quality of service profiling. In Proceedings of the ICSE.
Sidiroglou, S., Misailovic, S., Hoffmann, H., & Rinard, M. (2011). Managing performance vs. accuracy trade-offs with loop perforation. In Proceedings of the FSE.
Misailovic, S., Roy, D., & Rinard, M. (2011). Probabilistically accurate program transformations. In Proceedings of the SAS.
Zhu, Z., Misailovic, S., Kelner, J., & Rinard, M. (2012). Randomized accuracy-aware program transformations for efficient approximate computations. In Proceedings of the POPL.
Samadi, M., Jamshidi, D., Lee, J., & Mahlke, S. (2014). Paraprox: Pattern-based approximation for data parallel applications. In Proceedings of the ASPLOS.
Baek, W., & Chilimbi, T. M. (2010). Green: A framework for supporting energy-conscious programming using controlled approximation. In Proceedings of the PLDI.
Ansel, J., Wong, Y., Chan, C., Olszewski, M., Edelman, A., & Amarasinghe, S. (2011). Language and compiler support for auto-tuning variable-accuracy algorithms. In International Symposium on CGO.
Hoffmann, H., Sidiroglou, S., Carbin, M., Misailovic, S., Agarwal, A., & Rinard, M. (2011). Dynamic knobs for responsive power-aware computing. In Proceedings of the ASPLOS.
Rubio-González, C., Nguyen, C., Nguyen, H., Demmel, J., Kahan, W., Sen, K., Bailey, D., Iancu, C., & Hough, D. (2013). Precimonious: Tuning assistant for floating-point precision. In Proceedings of the SC.
Schkufza, E., Sharma, R., & Aiken, A. (2014). Stochastic optimization of floating-point programs with tunable precision. In Proceedings of the PLDI.
Han, S., Mao, H., & Dally, W. (2016). Deep compression: Compressing deep neural networks with pruning, trained quantization and Huffman coding. In International Conference on ICLR.
Cormode, G., & Garofalakis, M. (2007). Sketching probabilistic data streams. In Proceedings of the SIGMOD/PODS.
Rinard, M. (2007). Using early phase termination to eliminate load imbalances at barrier synchronization points. In Proceedings of the OOPSLA.
Misailovic, S., Sidiroglou, S., & Rinard, M. (2012). Dancing with uncertainty. In Proceedings of the RACES.
Misailovic, S., Kim, D., & Rinard, M. (2013). Parallelizing sequential programs with statistical accuracy tests. ACM Transactions Embedded Computing System Special Issue on Probabilistic Embedded Computing, 12(2s), 1–26.
Campanoni, S., Holloway, G., Wei, G.-Y., & Brooks, D. (2015). Helix-up: Relaxing program semantics to unleash parallelization. In International Symposium on CGO.
Sampson, A., Dietl, W., Fortuna, E., Gnanapragasam, D., Ceze, L., & Grossman, D. (2011). EnerJ: Approximate data types for safe and general low-power computation. In Proceedings of the PLDI.
Esmaeilzadeh, H., Sampson, A., Ceze, L., & Burger, D. (2012). Neural acceleration for general-purpose approximate programs. In International Symposium on MICRO.
Liu, S., Pattabiraman, K., Moscibroda, T., & Zorn, B. (2011). Flikker: Saving DRAM refresh-power through critical data partitioning. In Proceedings of the ASPLOS.
Fernando, V., Franques, A., Abadal, S., Misailovic, S., & Torrellas, J. (2019). Replica: A wireless manycore for communication-intensive and approximate data. In Proceedings of the ASPLOS.
Chippa, V., Chakradhar, S., Roy, K., & Raghunathan, A. (2013). Analysis and characterization of inherent application resilience for approximate computing. In Proceedings of the DAC.
Misailovic, S., Carbin, M., Achour, S., Qi, Z., & Rinard, M. (2014). Chisel: Reliability- and accuracy-aware optimization of approximate computational kernels. In Proceedings of the OOPSLA.
Sharif, H., Srivastava, P., Huzaifa, M., Kotsifakou, M., Joshi, K., Sarita, Y., Zhao, N., Adve, V., Misailovic, S., & Adve, S. (2019). ApproxHPVM: A portable compiler IR for accuracy-aware optimizations. In Proceedings of ACM on Programming Languages, 3(OOPSLA).
Hoffmann, H., Misailovic, S., Sidiroglou, S., Agarwal, A., & Rinard, M. (2009, September). Using code perforation to improve performance, reduce energy consumption, and respond to failures. Tech. Rep. MIT-CSAIL-TR-2009-042, MIT.
Lattner, C., & Adve, V. (2004). LLVM: A compilation framework for lifelong program analysis & transformation. In International Symposium on CGO.
Ansel, J., Kamil, S., Veeramachaneni, K., Ragan-Kelley, J., Bosboom, J., O’Reilly, U. M., & Amarasinghe, S. (2014). OpenTuner: An extensible framework for program autotuning. In International Conference on PACT.
Sharif, H., Zhao, Y., Kotsifakou, M., Kothari, A., Schreiber, B., Wang, E., Sarita, Y., Zhao, N., Joshi, K., Adve, S., Misailovic, S., & Adve, S. (2021). ApproxTuner: A compiler and runtime system for adaptive approximations. In Proceedings of the PPoPP (pp. 262–277).
Geilen, M., & Basten, T. (2007). A calculator for pareto points. In Proceedings of the DATE.
P. B. Suite. http://parsec.cs.princeton.edu/
X. V. T. Media. http://media.xiph.org/video/derf
Park, J., Esmaeilzadeh, H., Zhang, X., Naik, M., & Harris, W. (2015). FlexJava: Language support for safe and modular approximate programming. In Proceedings of the FSE.
Carbin, M., Kim, D., Misailovic, S., & Rinard, M. (2013). Verified integrity properties for safe approximate program transformations. In Proceedings of the PEPM.
Lou, L., Nguyen, P., Lawrence, J., & Barnes, C. (2016). Image perforation: Automatically accelerating image pipelines by intelligently skipping samples. ACM Transactions on Graphics (TOG), 35(5), 1–14.
Figurnov, M., Ibraimova, A., Vetrov, D., & Kohli, P. (2016). PerforatedCNNs: Acceleration through elimination of redundant convolutions.
Maier, D., Cosenza, B., & Juurlink, B. (2018). Local memory-aware kernel perforation. In International Symposium on CGO.
Li, S., Park, S., & Mahlke, S. (2018). Sculptor: Flexible approximation with selective dynamic loop perforation. In Proceedings of the ISC (pp. 341–351).
Xu, R., Koo, J., Kumar, R., Bai, P., Mitra, S., Misailovic, S., & Bagchi, S. (2018). VideoChef: Efficient approximation for streaming video processing pipelines. In Proceedings of the USENIX ATC.
Palem, K. (2005). Energy aware computing through probabilistic switching: A study of limits. IEEE Transactions on Computers, 54(9), 1123–1137.
Leem, L., Cho, H., Bau, J., Jacobson, Q., & Mitra, S. (2010). ERSA: Error resilient system architecture for probabilistic applications. In Proceedings of the DATE.
Lee, K., Shrivastava, A., Issenin, I., Dutt, N., & Venkatasubramanian, N. (2006). Mitigating soft error failures for multimedia applications by selective data protection. In Proceedings of the CASES.
Carbin, M., Misailovic, S., & Rinard, M. (2013). Verifying quantitative reliability for programs that execute on unreliable hardware. In Proceedings of the OOPSLA.
Bjørner, N., Phan, A., & Fleckenstein, L. (2015). νZ-an optimizing SMT solver. In Internation Conference on TACAS.
Boston, B., Gong, Z., & Carbin, M. (2018). Leto: Verifying application-specific hardware fault tolerance with programmable execution models. Proceedings of the ACM on Programming Languages, 2(OOPSLA), 1–30.
Fernando, V., Joshi, K., & Misailovic, S. (2019). Verifying safety and accuracy of approximate parallel programs via canonical sequentialization. Proceedings of the ACM on Programming Languages, 3(OOPSLA), 1–29.
Sui, X., Lenharth, A., Fussell, D., & Pingali, K. (2016). Proactive control of approximate programs. In Proceedings of the ASPLOS.
Chiang, W., Baranowski, M., Briggs, I., Solovyev, A., Gopalakrishnan, G., & Rakamaric, Z. (2017). Rigorous floating-point mixed-precision tuning. In Proceedings of the POPL.
Izycheva, A., Darulova, E., & Seidl, H. (2019). Synthesizing efficient low-precision kernels. In International Symposium on ATVA.
Han, J., & Orshansky, M. (2013). Approximate computing: An emerging paradigm for energy-efficient design. In Proceedings of the ETS.
Xu, Q., Mytkowicz, T., & Kim, N.-S. (2016). Approximate computing: A survey. IEEE Design & Test, 33(1), 8–22.
Stanley-Marbell, P., Alaghi, A., Carbin, M., Darulova, E., Dolecek, L., Gerstlauer, A., Gillani, G., Jevdjic, D., Moreau, T., Cacciotti, M., Daglis, A., Enright-Jerger, N., Falsafi, B., Misailovic, S., Sampson, A., & Zufferey, D. (2020). Exploiting errors for efficiency: A survey from circuits to applications. ACM Computing Surveys, 53(3), 51:1–51:39.
Carbin, M., & Rinard, M. (2010). Automatically identifying critical input regions and code in applications. In Proceedings of the ISSTA.
Roy, P., Ray, R., Wang, C., & Wong, W. (2014). ASAC: Automatic sensitivity analysis for approximate computing. In Proceedings of the LCTES.
Venkatagiri, R., Mahmoud, A., Hari, S., & Adve, S. (2016). Approxilyzer: Towards a systematic framework for instruction-level approximate computing and its application to hardware resiliency. In International Symposium on MICRO.
Nongpoh, B., Ray, R., Dutta, S., & Banerjee, A. (2017). Autosense: A framework for automated sensitivity analysis of program data. IEEE Transactions on Software Engineering, 43(12), 1110–1124.
Gaffar, A., Mencer, O., Luk, W., Cheung, P., & Shirazi, N. (2002). Floating-point bitwidth analysis via automatic differentiation. In International Conference on FPT.
Chaudhuri, S., Gulwani, S., Lublinerman, R., & Navidpour, S. (2011). Proving programs robust. In Proceedings of the FSE.
Darulova, E., & Kuncak, V. (2014). Sound compilation of reals. In Proceedings of the POPL.
He, S., Lahiri, S., & Rakamaric, Z. (2018). Verifying relative safety, accuracy, and termination for program approximations. Journal of Automated Reasoning, 60(1), 23–42.
Barone, S., Traiola, M., Barbareschi, M., & Bosio, A. (2021). Multi-objective application-driven approximate design method. IEEE Access.
Dorn, J., Lacomis, J., Weimer, W., & Forrest, S. (2019). Automatically exploring tradeoffs between software output fidelity and energy costs. IEEE Transactions on Software Engineering, 45(3), 219–236.
Ha, V., & Sentieys, O. (2021). Leveraging Bayesian optimization to speed up automatic precision tuning. In Proceedings of the DATE.
Vassiliadis, V., Riehme, J., Deussen, J., Parasyris, K., Antonopoulos, C., Bellas, N., Lalis, S., & Naumann, U. (2016). Towards automatic significance analysis for approximate computing. In International Symposium on CGO.
Sampson, A., Baixo, A., Ransford, B., Moreau, T., Yip, J., Ceze, L., & Oskin, M. (2015). Accept: A programmer-guided compiler framework for practical approximate computing. Tech. Rep. UW-CSE-15-01, University of Washington.
Samadi, M., Lee, J., Jamshidi, D., Hormati, A., & Mahlke, S. (2013). Sage: Self-tuning approximation for graphics engines. International Symposium on MICRO.
Goiri, I., Bianchini, R., Nagarakatte, S., & Nguyen, T. (2015). Approxhadoop: Bringing approximations to MapReduce frameworks. In Proceedings of the ASPLOS.
Ding, Y., Ansel, J., Veeramachaneni, K., Shen, X., O’Reilly, U. M., & Amarasinghe, S. (2015). Autotuning algorithmic choice for input sensitivity. In Proceedings of the PLDI.
Barati, S., Bartha, F., Biswas, S., Cartwright, R., Duracz, A., Fussell, D., Hoffmann, H., Imes, C., Miller, J., Mishra, N., Arvind, Nguyen, D., Palem, K., Pei, Y., Pingali, K., Sai, R., Wright, A., Yang, Y., & Zhang, S. (2019). Proteus: Language and runtime support for self-adaptive software development. IEEE Software, 36(2), 73–82.
Mahajan, D., Yazdanbakhsh, A., Park, J., Thwaites, B., & Esmaeilzadeh, H. (2016). Towards statistical guarantees in controlling quality tradeoffs for approximate acceleration. In International Symposium on Computer Architecture (ISCA).
Laurenzano, M., Hill, P., Samadi, M., Mahlke, S., Mars, J., & Tang, L. (2016). Input responsiveness: Using canary inputs to dynamically steer approximation. In Proceedings of the PLDI.
Misailovic, S. (2015). Accuracy-Aware Optimization of Approximate Programs. PhD thesis, Massachusetts Institute of Technology, Cambridge, MA.
Acknowledgements
The presentation in this chapter is derived from the author’s Ph.D. dissertation [75]. The results from Case Study 1 appeared first in the FSE 2011 paper [7]. The results from Case Study 2 appeared first in the OOPSLA 2014 paper [27]. The author would like to thank all of his co-authors who contributed to bringing up the theory and practice of accuracy-aware program optimization; special gratitude goes to Martin Rinard, Hank Hoffmann, Stelios Sidiroglou, and Michael Carbin. The author would also like to thank Keyur Joshi, Olivier Sentieys, Hashim Sharif, and Yifan Zhao for providing feedback on the earlier versions of this chapter.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Misailovic, S. (2022). Accuracy-Aware Compilers. In: Bosio, A., Ménard, D., Sentieys, O. (eds) Approximate Computing Techniques. Springer, Cham. https://doi.org/10.1007/978-3-030-94705-7_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-94705-7_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-94704-0
Online ISBN: 978-3-030-94705-7
eBook Packages: EngineeringEngineering (R0)