|Home > Kernel auto-vectorizer and unroller > About the kernel auto-vectorizer and unroller|
The OpenCL compiler includes a kernel auto-vectorizer and a kernel unroller. You must manually enable these features.
The kernel auto-vectorizer takes existing code and transforms it into vector code.
The unroller merges work-items by unrolling the bodies of the kernels.
If these operations are possible, they can provide substantial performance gains.
For Bifrost and Valhall GPUs, you manually enable these features by passing the kernel transformations command-line options to the compiler, see:
There are several options to control the auto-vectorizer and unroller. The following table shows the basic options.
Table 10-1 Kernel auto-vectorizer and unroller options
|no option||Kernel unroller and vectorizer enabled, with conservative heuristics.|
||Disable the kernel vectorizer.|
||Disable the kernel unroller.|
||Enable aggressive heuristics for the kernel vectorizer.|
||Enable aggressive heuristics for the kernel unroller.|
The kernel auto-vectorizer performs a code transformation. For the transformation to be possible, several conditions must be met: