Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
6426 Discussions

Does libmkl_rt.so use avx2 instructions?

User1578037094245524
260 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
255 Views

It has to work. Which routines are you calling?

User1578037094245524
240 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?

 

Gennady_F_Intel
Moderator
236 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.

Gennady_F_Intel
Moderator
232 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

User1578037094245524
228 Views

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

Reply