The use of functional programming library to parallelize on graphics accelerators with CUDA technology
- Autores: Krasnov M.1, Feodoritova O.1
-
Afiliações:
- aKeldysh Institute of Applied Mathematics of Russian Academy of Sciences
- Edição: Nº 1 (2024)
- Páginas: 15-29
- Seção: LANGUAGES, COMPILERS AND PROGRAMMING SYSTEMS
- URL: https://journals.rcsi.science/0132-3474/article/view/259176
- DOI: https://doi.org/10.31857/S0132347424010027
- EDN: https://elibrary.ru/HVJUIU
- ID: 259176
Citar
Resumo
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.
Texto integral
Sobre autores
M. Krasnov
aKeldysh Institute of Applied Mathematics of Russian Academy of Sciences
Autor responsável pela correspondência
Email: kmm@kiam.ru
ORCID ID: 0000-0001-7988-6323
Rússia, Miusskaya sq., 4 Moscow, 125047
O. Feodoritova
aKeldysh Institute of Applied Mathematics of Russian Academy of Sciences
Email: feodor@kiam.ru
ORCID ID: 0000-0002-2792-9376
Rússia, Miusskaya sq., 4 Moscow, 125047
Bibliografia
- TOP 500. URL: https://www.top500.org
- NVIDIA. URL: https://www.nvidia.com
- TOP 50. URL: http://top50.supercomputers.ru
- OpenCL. URL: https://www.khronos.org/opencl/
- OpenACC. URL: https://www.openacc.org
- CUDA Zone. URL: https://developer.nvidia.com/cuda-zone
- 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
- 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
- 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
- Haskell language. URL: https://www.haskell.org/
- 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.
- Milewski B. Category Theory for Programmers. URL: https://github.com/hmemcpy/milewski-ctfp-pdf/releases/download/v1.3.0/category-theory-for-programmers.pdf
- Veldhuizen T. Expression Templates. C++ Report, Vol. 7. 5, June 1995, pp. 26-31.
- Coplien J.O. Curiously recurring template patterns. C++ Report, February 1995, pp. 24-27.
- Abrahams D., Aleksey Gurtovoy. C++ Template Metaprogramming. Addison-Wesley. — 2004. 400 с. ISBN 978-0-321-22725-6.
- 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.
- 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.
- 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.
- Computer complex K-60. URL: https://www.kiam.ru/MVS/resourses/k60.html.