计算机科学 ›› 2013, Vol. 40 ›› Issue (3): 111-115.

• 2012多值逻辑专栏 • 上一篇    下一篇

基于OpenCL的连续数据无关访存密集型函数并行与优化研究

蒋丽媛,张云泉,龙国平,贾海鹏   

  1. (中国科学院软件研究所并行软件与计算科学实验室 北京100190);(中国科学院软件研究所计算机科学国家重点实验室 北京100190);(中国科学院研究生院 北京100190);(中国海洋大学信息科学与工程学院 青岛266100)
  • 出版日期:2018-11-16 发布日期:2018-11-16

Parallelism and Research on Functions with Continuously Independent Data and Intensive Memory Access Using OpenCL

  • Online:2018-11-16 Published:2018-11-16

摘要: 连续的数据无关是指计算目标矩阵连续的元素时使用的源矩阵元素之间没有关系且也为连续的,访存密集型是指函数的计算量较小,但是有大量的数据传输操作。在OpenCL框架下,以bitwise函数为例,研究和实现了连续数据无关访存密集型函数在GPU平台上的并行与优化。在考察向量化、线程组织方式和指令选择优化等多个优化角度在不同的GPU硬件平台上对性能的影响之后,实现了这个函数的跨平合性能移植。实验结果表明,在不考虑数据传输的前提下,优化后的函数与这个函数在OpenCV库中的CPU版本相比,在AMD HD 5850 GPU达到了平均40倍的性能加速比;在AMD HD 7970 GPU达到了平均90倍的性能加速比;在NVIDIA Tesla 02050 CPU上达到了平均60倍的性能加速比;同时,与这个函数在OpenCV库中的CUDA实现相比,在NVIDIA Tesla 02050平台上也达到了1.5倍的性能加速。

关键词: GPU, OpenCL,向量化,ROI

Abstract: Continuously independent data type means when calculating the continuous elements of destination matrix,the used elements of source matrices are also continuous and there are no relationship among them. Intensive memory access function is the function that has less computation but a lot of data transfer operations. This paper took the bit wise function as the example, studied and implemented the parallel and the optimizing methods of the continuously independent data and intensive memory access function on GPU platforms. Based on the OpenCL framework, this paper studied and compared various optimizing methods, such as vectorizing, threads organizing, and instruction selecting, and finally used these methods to implement the cross-platform transfer of the bitwise function among different platforms.The study tested the function's execution time without data transfer both on AMD GPU and NVIDIA GPU platforms.On the AMD Radeon HD 5850 platform, the performance has reached 40 times faster than the CPU version in OpenCV library, 90 times faster on AMD Radeon HD 7970 platform, and 60 times faster on NVIDIA GPU hesla C2050 platform. On NVIDIA GPU `hesla C2050 platform,the speedup is 1. 5 comparing with the CUI}A version in C}enCV library.

Key words: GPU, OpenCL, Vectorization, ROI

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!