Targeting a Different CPU Architecture

CL_CONFIG_CPU_TARGET_ARCH

This variable generates code exclusively for a given target CPU architecture.

Note

CL_CONFIG_CPU_TARGET_ARCH allows only lowering the instruction set level supported by CPU.

By default, it is set to Autodetect.

Allowed values are:

Note

Some kernels are not possible to be vectorized, so vectorizer would not touch them regardless of the mode. Also be careful with manual overriding the compiler heuristic, build process would fail if target hardware does not support the specific vectorization width. Inspect the compiler output in the offline compiler tool (described in the Developer Guide) on the messages related to vectorization.