Skip to main content

Term Rewriting on GPUs

  • Conference paper
  • First Online:
Fundamentals of Software Engineering (FSEN 2021)

Abstract

We present a way to implement term rewriting on a GPU. We do this by letting the GPU repeatedly perform a massively parallel evaluation of all subterms. We find that if the term rewrite systems exhibit sufficient internal parallelism, GPU rewriting substantially outperforms the CPU. Since we expect that our implementation can be further optimized, and because in any case GPUs will become much more powerful in the future, this suggests that GPUs are an interesting platform for term rewriting. As term rewriting can be viewed as a universal programming language, this also opens a route towards programming GPUs by term rewriting, especially for irregular computations.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.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

Similar content being viewed by others

Notes

  1. 1.

    https://jinja.palletsprojects.com.

  2. 2.

    See [21, Appendix A] for a detailed description of the TRSs.

References

  1. Amdahl, G.M.: Validity of the single processor approach to achieving large scale computing capabilities. In: SJCC, New York, NY, USA, pp. 483–485. ACM (1967)

    Google Scholar 

  2. Barendregt, H.P., van Eekelen, M.C.J.D., Plasmeijer, M.J., Hartel, P.H., Hertzberger, L.O., Vree, W.G.: The Dutch parallel reduction machine project. Future Gen. Comput. Syst. 3(4), 261–270 (1987)

    Article  Google Scholar 

  3. Bosnacki, D., Edelkamp, S., Sulewski, D., Wijs, A.: GPU-PRISM: an extension of PRISM for general purpose graphics processing units. In: PDMC-HiBi, pp. 17–19. IEEE Computer Society (2010)

    Google Scholar 

  4. Bošnački, D., Odenbrett, M.R., Wijs, A.J., Ligtenberg, W.P.A., Hilbers, P.A.J.: Efficient reconstruction of biological networks via transitive reduction on general purpose graphics processors. BMC Bioinform. 13(281), 1–13 (2012)

    MATH  Google Scholar 

  5. Bunte, O., et al.: The mCRL2 toolset for analysing concurrent systems. In: Vojnar, T., Zhang, L. (eds.) TACAS 2019. LNCS, vol. 11428, pp. 21–39. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-17465-1_2

    Chapter  Google Scholar 

  6. Cheng, J., Grossman, M.: Professional CUDA C Programming. Wiley, New York (2014)

    Google Scholar 

  7. Dejanović, I., Vaderna, R., Milosavljević, G., Vuković, Ž: TextX: a Python tool for domain-specific languages implementation. Knowl.-Based Syst. 115, 1–4 (2017)

    Article  Google Scholar 

  8. Durán, F., Garavel, H.: The rewrite engines competitions: a RECtrospective. In: Beyer, D., Huisman, M., Kordon, F., Steffen, B. (eds.) TACAS 2019. LNCS, vol. 11429, pp. 93–100. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-17502-3_6

    Chapter  Google Scholar 

  9. Gustafson, J.L.: Reevaluating Amdahl’s law. Commun. ACM 31(5), 532–533 (1988)

    Article  Google Scholar 

  10. Heldens, S., Hijma, P., Van Werkhoven, B., Maassen, J., Belloum, A.S.Z., Van Nieuwpoort, R.V.: The landscape of exascale research: a data-driven literature analysis. ACM Comput. Surv. 53(2), 1–43 (2020)

    Article  Google Scholar 

  11. Henriksen, T., Elsmanand, M., Oancea, C.E.: Modular acceleration: tricky cases of functional high-performance computing. In: FHPC, pp. 10–21. ACM (2018)

    Google Scholar 

  12. Henriksen, T., Serup, N.G.W., Elsman, M., Henglein, F., Oancea, C.E.: Futhark: purely functional GPU-programming with nested parallelism and in-place array updates. In: PLDI, pp. 556–571. ACM (2017)

    Google Scholar 

  13. Hijma, P., Nieuwpoort, R.V., Jacobs, C.J.H., Bal, H.E.: Stepwise-refinement for performance: a methodology for many-core programming. Concurr. Comput. Pract. Exp. 27(17), 4515–4554 (2015)

    Article  Google Scholar 

  14. Huet, G., Lankford, D.: On the uniform halting problem for term rewriting systems. Rapport de Recherche No. 283. IRIA, March 1978

    Google Scholar 

  15. Lee, V.W., et al.: Debunking the 100X GPU vs. CPU myth. In: ISCA. ACM Press (2010)

    Google Scholar 

  16. McDonell, T.L.: Optimising purely functional GPU programs. Ph.D. thesis, University of New South Wales, Sydney, Australia (2015)

    Google Scholar 

  17. Nasre, R., Burtscher, M., Pingali, K.: Data-driven versus topology-driven irregular computations on GPUs. In: IPDPS, 20–24 May 2013, pp. 463–474. IEEE Computer Society (2013)

    Google Scholar 

  18. Nasre, R., Burtscher, M., Pingali, K.: Morph algorithms on GPUs. In: PPOPP, pp. 147–156. ACM SIGPLAN (2013)

    Google Scholar 

  19. Jones, S.L.P., Clack, C., Salkild, J., Hardie, M.: GRIP—a high-performance architecture for parallel graph reduction. In: Kahn, G. (ed.) FPCA 1987. LNCS, vol. 274, pp. 98–112. Springer, Heidelberg (1987). https://doi.org/10.1007/3-540-18317-5_7

    Chapter  Google Scholar 

  20. Terese. Term Rewriting Systems. Number 55 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press (2003)

    Google Scholar 

  21. van Eerd, J., Groote, J.F., Hijma, P., Martens, J., Wijs, A.: Term rewriting on GPUs (2020). http://arxiv.org/abs/2009.07174

  22. Wijs, A., Neele, T., Bošnački, D.: GPUexplore 2.0: unleashing GPU explicit-state model checking. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016. LNCS, vol. 9995, pp. 694–701. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-48989-6_42

    Chapter  Google Scholar 

Download references

Acknowledgment

This work is carried out in the context of the NWO AVVA project 612.001751. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the GeForce Titan RTX used for this research.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jan Friso Groote .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

van Eerd, J., Groote, J.F., Hijma, P., Martens, J., Wijs, A. (2021). Term Rewriting on GPUs. In: Hojjat, H., Massink, M. (eds) Fundamentals of Software Engineering. FSEN 2021. Lecture Notes in Computer Science(), vol 12818. Springer, Cham. https://doi.org/10.1007/978-3-030-89247-0_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-89247-0_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-89246-3

  • Online ISBN: 978-3-030-89247-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy