Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

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

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

DEPRECATED. Intel® Advanced Vector Extensions 512 (Intel® AVX-512) on Intel® Xeon Phi™ processors. This setting is kept for backward compatibility and is equivalent to MKL_CBWR_AVX2.

MKL_CBWR_AVX512

12

Intel AVX-512 on Intel® Xeon® processors

MKL_CBWR_AVX512_MIC_E1

13

DEPRECATED. 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. This setting is kept for backward compatibility and is equivalent to MKL_CBWR_AVX2.

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

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