MapCG: writing parallel program portable between CPU and GPU

Chuntao Hong, Dehao Chen, Wenguang Chen, Weimin Zheng, Haibo Lin
Tsinghua National Laboratory for Information Science and Technology, Tsinghua University, Beijing China
In Proceedings of the 19th international conference on Parallel architectures and compilation techniques (2010), pp. 217-226.


   title={MapCG: writing parallel program portable between CPU and GPU},

   author={Hong, C. and Chen, D. and Chen, W. and Zheng, W. and Lin, H.},

   booktitle={Proceedings of the 19th international conference on Parallel architectures and compilation techniques},





Download Download (PDF)   View View   Source Source   



Graphics Processing Units (GPU) have been playing an important role in the general purpose computing market recently. The common approach to program GPU today is to write GPU specific code with low level GPU APIs such as CUDA. Although this approach can achieve very good performance, it raises serious portability issues: programmers are required to write a specific version of code for each potential target architecture. It results in high development and maintenance cost. We believe it is desired to have a programming model which provides source code portability between CPUs and GPUs, and different GPUs: Programmers only need to write one version of code and can be compiled and executed on either CPUs or GPUs efficiently without modification. In this paper, we propose MapCG, a MapReduce framework to provide source code level portability between CPU and GPU. Different from OpenCL, our framework is based on MapReduce, which provides a high level programming model, making programming much easier. We describe the design of the MapReduce-based high-level programming language and the underlying runtime system to enable portability between CPU and GPU. A prototype of MapCG runtime was implemented, supporting multi-core CPU and NVIDIA GPUs. Experiments show that our implementation can execute the same source code efficiently on multi-core CPU platforms and GPUs, achieving an average of 1.6-2.5x speedup over previous implementations of MapReduce on eight commonly used applications.
No votes yet.
Please wait...

* * *

* * *

HGPU group © 2010-2020 hgpu.org

All rights belong to the respective authors

Contact us: