首页> 外文会议>International conference on algorithms and architectures for parallel processing >Optimizing GPU Code for CPU Execution Using OpenCL and Vectorization: A Case Study on Image Coding
【24h】

Optimizing GPU Code for CPU Execution Using OpenCL and Vectorization: A Case Study on Image Coding

机译:使用OpenCL和矢量化为CPU执行优化GPU代码:图像编码的案例研究

获取原文

摘要

Although OpenCL aims to achieve portability at the code level, different hardware platforms requires different approaches in order to extract the best performance for OpenCL-based code. In this work, we use an image encoder originally tuned for OpenCL on GPU (OpenCL-GPU), and optimize it for multi-CPU based platforms. We produce two OpenCL-based versions: (ⅰ) a regular one (OpenCL-CPU) and (ⅱ) a CPU vector-based one (OpenCL-CPU-Vect). The use of CPU vectorization exploits the OpenCL support, making it much simpler than directly coding with SIMD instructions such as SSE and AVX. Globally, while the OpenCL-GPU version is the fastest when run on a high end GPU requiring around 580 s to encode the Lenna image, its performance drops roughly 65 % when run unchanged on a multicore CPU machine. For the CPU tuned versions, OpenCL-CPU encodes the Lenna image in 805 s, while the vectorization-based approach executes the same operation in 672 s. Results show that meaningful performance gains can be achieved by tailoring the OpenCL code to the CPU, and that the use of CPU vectorization instructions through OpenCL is both rather simple and performance rewarding.
机译:尽管OpenCL旨在在代码级别实现可移植性,但是不同的硬件平台需要不同的方法,以便为基于OpenCL的代码提取最佳性能。在这项工作中,我们使用最初针对GPU上的OpenCL(Op​​enCL-GPU)调整的图像编码器,并针对基于多CPU的平台对其进行了优化。我们提供两种基于OpenCL的版本:(ⅰ)常规版本(OpenCL-CPU)和(ⅱ)基于CPU向量的版本(OpenCL-CPU-Vect)。 CPU矢量化的使用利用了OpenCL支持,使其比直接使用SSE和AVX等SIMD指令进行编码要简单得多。在全球范围内,虽然OpenCL-GPU版本在需要大约580秒才能对Lenna图像进行编码的高端GPU上运行时最快,但是在多核CPU机器上不运行时其性能却下降了大约65%。对于经过CPU调整的版本,OpenCL-CPU在805 s内对Lenna图像进行编码,而基于矢量化的方法在672 s内执行相同的操作。结果表明,通过为CPU定制OpenCL代码可以实现有意义的性能提升,并且通过OpenCL使用CPU向量化指令既简单又有利于性能。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号