Skip to main content

Model Checking Meets Auto-Tuning of High-Performance Programs

  • Conference paper
  • First Online:
Logic-Based Program Synthesis and Transformation (LOPSTR 2022)

Abstract

The paper aims at combining two research areas that traditionally have been disjoint: 1) model checking as used in formal verification, and 2) auto-tuning as used in high-performance computing. Our auto-tuning is an important use case of the general concept of automated algorithm configuration and parameter tuning: we optimize parallel programs by finding the optimal values of the performance-critical program parameters for a particular high-performance architecture and input data size. There are many parameters that influence a program’s performance, such that finding the optimal configuration of these parameters is a hardly manageable task even for experts in high-performance computing. Auto-tuning helps to automate this process; however, it is usually very time-consuming. In this paper, we propose to apply model checking for accelerating auto-tuning by using a counter- example constructed during the verification of the optimality property of the program. We describe a proof-of-concept implementation of our approach for auto-tuning programs written in OpenCL – the standard for programming modern multi-core CPU (Central Processing Units) and many-core GPU (Graphics Processing Units) – using the popular SPIN verifier and its model representation language Promela.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 59.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Ansel, J., Kamil, S., Veeramachaneni, K., et al.: Opentuner: an extensible framework for program autotuning. In: Proceedings of 2017 IEEE International Parallel and Distributed Processing Symposium (IPDPS), pp. 385–392. IEEE (2017)

    Google Scholar 

  2. Brinksma, E., Mader, A., Fehnker, A.: Verification and optimization of a PLC control schedule. Int. J. Softw. Tools Technol. Transf. 4, 21–33 (2002)

    Article  Google Scholar 

  3. Christen, M., Schenk, O., Burkhart, H.: PATUS: a code generation and autotuning framework for parallel iterative stencil computations on modern microarchitectures. In: Proceedings of 2011 IEEE International Parallel Distributed Processing Symposium, pp. 385–392. IEEE (2011)

    Google Scholar 

  4. Cimatti, A., Edelkamp, S., Fox, M., Magazzeni, D., Plaku, E.: Automated planning and model checking (Seminar 14482). Dagstuhl Rep. 4(11), 227–245 (2015). https://doi.org/10.4230/DagRep.4.11.227

    Article  Google Scholar 

  5. Clarke, E.M., Henzinger, T.A., Veith, H. (eds.) Handbook of Model Checking. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-10575-8

  6. Clint, W., Dongarra, J.: Automatically tuned linear algebra software. In: Proceedings of the ACM/IEEE Conference on Supercomputing, pp. 385–392. IEEE (1998)

    Google Scholar 

  7. Frigo, M., Johnson, S.G.: The design and implementation of FFTW3. IEEE 93(2), 187–195 (2005)

    Article  Google Scholar 

  8. Garanina, N., Staroletov, S.: Discussed models in Promela (2022). https://github.com/SergeyStaroletov/PromelaSamples/tree/master/autotune_opencl

  9. Garanina, N.O., Gorlatch, S.P.: Autotuning parallel programs by model checking. Model. Anal. Inf. Syst. 28(4), 338–355 (2021). in Russian

    Article  MathSciNet  Google Scholar 

  10. Gaspari, M., Zavattaro, G.: An Algebra of Actors. In: Ciancarini, P., Fantechi, A., Gorrieri, R. (eds.) FMOODS 1999. ITIFIP, vol. 10, pp. 3–18. Springer, Boston (1999). https://doi.org/10.1007/978-0-387-35562-7_2

    Chapter  Google Scholar 

  11. Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, Hoboken (1985)

    Google Scholar 

  12. Holzmann, G.J.: The SPIN Model Checker: Primer and Reference Manual. Addison-Wesley Professional, Boston (2003)

    Google Scholar 

  13. Holzmann, G.J., Joshi, R., Groce, A.: Tackling large verification problems with the swarm tool. In: Havelund, K., Majumdar, R., Palsberg, J. (eds.) SPIN 2008. LNCS, vol. 5156, pp. 134–143. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-85114-1_11

    Chapter  MATH  Google Scholar 

  14. Holzmann, G.J., Joshi, R., Groce, A.: Swarm verification techniques. IEEE Trans. Softw. Eng. 37(6), 845–857 (2010)

    Article  Google Scholar 

  15. 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

    Chapter  Google Scholar 

  16. Khronos: OpenCL specification by Khronos OpenCL working group 2021 (2021). https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html

  17. Lashgar, A., Baniasadi, A., Khonsari, A.: Warp size impact in GPUs: large or small? In: Proceedings of the 6th Workshop on General Purpose Processor Using Graphics Processing Units, pp. 146–152 (2013)

    Google Scholar 

  18. Lazreg, S., Cordy, M., Collet, P., Heymans, P., Mosser, S.: Multifaceted automated analyses for variability-intensive embedded systems. In: 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE), pp. 854–865. IEEE (2019)

    Google Scholar 

  19. Malik, R., Pena, P.: Optimal task scheduling in a flexible manufacturing system using model checking. IFAC-PapersOnLine 51(7), 230–235 (2018)

    Article  Google Scholar 

  20. Nimble-code: Promela language grammar (2021). http://spinroot.com/spin/Man/grammar.html

  21. Nugteren, C., Codreanu, V.: Cltune: a generic auto-tuner for OpenCL kernels. In: Proceedings of 9th International Symposium on Embedded Multicore/Many-core Systems-on-Chip, pp. 385–392. IEEE (2015)

    Google Scholar 

  22. Panizo, L., Salmerón, A., Gallardo, M.D.M., Merino, P.: Guided test case generation for mobile apps in the TRIANGLE project: work in progress. In: Proceedings of the 24th ACM SIGSOFT International SPIN Symposium on Model Checking of Software, pp. 192–195 (2017)

    Google Scholar 

  23. Rasch, A., Gorlatch, S.: ATF: a generic directive-based auto-tuning framework. Concurrency Comput. Pract. Experience 31(5), e4423 (2019). https://doi.org/10.1002/cpe.4423

    Article  Google Scholar 

  24. Ruys, T.C., Brinksma, E.: Experience with literate programming in the modelling and validation of systems. In: Proceedings of the 4th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS 1998), pp. 393–408 (1998)

    Google Scholar 

  25. Ruys, T.C.: Optimal scheduling using branch and bound with SPIN 4.0. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, pp. 1–17. Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-44829-2_1

    Chapter  Google Scholar 

  26. Staroletov, S.: Model checking games and a genome sequence search. In: Journal of Physics: Conference Series, vol. 1679, p. 032020. IOP Publishing (2020)

    Google Scholar 

  27. Subhlok, J., Stichnoth, J.M., O’hallaron, D.R., Gross, T.: Exploiting task and data parallelism on a multicomputer. In: Proceedings of the Fourth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 13–22 (1993)

    Google Scholar 

  28. Wijs, A., Pol, J.V.D., Bortnik, E.M.: Solving scheduling problems by untimed model checking: the clinical chemical analyser case study. Int. J. Softw. Tools Technol. Transf. 11(5), 375–392 (2016)

    Article  Google Scholar 

Download references

Acknowledgements

We are grateful to the anonymous referees for their great effort in helping us to improve the paper. Natalia Garanina was supported by the scholarship of DAAD (German Academic Exchange Service). Sergei Gorlatch was partially funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) within the project Nr. 470527619 (PPP-DL) at the University of Muenster.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Natalia Garanina .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Garanina, N., Staroletov, S., Gorlatch, S. (2022). Model Checking Meets Auto-Tuning of High-Performance Programs. In: Villanueva, A. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2022. Lecture Notes in Computer Science, vol 13474. Springer, Cham. https://doi.org/10.1007/978-3-031-16767-6_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-16767-6_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-16766-9

  • Online ISBN: 978-3-031-16767-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics