The use of functional programming library to parallelize on graphics accelerators with CUDA technology

Cover Page

Cite item

Full Text

Open Access Open Access
Restricted Access Access granted
Restricted Access Subscription Access

Abstract

Modern graphics accelerators (GPUs) can signi cantly speed up the execution of numerical tasks. However, porting programs to graphics accelerators is not an easy task, sometimes requiring their almost complete rewriting. CUDA graphics accelerators, thanks to technology developed by NVIDIA, allow you to have a single source code for both conventional processors (CPUs) and CUDA. However, in this single source code, you need to somehow tell the compiler which parts of this code to parallelize on shared memory. The use of the functional programming library developed by the authors allows you to hide the use of one or another parallelization mechanism on shared memory within the library and make the user source code completely independent of the computing device used (CPU or CUDA). This article shows how this can be done. 

Full Text

Restricted Access

About the authors

M. M. Krasnov

aKeldysh Institute of Applied Mathematics of Russian Academy of Sciences

Author for correspondence.
Email: kmm@kiam.ru
ORCID iD: 0000-0001-7988-6323
Russian Federation, Miusskaya sq., 4 Moscow, 125047

O. B. Feodoritova

aKeldysh Institute of Applied Mathematics of Russian Academy of Sciences

Email: feodor@kiam.ru
ORCID iD: 0000-0002-2792-9376
Russian Federation, Miusskaya sq., 4 Moscow, 125047

References

  1. TOP 500. URL: https://www.top500.org
  2. NVIDIA. URL: https://www.nvidia.com
  3. TOP 50. URL: http://top50.supercomputers.ru
  4. OpenCL. URL: https://www.khronos.org/opencl/
  5. OpenACC. URL: https://www.openacc.org
  6. CUDA Zone. URL: https://developer.nvidia.com/cuda-zone
  7. Krasnov M.M. Functional Programming Library for C++ // Programming and Computer Software, 2020, v. 46, no. 5, pp. 330–340. http://dx.doi.org/10.1134/S0361768820050047
  8. Krasnov M. M. Operator library for solving three-dimensional grid problems of mathematical physics using graphics cards with CUDA architecture // Mathematical Modeling, 2015, v. 27, no. 3, pp. 109-120. URL: http://www.mathnet.ru/links/38633e7a627ab2ce1527ae4a092be72f/mm3585.pdf
  9. Krasnov M. M. Candidate’s thesis “Grid-operator approach to programming problems of mathematical physics”. Abstract. URL: http://keldysh.ru/council/1/2017-krasnov/avtoref.pdf
  10. Haskell language. URL: https://www.haskell.org/
  11. McLane S. Categories for the working mathematician / Translation from English edited by V.A. Artamonova. M.: FIZMATLIT, 2004. 352 p. ISBN 5-9221-0400-4.
  12. Milewski B. Category Theory for Programmers. URL: https://github.com/hmemcpy/milewski-ctfp-pdf/releases/download/v1.3.0/category-theory-for-programmers.pdf
  13. Veldhuizen T. Expression Templates. C++ Report, Vol. 7. 5, June 1995, pp. 26-31.
  14. Coplien J.O. Curiously recurring template patterns. C++ Report, February 1995, pp. 24-27.
  15. Abrahams D., Aleksey Gurtovoy. C++ Template Metaprogramming. Addison-Wesley. — 2004. 400 с. ISBN 978-0-321-22725-6.
  16. Krasnov M. M. Metaprogramming of C++ templates in problems of mathematical physics. M.: IPM im. M.V. Keldysh, 2017. 84 p. http://dx.doi.org/10.20948/mono-2017-krasnov10.20948/mono-2017-krasnov.
  17. Krasnov M. M. Application of symbolic differentiation to solve a number of computational problems // Preprints of IAM im. M.V. Keldysh. 2017. No. 4. 24 p. http://dx.doi.org/10.20948/prepr-2017-410.20948/prepr-2017-4.
  18. Krasnov M. M. Application of functional programming in solving numerical problems // Preprints of IPM im. M.V. Keldysh. 2019. No. 114. 36 p. http://dx.doi.org/10.20948/prepr-2019-11410.20948/prepr-2019-114.
  19. Computer complex K-60. URL: https://www.kiam.ru/MVS/resourses/k60.html.

Supplementary files

Supplementary Files
Action
1. JATS XML
2. Fig. 1.

Download (54KB)
3. Fig. 2.

Download (35KB)
4. Fig. 3.

Download (32KB)

Copyright (c) 2024 Russian Academy of Sciences

This website uses cookies

You consent to our cookies if you continue to use our website.

About Cookies