Bookmark and Share

ARM Guide to OpenCL Optimizing Convolution: Introduction

Register or sign in to access the Embedded Vision Academy's free technical training content.

The training materials provided by the Embedded Vision Academy are offered free of charge to everyone. All we ask in return is that you register, and tell us a little about yourself so that we can understand a bit about our audience. As detailed in our Privacy Policy, we will not share your registration information, nor contact you, except with your consent.

Registration is free and takes less than one minute. Click here to register, and get full access to the Embedded Vision Academy's unique technical training content.

If you've already registered, click here to sign in.

See a sample of this page's content below:


This chapter introduces the concepts of convolutions and GPU compute.

GPU compute and convolutions

This guide provides an example optimization process for running convolution operations using an ARM®Mali™ Midgard GPU. This process can improve performance significantly.

ARM®Mali™ Midgard GPUs support the OpenCL Full Profile specification for General Purpose computing on GPU (GPGPU) processing, also known as GPU compute.

This guide provides advice and information on the principals of GPU compute to software developers who want to improve the use of the available hardware in platforms that perform convolutions. It is not a comprehensive guide to optimization and GPU compute for all situations, although many principles in this guide can be applied to other tasks. The performance gains are given as examples, your results might vary.

Where are convolution operations used?

Convolution operations are important in image processing, particularly in filtering. The terms filter, or linear filter, are often used when describing image processing algorithms instead of the term convolution.

Image filtering enables you to apply effects on photos, such as:

  • Blurring.
  • Smoothing.
  • Sharpening.
  • Intensifying.
  • Enhancing.
  • Matching.

These are important effects in raster graphics editors.

The following picture shows examples of sharpening and smoothing.


Figure 1-1: Sharpening and blurring images

These operations are important for many larger and more complicated operations in computer vision and photography. For example:

  • Canny edge detection.
  • Focus detection.

Because convolutions are common it is useful to understand how they can be optimized and improved using GPU compute.

Convolution is a local operation. A local operation is an image transform where the value of each pixel in the destination image depends on a set of pixel values from the source image. The opposite of this is a point operation, where the value of each pixel in the destination image depends only on the pixel in the same position in the source image.

What is a convolution?

A convolution is a mathematical operator that operates on two functions, for example I and H, that returns a third function I'.

The general convolution operation is a continuous integral of one function moved over another. The result is a measure of the overlap between the two functions as a function of the translation distance of the function that moves.

One type of...