Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Dai__Yan
Beginner
56 Views

MKL LLC usage policy

Hello, experts,

Assume that I have 4 cores machine, each core has 2MB of LLC slice and LLC includes L2. 

1) If I use single-threaded MKL, the MKL instance will use 2MB of LLC or use 8MB LLC?

2) If I use openmp threads to control the parallelism, will MKL instance determine available LLC based on thread num?

Any help is appreciated. Thanks.

Best Regards

 

 

 

0 Kudos
3 Replies
Ying_H_Intel
Employee
56 Views

Hi Yan, Could you please tell what is the MKL function you are calling and what is problem size? why do you want to check the LLC from application level? MKL don't directly control to use which LLC. As i understand, the feature is supposed determined by CPU feature or cpu schedule/Bios to change. MKL is just like any of an application, doesn't control the Cache behavior. In more case, the LLC is designed to shared , any process or multi-threads will share the 8M memory. And for MKL, if you want to to make sure the high performance and keep the better memory locality, you may control OpenMP affinity, please refer to OpenMP thread affinity; If your machine is NUMA, then maybe the numa control may help. Please see the article Intel® MKL NUMA Notes | Intel® Software https://en.wikipedia.org/wiki/CPU_cache#LLC Best Regards, Ying
Dai__Yan
Beginner
56 Views

Hello,  Ying

​Thanks for your kind help. 

Assume that in i7-4770K, I have 4 threads application and each thread will call single-threaded sgemm routine.

And my question is that assuming the LLC is inclusive(before Skylake Server) and each sgemm will generate its own memory traffic and may overwrite data from other threads in LLC. And if single-threaded sgemm will use whole LLC, such situation will become much worse. So May I know whether this situation may happen?

Best Regards

 

 

 

Ying_H_Intel
Employee
56 Views

Hello Yan,

I may recommend you to use the Intel Vtune  Amplifier XE, it can explore the LLC missing , so you can compare the saturation become worse or not .

Best Regards,

Ying   

Reply