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

Weird time overhead during first call to DGEQRF and DSYRK

szachista
Beginner
259 Views

Hello everyone,

I encountered odd behaviour of those procedures when called for the first time - subsequent calls take shorter execution time. I assume it is caused by some allocations made by MKL library to speed-up. What can be done to avoid such situations?

I attach source code of my test. I've set environmental variables OMP_NUM_THREADS and MKL_NUM_THREADS to 1.

Thank you for any help,
Jacek

0 Kudos
1 Solution
Aleksandra_K
Employee
148 Views

HI Jacek,


When you run this function for the first time, many things happen behind the scenes, so it's normal for it to take longer. For smaller sizes, you can try using direct call or sequential mode (Using MKL_DIRECT_CALL in C Applications).


Also, could you provide us with more context about what your application does and what kind of usage of oneMKL you expect? We can try to find a better solution for your case.


Regards,

Aleksandra



View solution in original post

0 Kudos
2 Replies
Aleksandra_K
Employee
149 Views

HI Jacek,


When you run this function for the first time, many things happen behind the scenes, so it's normal for it to take longer. For smaller sizes, you can try using direct call or sequential mode (Using MKL_DIRECT_CALL in C Applications).


Also, could you provide us with more context about what your application does and what kind of usage of oneMKL you expect? We can try to find a better solution for your case.


Regards,

Aleksandra



0 Kudos
szachista
Beginner
136 Views

Hello Aleksandra,

 

Thank you for your answer. Actually I was measuring time (in microseconds) of the problem involving very small matrix - later I checked for a much larger matrix and the difference was negligible, so the topic may be closed. I am sorry for confusion.

 

With regards,

Jacek

0 Kudos
Reply