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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
See [21, Appendix A] for a detailed description of the TRSs.
References
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)
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)
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)
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)
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
Cheng, J., Grossman, M.: Professional CUDA C Programming. Wiley, New York (2014)
Dejanović, I., Vaderna, R., Milosavljević, G., Vuković, Ž: TextX: a Python tool for domain-specific languages implementation. Knowl.-Based Syst. 115, 1–4 (2017)
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
Gustafson, J.L.: Reevaluating Amdahl’s law. Commun. ACM 31(5), 532–533 (1988)
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)
Henriksen, T., Elsmanand, M., Oancea, C.E.: Modular acceleration: tricky cases of functional high-performance computing. In: FHPC, pp. 10–21. ACM (2018)
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)
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)
Huet, G., Lankford, D.: On the uniform halting problem for term rewriting systems. Rapport de Recherche No. 283. IRIA, March 1978
Lee, V.W., et al.: Debunking the 100X GPU vs. CPU myth. In: ISCA. ACM Press (2010)
McDonell, T.L.: Optimising purely functional GPU programs. Ph.D. thesis, University of New South Wales, Sydney, Australia (2015)
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)
Nasre, R., Burtscher, M., Pingali, K.: Morph algorithms on GPUs. In: PPOPP, pp. 147–156. ACM SIGPLAN (2013)
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
Terese. Term Rewriting Systems. Number 55 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press (2003)
van Eerd, J., Groote, J.F., Hijma, P., Martens, J., Wijs, A.: Term rewriting on GPUs (2020). http://arxiv.org/abs/2009.07174
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
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 IFIP International Federation for Information Processing
About this paper
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)