Compiler Support for General-Purpose Computation on GPUs

碩士 === 國立中正大學 === 資訊工程所 === 95 === The GPU (Graphic Processing Unit) has evolved into a very powerful and flexible processor. Generally, GPGPU stands for General-Purpose computation on GPUs. The changes of GPU design and programmability let us have the opportunities to do general purpose computation...

Full description

Bibliographic Details
Main Authors: Yu-Te Lin, 林餘德
Other Authors: Peng-Sheng Chen
Format: Others
Language:en_US
Published: 2007
Online Access:http://ndltd.ncl.edu.tw/handle/04824200753712797545
Description
Summary:碩士 === 國立中正大學 === 資訊工程所 === 95 === The GPU (Graphic Processing Unit) has evolved into a very powerful and flexible processor. Generally, GPGPU stands for General-Purpose computation on GPUs. The changes of GPU design and programmability let us have the opportunities to do general purpose computation on it. However, it still exist significant barriers to write GPGPU program due to the unusual programming model of GPU. In this thesis, we introduce a new approach for GPGPU by the view of compiler. The compiler directives are used to label code fragments which programmer want to execute on GPU. Our compiler converts the labeled code fragments to ISO-compliant C code with OpenGL and then a native C compiler can be used to compile it to the executable code for GPU. Our compiler is implemented based on Open64 compiler infrastructure. We modify its front-end so that is can recognize our compiler directives. We also add a new optimization phase in Open64 to handle the IR (Intermediate Language) level translation. Then the tool whirl2c provided by Open64 is used to finish the final translation and gets the translated C code. Presently, we only provide compiler directives for array operations in the loop construct. For the selected benchmark programs, the experiment results show that our compiler can make a significant performance improvement.