Intel® Math Kernel Library (Intel® MKL) provides a mechanism to capture the run time information of BLAS and LAPACK domain functions used in a target application. This mechanism is enabled by either setting the environment variable MKL_VERBOSE to 1 or calling the support function, mkl_verbose(1). When a user application is run under this configuration mode, Intel MKL outputs the function name, parameters and time taken to execute the corresponding function. Below is the MKL_VERBOSE output produced by a sample program invoking MKL BLAS functions:
Refer to the related chapter of Intel MKL documentation for more details about MKL_VERBOSE: https://software.intel.com/en-us/node/528417
MKL_VERBOSE can produce large amounts of output (in the order of hundreds of MB’s or even tens of GB’s), when running applications that heavily use MKL. And it can be difficult to understand the usage of MKL functions in the application. To alleviate this problem, we provide a Python script that summarizes the output produced by verbose mode and generates a report grouped by function names, parameter list, call count and execution time. This tool takes an MKL_VERBOSE log as input and produces a summary report at stdout. Below is an example output produced by the tool:
The tools is provided as an attachment to this article. Users can find the download link at the bottom of the page. After download, rename the file to have the .py suffix.