DocumentCode :
2093101
Title :
Source-to-Source Code Translator: OpenMP C to CUDA
Author :
Noaje, Gabriel ; Jaillet, Christophe ; Krajecki, Michaël
Author_Institution :
CReSTIC SysCom, Univ. of Reims Champagne-Ardenne, Reims, France
fYear :
2011
fDate :
2-4 Sept. 2011
Firstpage :
512
Lastpage :
519
Abstract :
In recent years hardware accelerators have become a full part of the HPC domain as their peak performance has increased steadily. Although their programmability has greatly improved and different tools have been developed to smooth down their learning curve, porting legacy code to the new programming models could reveal itself a cumbersome and time-consuming process. However a large amount of code benefits from the multicore architectures using either a shared memory model or a distributed model. Our goal was to allow developers to benefit from the simplicity of OpenMP code and at the same time permitting their code to be executed on GPUs many core architectures. Thus we propose a source-to-source compiler able to automatically transform an OpenMP C code into a CUDA code, while maintaining a human readable version of the code that can be further analyzed or optimized. Using the OMPi compiler as a base ground, we implemented the "pragma omp parallel for" transformation along with data visibility clauses. The generated code is fully NVIDIA CUDA compliant and can be compiled using the nvcc compiler. In this paper we present the entire transformation process, starting from the pragma split-up and kernel generation, passing through the data visibility clauses management and ending with the device memory management and kernel launch system.
Keywords :
application program interfaces; parallel architectures; program compilers; program interpreters; shared memory systems; software maintenance; CUDA; OMPi compiler; OpenMP C; device memory management; distributed model; kernel generation; kernel launch system; legacy code; multicore architectures; nvcc compiler; pragma split-up; shared memory model; source-to-source code translator; source-to-source compiler; Computational modeling; Computer architecture; Graphics processing unit; Instruction sets; Kernel; Programming; CUDA; OpenMP; code transformation; compiler;
fLanguage :
English
Publisher :
ieee
Conference_Titel :
High Performance Computing and Communications (HPCC), 2011 IEEE 13th International Conference on
Conference_Location :
Banff, AB
Print_ISBN :
978-1-4577-1564-8
Electronic_ISBN :
978-0-7695-4538-7
Type :
conf
DOI :
10.1109/HPCC.2011.73
Filename :
6063033
Link To Document :
بازگشت