Automatic Code Parallelization in CUDA Using Reinforcement Learning
Abstract
The use of parallel programming becomes increasingly essential, as well as the use of tools that assist the programmer in the tasks of parallelism and obtaining the best performance of the architecture used. Thus, the objective of this work is to create an optimization of code parallelization in C/C++ that uses Reinforcement Learning to perform the automatic parallelization of CUDA code in GPU. The experiments carried out showed that the optimization created is capable of performing automatic parallelization in CUDA, achieving high speedups.
Keywords:
Automatic Parallelization, GPU, CUDA, Reinforcement Learning
References
Baskaran, M. M., Ramanujam, J., and Sadayappan, P. (2010). Automatic c-to-cuda code generation for affine programs. In Gupta, R., editor, Compiler Construction, pages 244–263, Berlin, Heidelberg. Springer Berlin Heidelberg.
Di, P., Ye, D., Su, Y., Sui, Y., and Xue, J. (2012). Automatic parallelization of tiled loop nests with enhanced fine-grained parallelism on gpus. In 2012 41st International Conference on Parallel Processing, pages 350–359.
Gonçalves, C. O., Spolon, R., Lobato, R. S., Manacero, A., and Lobato, D. C. (2014). Automatic loops parallelization. In 2014 9th Iberian Conference on Information Systems and Technologies (CISTI), pages 1–5.
Mnih, V., Kavukcuoglu, K., Silver, D., Graves, A., Antonoglou, I., Wierstra, D., and Riedmiller, M. A. (2013). Playing atari with deep reinforcement learning. CoRR, abs/1312.5602.
Moreira, K. C. A., Mendonça, G. S. D., Guimarães, B., Alves, P., and Pereira, F. M. Q. (2016). Paralelização automática de código com diretivas openacc. SBLP. SBC.
Neshatpour, K., Sasan, A., and Homayoun, H. (2016). Big data analytics on heterogeneous accelerator architectures. In Hardware/Software Codesign and System Synthesis (CODES+ ISSS), 2016 International Conference on, pages 1–3. IEEE.
Saffran, J., Rocha, R. C., and Goes, L. F. (2020). Neuromp: Paralelização automática de código utilizando aprendizagem por reforço. In Anais do XXI Simpósio em Sistemas Computacionais de Alto Desempenho, pages 85–94, Porto Alegre, RS, Brasil. SBC.
Soares, F., Nobre, C., and Freitas, H. (2019). Parallel programming in computing undergraduate courses: a systematic mapping of the literature. IEEE Latin America Transactions, 17(08):1371–1381.
Di, P., Ye, D., Su, Y., Sui, Y., and Xue, J. (2012). Automatic parallelization of tiled loop nests with enhanced fine-grained parallelism on gpus. In 2012 41st International Conference on Parallel Processing, pages 350–359.
Gonçalves, C. O., Spolon, R., Lobato, R. S., Manacero, A., and Lobato, D. C. (2014). Automatic loops parallelization. In 2014 9th Iberian Conference on Information Systems and Technologies (CISTI), pages 1–5.
Mnih, V., Kavukcuoglu, K., Silver, D., Graves, A., Antonoglou, I., Wierstra, D., and Riedmiller, M. A. (2013). Playing atari with deep reinforcement learning. CoRR, abs/1312.5602.
Moreira, K. C. A., Mendonça, G. S. D., Guimarães, B., Alves, P., and Pereira, F. M. Q. (2016). Paralelização automática de código com diretivas openacc. SBLP. SBC.
Neshatpour, K., Sasan, A., and Homayoun, H. (2016). Big data analytics on heterogeneous accelerator architectures. In Hardware/Software Codesign and System Synthesis (CODES+ ISSS), 2016 International Conference on, pages 1–3. IEEE.
Saffran, J., Rocha, R. C., and Goes, L. F. (2020). Neuromp: Paralelização automática de código utilizando aprendizagem por reforço. In Anais do XXI Simpósio em Sistemas Computacionais de Alto Desempenho, pages 85–94, Porto Alegre, RS, Brasil. SBC.
Soares, F., Nobre, C., and Freitas, H. (2019). Parallel programming in computing undergraduate courses: a systematic mapping of the literature. IEEE Latin America Transactions, 17(08):1371–1381.
Published
2021-07-18
How to Cite
SOARES, Felipe A. L.; SILVEIRA, Tiago B.; MARQUES-NETO, Humberto T.; FREITAS, Henrique C..
Automatic Code Parallelization in CUDA Using Reinforcement Learning. In: WORKSHOP ON PERFORMANCE OF COMPUTER AND COMMUNICATION SYSTEMS (WPERFORMANCE), 20. , 2021, Evento Online.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2021
.
p. 137-142.
ISSN 2595-6167.
DOI: https://doi.org/10.5753/wperformance.2021.15730.
