Repository logo
 
Loading...
Thumbnail Image
Publication

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

Use this identifier to reference this record.
Name:Description:Size:Format: 
284.pdf185.19 KBAdobe PDF Download

Advisor(s)

Abstract(s)

Although OpenCL aims to achieve portability at the code level, di erent hardware platforms requires di erent 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: i) a regular one (OpenCL-CPU) and ii) 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 seconds 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 seconds, while the vectorization-based approach executes the same operation in 672 seconds. 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.

Description

Keywords

OpenCL Multicore Manycore Image encoding SIMD

Citation

Pereira, P.M.M., Domingues, P., Rodrigues, N.M.M., Falcao, G., de Faria, S.M.M. (2016). Optimizing GPU Code for CPU Execution Using OpenCL and Vectorization: A Case Study on Image Coding. In: Carretero, J., Garcia-Blas, J., Ko, R., Mueller, P., Nakano, K. (eds) Algorithms and Architectures for Parallel Processing. ICA3PP 2016. Lecture Notes in Computer Science(), vol 10048. Springer, Cham. https://doi.org/10.1007/978-3-319-49583-5_42

Research Projects

Organizational Units

Journal Issue

Publisher

Springer International Publishing

CC License

Without CC licence

Altmetrics