Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

Named Constants for CNR Control

Use the conditional numerical reproducibility (CNR) functionality in
Intel® MKL
to obtain reproducible results from MKL routines. When enabling CNR, you choose a specific code branch of
Intel® MKL
that corresponds to the instruction set architecture (ISA) that you target. Use these named constants to specify the code branch and other CNR options.
Named Constant
Value
Description
CNR Branches
MKL_CBWR_OFF
0
Disable CNR mode
MKL_CBWR_BRANCH_OFF
1
CNR mode is disabled
MKL_CBWR_AUTO
2
Choose branch automatically. CNR mode uses the standard ISA-based dispatching model while ensuring fixed cache sizes, deterministic reductions, and static scheduling
MKL_CBWR_COMPATIBLE
3
Intel® Streaming SIMD Extensions 2 (Intel® SSE2) without rcpps/rsqrtps instructions
MKL_CBWR_SSE2
4
Intel SSE2
MKL_CBWR_SSE3
5
DEPRECATED.
Intel® Streaming SIMD Extensions 3 (Intel® SSE3)
. This setting is kept for backward compatibility and is equivalent to
MKL_CBWR_SSE2
.
MKL_CBWR_SSSE3
6
Supplemental Streaming SIMD Extensions 3 (SSSE3)
MKL_CBWR_SSE4_1
7
Intel® Streaming SIMD Extensions 4-1 (SSE4-1)
MKL_CBWR_SSE4_2
8
Intel® Streaming SIMD Extensions 4-2 (SSE4-2)
MKL_CBWR_AVX
9
Intel® Advanced Vector Extensions (Intel® AVX)
MKL_CBWR_AVX2
10
Intel® Advanced Vector Extensions 2 (Intel® AVX2)
MKL_CBWR_AVX512_MIC
11
Intel® Advanced Vector Extensions 512 (Intel® AVX-512) on Intel® Xeon Phi™ processors
MKL_CBWR_AVX512
12
Intel AVX-512 on Intel® Xeon® processors
MKL_CBWR_AVX512_MIC_E1
13
Intel® Advanced Vector Extensions 512 (Intel® AVX-512) for Intel® Many Integrated Core Architecture (Intel® MIC Architecture) with support of AVX512_4FMAPS and AVX512_4VNNIW instruction groups enabled processors
MKL_CBWR_AVX512_E1
14
Intel® Advanced Vector Extensions 512 (Intel® AVX-512) with support of Vector Neural Network Instructions enabled processors
CNR Flags
MKL_CBWR_STRICT
64
Strict CNR mode enabled. See Reproducibility Conditions for more information.
When specifying the CNR branch with the named constants, be aware of the following:
  • Reproducible results are provided under Reproducibility Conditions .
  • Settings other than
    MKL_CBWR_AUTO
    or
    MKL_CBWR_COMPATIBLE
    are available only for Intel processors.
  • Intel and Intel compatible CPUs have a few instructions, such as approximation instructions rcpps/rsqrtps, that may return different results. Setting the branch to
    MKL_CBWR_COMPATIBLE
    ensures that
    Intel® MKL
    does not use these instructions and forces a single Intel SSE2-only code path to be executed.
Optimization Notice
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
This notice covers the following instruction sets: SSE2, SSE4.2, AVX2, AVX-512.