• 2019 Update 4
  • 03/20/2019
  • Public Content
Contents

Vectorizer Knobs

Several environment variables are related to vectorizer. The first one is
CL_CONFIG_USE_VECTORIZER,
which can be set to False and True respectively. Notice that just like any other environment variables this one affects the behavior of the vectorizer of the entire system (or shell instances) until variable gets unset explicitly (or shell(s) terminates). This specific variable affects code generation for Intel® Xeon Phi™ coprocessor device as well.
Another variable is
CL_CONFIG_CPU_VECTORIZER_MODE
(that affects code generation for CPU OpenCL device only). It effectively sets the vectorization “width” (when
CL_CONFIG_USE_VECTORIZER = True
):
  • CL_CONFIG_CPU_VECTORIZER_MODE = 0
    (default). The compiler makes heuristic decisions whether to vectorize each kernel, and if so which vector width to use.
  • CL_CONFIG_CPU_VECTORIZER_MODE = 1
    . No vectorization by compiler. Explicit vector data types in kernels are left intact. This mode is the same as
    CL_CONFIG_USE_VECTORIZER = False
    .
  • CL_CONFIG_CPU_VECTORIZER_MODE = 4
    . Disables heuristic and vectorizes to the width of 4.
  • CL_CONFIG_CPU_VECTORIZER_MODE = 8
    . Disables heuristic and vectorizes to the width of 8.
Note
Some kernels cannot be vectorized, so the vectorizer does not handle them, regardless the mode. Also be careful with manual overriding the compiler heuristic, build process fails if the target hardware doesn't support the specific vectorization width. Inspect the compiler output in the offline compiler tool (described in the product User’s Guide) on the messages related to vectorization.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804