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

CPU utilization during matrix multiplication sgemm

rybalkin
Beginner
166 Views

Hello,

I have a small tool that calculates large matrix multiplication as a one step of the algorithm. I have configured MKL library for parallel execution mode in the Visual Studio project settings. My CPU is Intel Core i7 920 2.6GHz with 4 cores. With HyperThreading there are 8 virtual cores.

During matrix multiplication CPU utilization is only 50%. Can it be more or HyperThreading is not used in MKL library?

Time for 4000x4000 matrix multiplication is 2 seconds for parallel mode, and 6 seconds for sequential mode.

I just want to check that there is no way to gain more performance.

With best regards,
Mikhail

0 Kudos
1 Solution
TimP
Black Belt
166 Views
There have been several discussions in the past on this forum about how MKL chooses 1 thread per core so as to maximize performance on such CPUs. If you wish to check that additional threads reduce performance, you are welcome to read about this in the docs. See MKL_DYNAMIC and associated topics in the MKL user guide. Note that MKL_DYNAMIC has other purposes besides over-riding the decisions about use of HyperThreads.

View solution in original post

1 Reply
TimP
Black Belt
167 Views
There have been several discussions in the past on this forum about how MKL chooses 1 thread per core so as to maximize performance on such CPUs. If you wish to check that additional threads reduce performance, you are welcome to read about this in the docs. See MKL_DYNAMIC and associated topics in the MKL user guide. Note that MKL_DYNAMIC has other purposes besides over-riding the decisions about use of HyperThreads.
Reply