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

Set the CNR mode for only one function call

Guillaume_A_2
Beginner
533 Views

Hi everyone,

I would like to do something like:

... // a lot of stuff with several calls to MKL routines
int cbwrStatus = mkl_cbwr_set(MKL_CBWR_AUTO);
int status = LAPACKE_dsyev( LAPACK_ROW_MAJOR, 'V', 'L', rank, matrix, rank, eigenValues ); 
mkl_cbwr_set(MKL_CBWR_BRANCH_OFF);
... // a lot of stuff with several calls to MKL routines

Here, mkl_cbwr_set calls fail with MKL_CBWR_ERR_MODE_CHANGE_FAILURE, obviously.

So, two questions:

- why is it forbidden (impossible ?) to change the CNR mode after a call to some MKL function ?

- is there a way to set the CNR mode for only one function ?

In my case, "dsyev" is the only function really critical for the reproductibility. I do not want to force the CNR mode at the beginning or before the execution because I am afraid of performance regression.

Thanks in advance for your help,

Guix

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
533 Views

Hi Guix!  Yes, you are right. Into the current version of MKL not possible to set the CNR mode for only one MKL function. That's possible to apply for all mkl's functions. 

0 Kudos
Guillaume_A_2
Beginner
533 Views

Hi Gennady,

Thanks for your reply.

But my questions are "why ?" and "is there a workaround ?" In fact, I am asking for details ;)

Guix

0 Kudos
Reply