Developer Reference for Intel® oneAPI Math Kernel Library for C
Named Constants for CNR Control
Use the conditional numerical reproducibility (CNR) functionality in Intel® oneAPI Math Kernel Library (oneMKL) to obtain reproducible results from MKL routines. When enabling CNR, you choose a specific code branch of Intel® oneAPI Math Kernel Library (oneMKL) 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_SSSE3 |
6 |
UNSUPPORTED. Supplemental Streaming SIMD Extensions 3 (SSSE3) |
MKL_CBWR_SSE4_1 |
7 |
UNSUPPORTED. Intel® Streaming SIMD Extensions 4-1 (SSE4-1) |
MKL_CBWR_SSE4_2 |
8 |
DEPRECATED. Intel® Streaming SIMD Extensions 4-2 (SSE4-2) |
MKL_CBWR_AVX |
9 |
UNSUPPORTED. Intel® Advanced Vector Extensions (Intel® AVX) |
MKL_CBWR_AVX2 |
10 |
Intel® Advanced Vector Extensions 2 (Intel® AVX2) |
MKL_CBWR_AVX512 |
12 |
Intel AVX-512 on Intel® Xeon® processors |
MKL_CBWR_AVX512_E1 |
14 |
Intel® Advanced Vector Extensions 512 (Intel® AVX-512) with support of Vector Neural Network Instructions enabled processors |
MKL_CBWR_AVX10 |
15 |
Intel® Advanced Vector Extensions 10 Version 2 (Intel® AVX 10.2)-enabled processors with support for Intel® Advanced Matrix Extensions (Intel® AMX) with INT8, BF16, FP16, E5M2, and E4M3 |
CNR Flags |
||
MKL_CBWR_STRICT |
65536 or 0x10000 |
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® oneAPI Math Kernel Library (oneMKL) does not use these instructions and forces a single Intel SSE2-only code path to be executed.
Product and Performance Information |
|---|
Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex . Notice revision #20201201 |