简体   繁体   中英

Is there a performance different between compiling and linking mkl library via icc or gcc?

I cant find any info about this topic, Is there a different in runtime performance when running a program which was compiled and linked with gcc or icc ?

(My assumption is that the program run on Intel architecture)

As both compilers are officially supported by MKL and they link the same libraries such as libmkl_core.a or libmkl_core.so , which do the actual work for MKL. The performance of MKL operations should be same. But of course the code written by yourself could be different as they are compiled by different compilers.

Edit

MKL is designed as a C library. Most of the APIs are pre-compiled and designed to run on large input data, which expect a relatively long running time. The way you calling the API won't affect the performance very much.

There are inline code and helper marcos through. For example mkl_direct_call.h include inline code/marco for small matrix multiplication, small matrix (size of ~20 or smaller) may get performance improvement with this code. So you may see performance difference when involving this part. Please refer to the following links for more details.

Improve Intel MKL Performance for Small Problems: The Use of MKL_DIRECT_CALL

Limitations of the Direct Call

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM