Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 461

Optimizing Simple OpenCL™ Kernels

$
0
0

In the following code samples, we show how we implemented a consistent series of optimizations that improve OpenCL™ kernel performance on Intel® Iris™, Intel® Iris™ Pro or Intel® HD graphics using the Intel® SDK for OpenCL™ Applications. We tested these optimizations on two OpenCL™ kernels: Modulate (a trivial kernel that adjusts the brightness of an image) and Sobel (an implementation of a Sobel filter). The optimizations are general in nature and can be applied to a broad set of OpenCL™ kernels. We saw substantial speedups for Modulate and Sobel relative to naïve implementations of these kernels running on a 2048 pixels wide by 2048 pixels high single channel image.

 

 

 

In addition, we demonstrate the basic use of Intel® VTune™ Amplifier XE 2015 to help guide the optimizations of OpenCL™ kernels on Intel Iris™ graphics.

By studying these code samples, developers can gain a fundamental understanding of optimizing their code on Intel Iris™ graphics: Sobel.zip, Modulate.zip

Further kernel optimizations can be found in: GPU-Quicksort in OpenCL 

About the Author

Robert Ioffe is a Technical Consulting Engineer at Intel’s Software and Solutions Group. He is an expert in OpenCL programming and OpenCL workload optimization on Intel Iris and Intel Iris Pro Graphics with deep knowledge of Intel Graphics Hardware. He was heavily involved in Khronos standards work, focusing on prototyping the latest features and making sure they can run well on Intel architecture. Most recently he has been working on prototyping Nested Parallelism (enqueue_kernel functions) feature of OpenCL 2.0 and wrote a number of samples that demonstrate Nested Parallelism functionality, including GPU-Quicksort for OpenCL 2.0. He also recorded and released two Optimizing Simple OpenCL Kernels videos and is in the process of recording a third video on Nested Parallelism.

Note: Any software source code reprinted in this document is furnished under a software license and may only be used or copied in accordance with the terms of that license.


Viewing all articles
Browse latest Browse all 461

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>