Intel® Math Kernel Library 11.0.2 User Guide
Intel MKL offers functions and environment variables to increase your chances of getting reproducible results. You can configure Intel MKL using functions or environment variables, but the functions provide more flexibility.
The following specific examples introduce you to the conditional numerical reproducibility.
To ensure Intel MKL calls return the same results on every Intel CPU supporting Intel AVX instructions:
Make sure that:
Your application uses a fixed number of threads
Input and output arrays in Intel MKL function calls are aligned properly
Do either of the following:
Call
mkl_cbwr_set(MKL_CBWR_AVX)
Set the environment variable
MKL_CBWR_BRANCH = AVX
On non-Intel CPUs and on Intel CPUs that do not support Intel AVX, this environment setting may cause results to differ because the AUTO branch is used instead, while the above function call returns an error and does not enable the CNR mode.
To ensure Intel MKL calls return the same results on every Intel CPU supporting Intel SSE2 instructions:
Make sure that:
Your application uses a fixed number of threads
Input and output arrays in Intel MKL function calls are aligned properly
Do either of the following:
Call
mkl_cbwr_set(MKL_CBWR_SSE2)
Set the environment variable
MKL_CBWR_BRANCH = SSE2
On non-Intel CPUs and on Intel CPUs that do not support Intel SSE2, this environment setting may cause results to differ because the AUTO branch is used instead, while the above function call returns an error and does not enable the CNR mode.
On non-Intel CPUs, only the MKL_CBWR_AUTO and MKL_CBWR_COMPATIBLE options are supported for function calls and only AUTO and COMPATIBLE options for environment settings.
To ensure Intel MKL calls return the same results on all Intel or Intel compatible CPUs supporting Intel SSE2 instructions:
Make sure that:
Your application uses a fixed number of threads
Input and output arrays in Intel MKL function calls are aligned properly
Do either of the following:
Call
mkl_cbwr_set(MKL_CBWR_COMPATIBLE)
Set the environment variable
MKL_CBWR_BRANCH = COMPATIBLE
The special MKL_CBWR_COMPATIBLE/COMPATIBLE option is provided because Intel and Intel compatible CPUs have two approximation instructions(rcpps/rsqrtps) that may return different results. This option ensures that Intel MKL does not use these instructions and forces a single Intel SSE2 only code path to be executed.
|
for details of specifying the branch using environment variables. |
See the following sections in the Intel MKL Reference Manual:
Support Functions for Conditional Numerical Reproducibility |
for how to configure the CNR mode of Intel MKL using functions. |
PARDISO* - Parallel Direct Sparse Solver Interface |
for how to configure the CNR mode for PARDISO. |
|
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 |