CFP last date
20 January 2025
Reseach Article

A Methodology for Translating C-Programs to OpenCL

by Krishnahari Thouti, S. R. Sathe
International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
Volume 82 - Number 3
Year of Publication: 2013
Authors: Krishnahari Thouti, S. R. Sathe
10.5120/14095-2109

Krishnahari Thouti, S. R. Sathe . A Methodology for Translating C-Programs to OpenCL. International Journal of Computer Applications. 82, 3 ( November 2013), 11-15. DOI=10.5120/14095-2109

@article{ 10.5120/14095-2109,
author = { Krishnahari Thouti, S. R. Sathe },
title = { A Methodology for Translating C-Programs to OpenCL },
journal = { International Journal of Computer Applications },
issue_date = { November 2013 },
volume = { 82 },
number = { 3 },
month = { November },
year = { 2013 },
issn = { 0975-8887 },
pages = { 11-15 },
numpages = {9},
url = { https://ijcaonline.org/archives/volume82/number3/14095-2109/ },
doi = { 10.5120/14095-2109 },
publisher = {Foundation of Computer Science (FCS), NY, USA},
address = {New York, USA}
}
%0 Journal Article
%1 2024-02-06T21:56:47.668006+05:30
%A Krishnahari Thouti
%A S. R. Sathe
%T A Methodology for Translating C-Programs to OpenCL
%J International Journal of Computer Applications
%@ 0975-8887
%V 82
%N 3
%P 11-15
%D 2013
%I Foundation of Computer Science (FCS), NY, USA
Abstract

Graphics Processing Units (GPUs) is currently a common feature of high performance computing. Languages such as CUDA and Open Computing Language (OpenCL) are such programming models; provide a standard interface for achieving high performance across these GPU devices. However, because of the wide variety of architectural complexities of these GPU devices; often makes difficult to write programs for these platforms. One of the approaches to get rid off this difficulty is to parallelize sequential programs into equivalent parallel programs. In this paper, we present a methodology for parallelization of sequential C-programs with function calls to equivalent OpenCL programs with little assistance from programmer. Our proposed methodology identifies function calls and converts them into 'kernel' to be executed in parallel on GPU devices. To the best of our knowledge, there are no tools dedicated to conversion of C code to equivalent OpenCL code.

References
  1. General-purpose computations using Graphics hardware, http://www. gpgpu. org/
  2. I. Buck, T. Foley, D. Horn, J. Sugerman, K. Fathalian, M. Houston and P. Hanrahan, "Brook for GPUs: Stream Computing on Graphics Hardware," ACM Trans. Graph, Vol. 23, No. 3, 2004, pp. 777-786
  3. NVIDIA CUDA, http://developer. nvidia. com/cuda/
  4. OpenCL, http://www. khronos. org/registry/cl/
  5. Lee, S. , Min, S-J. , Eigermann, R. : OpenMP to GPGPU: A compiler framework for automatic translation and optimization. In: PPoPP, pp. 101-110 (2009)
  6. Baskaran, M. , Ramanujam, J. , Sadayappan, P. : Automatic C-to-CUDA generation for Affine Programs. Compiler Construction. Lecture Notes in Computer Science, Vol. 6011. pp. 244-263 (2010)
  7. CLooG, The Chunky Loop Generator, http://www. cloog. org/
  8. Pluto, http://pluto-compiler. sourceforge. net/
  9. Cornwall, J. L. T. , Beckmann, O. , Kelly, P. H. . : Automatically translating general purpose C++ image processing library for GPUs. In: POHLL. pp. 381 (2006)
  10. Ueng, S-z. , Lathara, M. , Baghsorkhi, S. , Hwu, W-m. : CUDA-Lite: Reducing GPU Programming Complexity, Languages & compilers for parallel computing. Lecture Notes in Computer Science, Vol. 5335. pp. 1-15 (2008)
  11. Han, T. D. , Abdelrahman, T. S. : hiCUDA: A high-level directive based language for GPU programming. In: GPGPU -2. pp. 52-61 (2009)
  12. Martinex, G. , Gardener, M. , Feng, W-c. : CU2CL: A CUDA-to-OpenCL translator for Multi-and-many-core Architectures. In: IEEE ICPADS. pp. 300-307 (2011)
  13. B. Gaster, L. Howes, D. Kaeli, P. Mistry, and D. Schaa, "Heterogeneous Computing with OpenCL", Morgan Kaufmann Publishers, 2011.
  14. AMD Accelerated Parallel Processing OpenCL Programming Guide, Advanced Micro Devices, Inc. 2012. http://developer. amd. com/appsdk
  15. A. Munshi, B. Gaster, T. Mattson, J. Fung and D. Ginsburg, OpenCL Programming Guide, Addison-Wesley Publishers, 2011.
  16. M. Scarpino, "OpenCL in Action," Manning publications, 2011.
  17. D. Kirk and W-m. Hwu, Programming Massively Parallel Processors: A Hands-on Approach. Morgan-Kaufmann Publishers, 2010.
  18. Banerjee, U. : An introduction to a formal theory of dependence analysis. In: Journal of Supercomputing. Vol. 2, No. 2 pp. 133-149 (1988).
Index Terms

Computer Science
Information Sciences

Keywords

GPU Computing OpenCL Automatic Translation Parallelization Parallelizing Compilers