You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if I understood the docs correctly, but I assumed that BLAS.set_num_threads(n) == mkl_set_num_threads(n) and BLAS.get_num_threads() == mkl_get_max_threads() . It seems, however, that it might not be the case. At least, if I'm calling mkl_set_num_threads first, BLAS.get_num_threads shows the correct value, but calling BLAS.set_num_threads does not affect the result of mkl_get_max_threads. Moreover, if I'm calling BLAS.set_num_threads first, then subsequent calls to mkl_set_num_threads would not change the value returned by BLAS.get_num_threads... I also tried MKL_DYNAMIC=TRUE, but there was no difference. Can someone clarify what's going on?
Hi @hakkelt, in terms of oneMKL logic BLAS.set_num_threads(n) == mkl_set_num_threads(n) and BLAS.get_num_threads() == mkl_get_max_threads() are not always correct.
As far as I know BLAS.set_num_threads uses mkl_domain_set_num_threads and BLAS.get_num_threads() uses mkl_domain_get_max_threads. In case of domain specific function mkl_domain_set_num_threads was not used your assumption is correct: BLAS should use number of thread defined by mkl_set_num_thread, but if mkl_domain_set_num_threads was defined BLAS should use domain specific number of threads instead of the number specified by more general mkl_set_num_threads function. Hope it clarifies the oneMKL behavior.
I'm not sure if I understood the docs correctly, but I assumed that
BLAS.set_num_threads(n)
==mkl_set_num_threads(n)
andBLAS.get_num_threads()
==mkl_get_max_threads()
. It seems, however, that it might not be the case. At least, if I'm callingmkl_set_num_threads
first,BLAS.get_num_threads
shows the correct value, but callingBLAS.set_num_threads
does not affect the result ofmkl_get_max_threads
. Moreover, if I'm callingBLAS.set_num_threads
first, then subsequent calls tomkl_set_num_threads
would not change the value returned byBLAS.get_num_threads
... I also triedMKL_DYNAMIC=TRUE
, but there was no difference. Can someone clarify what's going on?The text was updated successfully, but these errors were encountered: