节点文献

基于GPU的通用并行计算库的设计与研究

【作者】 丁鹏

【导师】 陈利学;

【作者基本信息】 西南石油大学 , 计算机应用技术, 2007, 硕士

【摘要】 GPU拥有极高的计算能力和数据带宽,随着图形硬件技术的发展,GPU的性能越来越强大,使用GPU进行通用计算逐渐成为了近年来的热点,但是由于GPU是专为三维图形而设计的,要利用这些资源的难度极大。本文设计和实现了一个使用GPU进行通用计算的函数库,简化了GPU通用计算过程,并将几种常用算法映射到GPU上。1.首先介绍了现代可编程图形硬件技术,详细分析了整个GPU的发展阶段及图形硬件相关技术。分析了可编程图形硬件的结构,指出了其内部可利用的计算资源。2.其次,分析了OpenGL及其着色语言GLSL的工作流程和功能。通过对图形API和图形硬件的分析,指出图形硬件中数据的组织方式、输出方式和处理流程。详细阐述了使用GPU进行通用计算的步骤与方法。在分析完整个体系之后,自行构建了一个GPU并行计算平台,利用该平台可以大大简化程序设计。3.将加减法、乘法、求最大/最小值、排序和FFT这几个常用的算法映射到GPU上,给出了每种算法在GPU编程模型上的实现方法和核心着色程序代码,并将这些算法分别和CPU上的加减法、乘法、求最大/最小值、快速排序和基二FFT运算进行对比。通过对三种不同的测试环境的测试,分析了采用GPU计算相对于CPU的优缺点以及当前图形硬件开发利用的瓶颈。通过一系列的比较发现,矩阵乘法、排序算法、FFT等具有一定并行性并且有较大计算量的应用适合使用GPU来进行。4.最后,介绍了最新一代的图形硬件及其专用于通用计算的驱动,以及GPU通用计算技术的应用前景。

【Abstract】 GPU is famous for its high calculation capacity and bandwidth, with the development of graphic hardware, GPU is much more powerful than ever before. General purpose computation with GPU is a hot-spot recently. Because GPU is designed for 3D graphic, so it is hard to use those resources. This paper describes how to build a library for GPU general purpose computation. This library simplifys the whole process, and maps some algorithms to GPU.Firstly, this paper introduces the modern programmable graphic hardware, then analyses the development stage and some related technology. After that it points out the useful resources for calculation by researching the structure of graphic hardware.Secondly, this paper analyses the workflow and functions of OpenGL and GLSL. Though analysis to graphic API and graphic hardwares, it points out the data organization, output method and workflow in the graphic hardware for general computation; describes the step and method in detal. After that, this paper constructs a platform for GPU parall computation. With this platform, programming could be greatly simplified.Thirdly, this paper offers a way to map some algorithms to GPU, such as addition, subtraction, multiplication, max, min, sorting and FFT. Each GPU algorithm method and core shader code for GPU programming model is described in detail. After that those GPU algorithms are compared with the corresponding algorithms on CPU. Three environments were used to test those algorithms. The result shows the advantage, disadvantage and bottleneck of graphic hardware. Algorithms with a certain parallelism and a large amount of computation such as matrix multiplication, sorting and FFT could get a better performance on GPU.At last, the latest generation graphic hardware and its general-purpose-designed driver are introduced.

【关键词】 GPU通用计算CPU图形硬件并行计算FFT
【Key words】 GPGPUGPUGraphic hardwareParallel computationFFT
  • 【分类号】TP311.13;TP334.7
  • 【被引频次】10
  • 【下载频次】1010
节点文献中: