Intel® oneAPI Math Kernel Library Developer Reference - C

mkl_enable_instructions

Enables dispatching for new Intel® architectures or restricts the set of Intel® instruction sets available for dispatching.

Syntax

int mkl_enable_instructions (int isa);

Input Parameters

Name

Type

Description

isa

int

The latest Intel® instruction-set architecture (ISA) for Intel® oneAPI Math Kernel Library to dispatch.

MKL_ENABLE_AVX512

Intel® Advanced Vector Extensions 512 (Intel® AVX-512) on Intel® Xeon® processors.

MKL_ENABLE_AVX512_E1

Intel® Advanced Vector Extensions 512 (Intel® AVX-512) with support for Vector Neural Network Instructions.

MKL_ENABLE_AVX512_E2

ICX: Intel® Advanced Vector Extensions 512 (Intel® AVX-512) enabled processors.

MKL_ENABLE_AVX512_E3

Intel® Advanced Vector Extensions 512 (Intel® AVX-512) with support of Vector Neural Network Instructions supporting BF16 enabled processors.

MKL_ENABLE_AVX512_MIC

Intel AVX-512 on Intel® Xeon Phi™ processors.

MKL_ENABLE_AVX2

Intel® Advanced Vector Extensions 2 (Intel® AVX2).

MKL_ENABLE_AVX

Intel® Advanced Vector Extensions (Intel® AVX).

MKL_ENABLE_SSE4_2

Intel® Streaming SIMD Extensions 4-2 (Intel® SSE4-2).

Description

Intel® oneAPI Math Kernel Library does run-time processor dispatching to identify appropriate internal code paths to traverse for Intel® oneAPI Math Kernel Library functions called by the application. Themkl_enable_instructions function controls the behavior of the dispatcher to do either of the following:

If the system does not support the instruction set specified by the isa parameter or if the system is based on a non-Intel architecture, mkl_enable_instructions does nothing and returns zero.

Settings specified by the mkl_enable_instructions function set an upper limit to settings specified by the mkl_cbwr_set function.

You can use the MKL_ENABLE_INSTRUCTIONS environment variable instead of calling mkl_enable_instructions (for more details, see theIntel® oneAPI Math Kernel Library Developer Guide); however, the settings specified by the function take precedence over the settings specified by the environment variable.

Return Values

Name

Type

Description

irc

int

Function completion status:

1 - Intel® oneAPI Math Kernel Library dispatches the code path for the specified ISA by default.

0 - The request is rejected. Usually this occurs if mkl_enable_instructions was called:

  • After another Intel® oneAPI Math Kernel Library function

  • On a non-Intel architecture

  • With an incompatible ISA specified

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.