Advertisement

Automatic Configuration of GCC Using Irace

  • Leslie Pérez Cáceres
  • Federico Pagnozzi
  • Alberto Franzin
  • Thomas Stützle
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10764)

Abstract

Automatic algorithm configuration techniques have proved to be successful in finding performance-optimizing parameter settings of many search-based decision and optimization algorithms. A recurrent, important step in software development is the compilation of source code written in some programming language into machine-executable code. The generation of performance-optimized machine code itself is a difficult task that can be parametrized in many different possible ways. While modern compilers usually offer different levels of optimization as possible defaults, they have a larger number of other flags and numerical parameters that impact properties of the generated machine-code. While the generation of performance-optimized machine code has received large attention and is dealt with in the research area of auto-tuning, the usage of standard automatic algorithm configuration software has not been explored, even though, as we show in this article, the performance of the compiled code has significant stochasticity, just as standard optimization algorithms. As a practical case study, we consider the configuration of the well-known GNU compiler collection (GCC) for minimizing the run-time of machine code for various heuristic search methods. Our experimental results show that, depending on the specific code to be optimized, improvements of up to 40% of execution time when compared to the -O2 and -O3 optimization flags is possible.

Keywords

Irace Automatic configuration Parameter tuning GCC 

Notes

Acknowledgments

We acknowledge support from the COMEX project (P7/36) within the IAP Programme of the BelSPO. Thomas Stützle acknowledges support from the Belgian F.R.S.-FNRS, of which he is a senior research associate. The authors would like to thank Manuel López-Ibáñez for his many helpful remarks and assistance.

