Developer Guide

Developer Guide for Intel® oneAPI Math Kernel Library Windows*

ID 766692
Date 3/31/2023

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

Document Table of Contents

Improving Performance for Small Size Problems

The overhead of calling an Intel® oneAPI Math Kernel Library function for small problem sizes can be significant when the functionhas a large number of parameters or internally checks parameter errors. To reduce the performance overhead for these small size problems, the Intel® oneAPI Math Kernel Librarydirect callfeature works in conjunction with the compiler to preprocess the calling parameters to supported Intel® oneAPI Math Kernel Library functions and directly call or inline special optimized small-matrix kernels that bypass error checking.For a list of functions supporting direct call, see Limitations of the Direct Call.

To activate the feature, do the following:

  • Compile your C or Fortran code with the preprocessor macro depending on whether a threaded or sequential mode of Intel® oneAPI Math Kernel Library is required by supplying the compiler option as explained below:

    Intel® oneAPI Math Kernel Library Mode


    Compiler Option




  • For Fortran applications:

    • Enable preprocessor by using the /fpp option for Intel® Fortran Compiler.
    • Include the Intel® oneAPI Math Kernel Library Fortran include

Intel® oneAPI Math Kernel Library skips error checking and intermediate function calls if the problem size is small enough (for example: a call to a function that supports direct call, such asdgemm, with matrix ranks smaller than 50).

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at

Notice revision #20201201