Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Does libmkl_rt.so use avx2 instructions?

User1578037094245524
1,721 Views

Hi,

I installed mkl_2020.1 on centos7 and linked my cpp file with libmkl_rt.so. The application runs as well.

My question is that does my application use avx2 to speed up? It seems that libmkl_avx2.so was not called because it runs as well even I delete file libmkl_avx2.so. I confirmed my cpu is support avx2 instruction.

Thanks!

 

0 Kudos
5 Replies
Gennady_F_Intel
Moderator
1,716 Views

It has to work. Which routines are you calling?

0 Kudos
User1578037094245524
1,701 Views

Thanks for your reply. I just write a simple code to test. You mean libmkl_rt.so only can works and needn't libmkl_avx2.so?

 

0 Kudos
Gennady_F_Intel
Moderator
1,697 Views

Yes, linking with lmkl_rt would be enough to run your code on avx2 based system w/o explicit linking with lmkl_avx2.  You may easier to check which code path has been called by setting MKL_VERBOSE env. variable and if your code calls BLAS, LAPACK, or FFT routines. All another part of MKL still doesn't support the verbose mode so far.

0 Kudos
Gennady_F_Intel
Moderator
1,693 Views

You may take into account that using mkl singly dynamic library has some restrictions by using Intel LP64 and Intel threading only. You may find out more details into MKL User's Guide

0 Kudos
User1578037094245524
1,689 Views

Thank you very much! It's clear to me now.

0 Kudos
Reply