ARM Guide to OpenCL Optimizing Pyramid: Conclusion
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 describes the conclusions from the example optimization process.
This example shows one way to implement and optimize the creation of a Gaussian image pyramid using OpenCL and OpenCL buffers.
Small changes in the OpenCL code can produce significant performance improvements. For example, processing the RGB color planes separately and then recombining them after reduces the number of loads, but also simplifies the handling of pixel boarders and enables some kernels to be merged.
The following techniques are useful for optimizing pyramid image generation:
- Separate the convolution stage.
- Use padding to avoid expensive boundary checks.
- Split the image into its individual color planes.
- Change the storage method to improve the vectorization of the loads.
- Merge kernels to reduce the time spent enqueuing kernels and reduce the execution time of the most expensive kernel.