Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 10/31/2024
Public
Document Table of Contents

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

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_COMPATIBLEensures 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