References

  1. 1.
    Ansel, J., Kamil, S., Veeramachaneni, K., Ragan-Kelley, J., Bosboom, J., O’Reilly, U.M., Amarasinghe, S.: OpenTuner: an extensible framework for program autotuning. In: Proceedings of the 23rd International Conference on Parallel Architectures and Compilation, pp. 303–315. ACM, New York (2014)Google Scholar
  2. 2.
    Ansótegui, C., Sellmann, M., Tierney, K.: A gender-based genetic algorithm for the automatic configuration of algorithms. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 142–157. Springer, Heidelberg (2009).  https://doi.org/10.1007/978-3-642-04244-7_14 CrossRefGoogle Scholar
  3. 3.
    Birattari, M., Yuan, Z., Balaprakash, P., Stützle, T.: F-race and iterated F-race: an overview. In: Bartz-Beielstein, T., Chiarandini, M., Paquete, L., Preuss, M. (eds.) Experimental Methods for the Analysis of Optimization Algorithms, pp. 311–336. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-02538-9_13 CrossRefGoogle Scholar
  4. 4.
    Blackmore, C., Ray, O., Eder, K.: Automatically tuning the GCC compiler to optimize the performance of applications running on the ARM cortex-M3. Technical report, CoRR (2017). https://arxiv.org/abs/1703.08228
  5. 5.
    Christen, M., Schenk, O., Burkhart, H.: PATUS: a code generation and autotuning framework for parallel iterative stencil computations on modern microarchitectures. In: Proceedings of the 2011 IEEE International Parallel & Distributed Processing Symposium, IPDPS 2011, pp. 676–687. IEEE Computer Society (2011)Google Scholar
  6. 6.
    Frigo, M., Johnson, S.G.: The design and implementation of FFTW3. Proc. IEEE 93(2), 216–231 (2005). Special Issue on “Program Generation, Optimization, and Platform Adaptation”CrossRefGoogle Scholar
  7. 7.
    Fursin, G., Kashnikov, Y., Memon, A.W., Chamski, Z., Temam, O., Namolaru, M., Yom-Tov, E., Mendelson, B., Zaks, A., Courtois, E., Bodin, F., Barnard, P., Ashton, E., Bonilla, E., Thomson, J., Williams, C.K.I., O’Boyle, M.: Milepost GCC: machine learning enabled self-tuning compiler. Int. J. Parallel Prog. 39(3), 296–327 (2011)CrossRefGoogle Scholar
  8. 8.
    GNU Project, Free Software Foundation: GCC, the GNU compiler collection (1987). https://www.gcc.gnu.org
  9. 9.
    Helsgaun, K.: An effective implementation of the Lin-Kernighan traveling salesman heuristic. Eur. J. Oper. Res. 126, 106–130 (2000)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Helsgaun, K.: General \(k\)-opt submoves for the Lin-Kernighan TSP heuristic. Math. Program. Comput. 1(2–3), 119–163 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Henning, J.L.: SPEC CPU2000: measuring CPU performance in the new millennium. Computer 33(7), 28–35 (2000)CrossRefGoogle Scholar
  12. 12.
    Hoos, H.H.: Automated algorithm configuration and parameter tuning. In: Hamadi, Y., Monfroy, E., Saubion, F. (eds.) Autonomous Search, pp. 37–71. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-21434-9_3 CrossRefGoogle Scholar
  13. 13.
    Hoste, K., Eeckhout, L.: Cole: compiler optimization level exploration. In: Proceedings of the 6th Annual IEEE/ACM International Symposium on Code Generation and Optimization, CGO 2008, pp. 165–174. ACM Press, New York (2008)Google Scholar
  14. 14.
    Hutter, F., Hoos, H.H., Leyton-Brown, K.: Sequential model-based optimization for general algorithm configuration. In: Coello, C.A.C. (ed.) LION 2011. LNCS, vol. 6683, pp. 507–523. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-25566-3_40 CrossRefGoogle Scholar
  15. 15.
    Hutter, F., Hoos, H.H., Leyton-Brown, K., Stützle, T.: ParamILS: an automatic algorithm configuration framework. J. Artif. Intell. Res. 36, 267–306 (2009)zbMATHGoogle Scholar
  16. 16.
    Ladd, S.R.: ACOVEA (Analysis of compiler options via evolutionary algorithm) (2000). https://github.com/Acovea/libacovea
  17. 17.
    López-Ibáñez, M., Dubois-Lacoste, J., Pérez Cáceres, L., Stützle, T., Birattari, M.: The irace package: iterated racing for automatic algorithm configuration. Operat. Res. Perspect. 3, 43–58 (2016)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Pérez Cáceres, L., Bischl, B., Stützle, T.: Evaluating random forest models for irace. In: GECCO 2017 Companion. ACM Press (2017)Google Scholar
  19. 19.
    Pérez Cáceres, L., Pagnozzi, F., Franzin, A., Stützle, T.: Automatic configuration of GCC using irace: supplementary material (2017). http://iridia.ulb.ac.be/supp/IridiaSupp2017-009/
  20. 20.
    Plotnikov, D., Melnik, D., Vardanyan, M., Buchatskiy, R., Zhuykov, R., Lee, J.H.: Automatic tuning of compiler optimizations and analysis of their impact. In: Alexandrov, V., et al. (eds.) 2013 International Conference on Computational Science. Procedia Computer Science, vol. 18, pp. 1312–1321. Elsevier, Amsterdam (2013)Google Scholar
  21. 21.
    Püschel, M., Franchetti, F., Voronenko, Y.: Spiral. In: Padua, D. (ed.) Encyclopedia of Parallel Computing, pp. 1920–1933. Springer, Boston (2011).  https://doi.org/10.1007/978-0-387-09766-4_244 Google Scholar
  22. 22.
    Siegel, S., Castellan Jr., N.J.: Non Parametric Statistics for the Behavioral Sciences, 2nd edn. McGraw Hill, New York (1988)Google Scholar
  23. 23.
    Stützle, T.: ACOTSP: a software package of various ant colony optimization algorithms applied to the symmetric traveling salesman problem (2002). http://www.aco-metaheuristic.org/aco-code/
  24. 24.
    Stützle, T., López-Ibáñez, M.: Automatic (offline) configuration of algorithms. In: Laredo, J.L.J., et al. (eds.) GECCO (Companion), pp. 681–702. ACM Press, New York (2015)CrossRefGoogle Scholar
  25. 25.
    Whaley, C.R.: Atlas (automatically tuned linear algebra software). In: Padua, D. (ed.) Encyclopedia of Parallel Computing, pp. 95–101. Springer, Boston (2011).  https://doi.org/10.1007/978-0-387-09766-4 Google Scholar
  26. 26.
    Wright, M.N., Ziegler, A.: ranger: a fast implementation of random forests for high dimensional data in C++ and R. Arxiv preprint arXiv:1508.04409 [stat.ML] (2015)
  27. 27.
    Zitzler, E., Laumanns, M., Thiele, L.: SPEA2: improving the strength pareto evolutionary algorithm for multiobjective optimization. In: Giannakoglou, K.C., et al. (eds.) EUROGEN, pp. 95–100. CIMNE, Barcelona (2002)Google Scholar

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Leslie Pérez Cáceres
    • 1
  • Federico Pagnozzi
    • 1
  • Alberto Franzin
    • 1
  • Thomas Stützle
    • 1
  1. 1.IRIDIA, CoDEUniversité Libre de BruxellesBrusselsBelgium

Personalised recommendations