Abstract
Apresenta-se neste trabalho uma comparação entre duas arquiteturas para computação paralela: Compute Unified Device Architecture (CUDA) e Open Computing Language (OpenCL). Alguns trabalhos na literatura apresentaram uma comparação de desempenho computacional entre as duas arquiteturas. Entretanto, ainda não existe algum artigo recente e completo que destaca claramente qual arquitetura pode ser considerada a mais eficiente. O objetivo deste trabalho é realizar uma comparação apenas em nível de hardware, software, tendências tecnológicas e facilidades de utilização, evidenciando aquela que pode apresentar o melhor desempenho de uma maneira geral. Para tal, descreve-se os principais trabalhos que já fizeram uso de pelo menos uma das arquiteturas. Observou-se que, por ser um sistema heterogêneo, a escolha do OpenCL pode parecer mais óbvia. No entanto, foi possível concluir que CUDA, apesar de poder ser utilizada apenas nas placas gráficas da NVIDIA®, tem sido uma referência e mais utilizada ultimamente.
Palavras-chave: CUDA. OpenCL. GPU.
Cuda vs. Opencl: a theoretical and technological comparison
Abstract
This paper presents a comparison between two architectures for parallel computing: Compute Unified Device Architecture (CUDA) and Open Computing Language (OpenCL). Some works in the literature have presented a computational performance comparison of the two architectures. However, there is not some complete and recent paper that highlights clearly which architecture can be considered the most efficient. The goal is to make a comparison only in level of hardware, software, technological trends and ease of use, highlighting one that may present the best cost-effective in general. To this end, we describe the main works that have used at least one of the architectures. It was observed that the choice of OpenCL may seem more obvious for being a heterogeneous system. Nevertheless, it was concluded that CUDA, although it can be used only in graphics cards from NVIDIA®, has been a reference and more used recently.
Keywords: CUDA. OpenCL. GPU.
References
BARAK, A. et al. A package for OpenCL based heterogeneous computing on clusters with many GPU devices. In: CLUSTER COMPUTING WORKSHOPS AND POSTERS (CLUSTER WORKSHOPS), 2010, Heraklion. Proceedings…Heraklion: IEEE International Conference, 2010. p. 1-7.
BUENO, A. L. C.; RODRIGUEZ, N. R.; SOTELINO, E. D. Resolução de sistemas de equações lineares de grande porte em clusters multi-GPU utilizando o método do gradiente conjugado em OpenCL. 2013. Dissertação (Mestrado em Informática) - Departamento de Informática da PUC-Rio, Rio de Janeiro, 2013.
FABRIS, F.; KROHLING, R. A. A co-evolutionary differential evolution algorithm for solving min-max optimization problems implemented on GPU using C-CUDA. Expert Systems with Applications, v. 39, n. 12, p. 10324-10333, 2012.
FANG, J.; VARBANESCU, A. L.; SIPS, H. A comprehensive performance comparison of CUDA and OpenCL. In: PARALLEL PROCESSING (ICPP) INTERNATIONAL CONFERENCE, 2011. Taipei City. Proceedings…Taipei City: [s.n.]. p. 216-225, 2011.
FLYNN, M. J.; RUDD, K. W. Parallel Architectures. ACM Computing Surveys (CSUR), v. 28, n. 1, p. 67-70, 1996.
GAIOSO, R. R. et al. Paralelização do algoritmo Floyd-Warshall usando GPU. In: SIMPÓSIO EM SISTEMAS COMPUTACIONAIS, XIV., 2013. Porto de Galinhas, PE. Anais... Porto de Galinhas: UFPE. p. 19-25, 2013.
GREWE, D.; OBOYLE, M. A static task partitioning approach for heterogeneous systems using OpenCL. In: INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION: PART OF THE JOINT EUROPEAN CONFERENCES ON THEORY AND PRACTICE OF SOFTWARE, 20th., 2011. Uk. Proceedings…Uk: ACM. p. 286-305, 2011.
KARIMI, K.; DICKSON, N.; HAMZE, F. A performance comparison of CUDA and OpenCL. arXiv preprint arXiv:1005.2581, 2010.
KIRK, D. NVIDIA cuda software and gpu parallel computing architecture. [S.l.]: NVIDIA Corporation, 2008.
KHRONOS GROUP. The open standard for parallel programming of heterogeneous systems. Disponívelem: <http://www.khronos.org/opencl/>. Acesso em: dez. 2013.
KOMATSU, K. et al. Evaluating performance and portability of OpenCL programs. In INTERNATIONAL WORKSHOP ON AUTOMATIC PERFORMANCE TUNING., 5th, 2010. [S.l.]. Proceeding… [S.l.: s.n.], 2010.
KONG, J. et al. Accelerating MATLAB image processing toolbox functions on GPUs.In: WORKSHOP ON GENERAL-PURPOSE COMPUTATION ON GRAPHICS PROCESSING UNITS.,3th, 2010. [S.l.]. Proceedings… [S.l.: s.n.]. p. 75-85, 2010.
LITTLE, J; MOLER, C. MATLAB GPU Computing Support for NVIDIA CUDA-Enabled GPUs. The MathWorks, Inc. Disponível em: <http://www.mathworks.com/discovery/matlab-gpu.html>. Acesso em: dez. 2013.
LIU, X.; CHENG, L.; ZHOU, Q. Research and Comparison of CUDA GPU Programming in MATLAB and Mathematica. In: CHINESE INTELLIGENT AUTOMATION CONFERENCE, 2013. [S.l.]. Proceedings… [S.l.: s.n.]. p. 251-257, 2013.
NAVAUX, P. O. A. Introdução ao processamento paralelo. Revista Brasileira de Computação, v. 5, n. 2, p. 31-43, 1989.
NVIDIA CUDA. Accelerating MATLAB with CUDA. NVIDIA Corporation, v. 1, 2007.
______. NVIDIA CUDA C Programming Best PracticesGuide. [S.l.]: NVIDIA Corporation, 2009.
______. NVIDIA CUDA C ProgrammingGuide. NVIDIA Corporation, ed. 5.0. [S.l.]: NVIDIA Corporation, 2013.
______. OpenCL Programming Guide for the CUDA Architecture. [S.l.]: NVIDIA Corporation, 2010.
PAULA, L. C. M. et al. Aplicação de Processamento Paralelo em método iterativo para solução de sistemas lineares. In: ENCONTRO ANUAL DE COMPUTAÇÃO. X., 2013a, Catalão. Anais... Catalão: UFG. p. 129-136, 2013a.
PAULA, L. C. M. et al. Partial Parallelization of the Successive Projections Algorithm using Compute Unified Device Architecture. In: INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED PROCESSING TECHNIQUES AND APPLICATIONS. 19th., 2013b, [S.l.]. Proceedings… [S.l.: s.n.]. p. 737-741, 2013b.
PAULA, L. C. M. Paralelização e comparação de métodos iterativos na solução de sistemas lineares grandes e esparsos. ForScience: Revista Científica do IFMG, v. 1, n. 1, p. 01-12, 2013c.
______. Implementação Paralela do Método BiCGStab(2) em GPU usando CUDA e Matlab para Solução de Sistemas Lineares. Revista de Sistemas e Computação, v. 3, n.2, p. 125-131, 2013d.
______. Programação Paralela de um Método Iterativo para Solução de Grandes Sistemas de Equações Lineares usando a Integração CUDA-Matlab. Revista de Sistemas e Computação (Aceito para publicação), v. 4, n. 1, 2014a.
PAULA, L. C. M. et al. Parallelization of a Modified Firefly Algorithm using GPU for Variable Selection in a Multivariate Calibration Problem. International Journal of Natural Computing Research, v. 4, n. 1, p. 31-42, 2014b.
QUINN, M. J. Parallel Programming. TMH CSE, v. 526, 2003.
REESE, J.; ZARANEK, S. GPU Programming in MATLAB. The MathWorks, Inc., 2011. Disponível em: <http://www.mathworks.com/company/newsletters/articles/gpu-programming-in-matlab.html>. Acesso em: dez. 2013.
SIMEK, V.; ASN, R. R. Gpu acceleration of 2d-dwt image compression in matlab with cuda. In: COMPUTER MODELING AND SIMULATION, 2008. EMS'08. SECOND UKSIM EUROPEAN SYMPOSIUM, 2008, Liverpool. Proceedings… Liverpool: [s.n.]. p. 274-277, 2008.
SMITH, S. M. The GPU Computing Revolution. [S.l.: s.n.] 2011.
STALLINGS, W. Arquitetura e Organização de Computadores. 5. ed. São Paulo: Prentice Hall, 2002.
STONE, J.; GOHARA, D.; SHI, G. OpenCL: a parallel programming standard for heterogeneous computing systems. Computing in science & engineering, v. 12, n. 3, p. 66, 2010.
SUGANUMA, T. et al. Scaling analytics applications with OpenCL for loosely coupled heterogeneous clusters. In: ACM International Conference on Computing Frontiers, 2013, New York. Proceedings… New York: ACM. p. 35, 2013.
TSUCHIYAMA, R. The OpenCL Programming Book. [S.l.]: Fixstars, 2010.
YLDIRIM, A. A.; OZDOGAN, C. Parallel wavelet-based clustering algorithm on GPUs using CUDA. Procedia Computer Science, v. 3, 396-400, 2011.
Authors who post on ForScience agree to the following terms:
- The said work is of own authorship and has never been published or sent to another magazine, this magazine having the right of exclusivity on the edition and publication, under the license Creative Commons Attribution License 3.0 (CC-BY-NC) which allows anyone to share to adapt the work according to the following terms:
Atribuição — You must give the appropriate credit, provide a link to the license and indicate if the changes have been made. You must do so in any reasonable circumstance, but in no way do you suggest to the licensor to support you or your use.
Non-Commercial — You may not use the material for commercial purposes.
- If plagiarism has been proven in any published work, this Journal is free of any responsibility, and its author (s) shall bear the penalties provided by law.
- Authors are authorized to take additional contracts separately, for non-exclusive distribution of the version of the work published in this journal (eg, publish in institutional repository or as a book chapter), with acknowledgment of authorship and initial publication in this journal.
- Authors are allowed and encouraged to publish and distribute their work online (eg in institutional repositories or on their personal page), as this can generate productive changes, as well as increase the impact and citation of the published work. However, it should be noted that once approved by the evaluators, the manuscript can not be changed. If the author wishes to do so, he should restart the submission process.
