About retuning existing OpenCL code for Mali™ GPUs
OpenCL is a portable language but it is not always performance portable. This means that OpenCL applications can work on many different types of compute device but performance is not preserved. Existing OpenCL is typically tuned for specific architectures, such as desktop GPUs.
To achieve better performance with OpenCL code for Mali™ GPUs, you must retune the code:
- Analyze the code.
- Locate and remove optimizations for alternative compute devices.
- Optimize the OpenCL code for Mali GPUs.
For the best performance, write kernels optimized for the specific target device.
For best performance on Mali Midgard GPUs, you must vectorize your code.