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

mkl_jit_create_cgemm on multi cores

Yosef__Elad
Beginner
387 Views

Hi all,

I want to use mkl_jit_create_cgemm on my setup where each thread is pinned to single core.

In each thread I'll do the cgemm with the created Jitter.

Do I need to create jit kernel specific for each thread? or create just 1 and use it on all calling threads?

Elad

 

0 Kudos
3 Replies
Khang_N_Intel
Employee
387 Views

Hi Elad,

You can call mkl_jit_create_cgemm once and use it in all calling threads.

Since generating the jit kernel using this function will involve runtime overhead, you will see performance improve if this kernel gets called several hundred of times.

Best regards,

Khang

0 Kudos
Yosef__Elad
Beginner
387 Views

What about the func pointer that returned by mkl_jit_get_cgemm_ptr ?

It is thread safe? 

Can I init single func pointer and use it on all threads?

 

0 Kudos
Khang_N_Intel
Employee
387 Views

Hi Elad,

Yes, it is thread safe and you can use it on all threads.

Khang

0 Kudos
Reply