Providing Source Code Level Portability Between CPU and GPU with MapCG  

Providing Source Code Level Portability Between CPU and GPU with MapCG

在线阅读下载全文

作  者:Chun-Tao Hong De-Hao Chen Yu-Bei Chen Wen-Guang Chen Wei-Min Zheng Hai-Bo Lin 洪春涛;陈德颢;陈羽北;陈文光;郑纬民;林海波(Department of Computer Science and Technology,Tsinghua University,Beijing 100084,China;Department of Electronic Engineering,Tsinghua University,Beijing 100084,China;IBM China Research Lab,Beijing 100094,China)

机构地区:[1]Department of Computer Science and Technology,Tsinghua University,Beijing 100084,China [2]Department of Electronic Engineering,Tsinghua University,Beijing 100084,China [3]IBM China Research Lab,Beijing 100094,China

出  处:《Journal of Computer Science & Technology》2012年第1期42-56,共15页计算机科学技术学报(英文版)

基  金:supported by the National Natural Science Foundation of China under Grant No. 60973143;the National High Technology Research and Development 863 Program of China under Grant No. 2008AA01A201;the National Basic Research 973 Program of China under Grant No. 2007CB310900

摘  要:Graphics processing units (GPU) have taken an important role in the general purpose computing market in recent years. At present, the common approach to programming GPU units is to write CPU specific code with low level GPU APIs such as CUDA. Although this approach can achieve good performance, it creates serious portability issues as programmers are required to write a specific version of the code for each potential target architecture. This results in high development and maintenance costs. We believe it is desirable to have a programming model which provides source code portability between CPUs and GPUs, as well as different GPUs. This would allow programmers to write one version of the code, which 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 CPUs and GPUs. In contrast to other approaches such as OpenCL, our framework, based on MapReduce, provides a high level programming model and makes programming much easier. We describe the design of MapCG, including the MapReduce-style high-level programming framework and the runtime system on the CPU and GPU. A prototype of the MapCG runtime, supporting multi-core CPUs and NVIDIA GPUs, was implemented. Our experimental results show that this implementation can execute the same source code efficiently on multi-core CPU platforms and GPUs, achieving an average speedup of 1.6-2.5x over previous implementations of MapReduce on eight commonly used applications.Graphics processing units (GPU) have taken an important role in the general purpose computing market in recent years. At present, the common approach to programming GPU units is to write CPU specific code with low level GPU APIs such as CUDA. Although this approach can achieve good performance, it creates serious portability issues as programmers are required to write a specific version of the code for each potential target architecture. This results in high development and maintenance costs. We believe it is desirable to have a programming model which provides source code portability between CPUs and GPUs, as well as different GPUs. This would allow programmers to write one version of the code, which 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 CPUs and GPUs. In contrast to other approaches such as OpenCL, our framework, based on MapReduce, provides a high level programming model and makes programming much easier. We describe the design of MapCG, including the MapReduce-style high-level programming framework and the runtime system on the CPU and GPU. A prototype of the MapCG runtime, supporting multi-core CPUs and NVIDIA GPUs, was implemented. Our experimental results show that this implementation can execute the same source code efficiently on multi-core CPU platforms and GPUs, achieving an average speedup of 1.6-2.5x over previous implementations of MapReduce on eight commonly used applications.

关 键 词:PORTABILITY PARALLEL GPU programming 

分 类 号:TP332[自动化与计算机技术—计算机系统结构] TP391.41[自动化与计算机技术—计算机科学与技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象