Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- Loss of performance for DGEMM with matrix dimensions ~1500 using MKL 11.1

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

José_Luis_G_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-09-2014
03:10 AM

132 Views

Loss of performance for DGEMM with matrix dimensions ~1500 using MKL 11.1

Hello,

I'm using DGEMM from MKL 11.1 and Intel Composer XE 14.0.0.080 for benchmarking purposes. My system is a Intel Core i5-2500 and I run Debian GNU/Linux 64 bits. Attached I send the plots showing the DGEMM performance for some square matrices and for 1, 2, 3 and 4 threads. The problem is that I've detected a severe loss of performance for matrix dimensions of about 1500x1500. I said about because the behavior can be detected using dimensions fron 1300 to 1700 (but in the plots was used 1500x1500)

Is this fact known?

Link Copied

4 Replies

Sarah_K_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-09-2014
02:17 PM

132 Views

Thanks for the detailed report! What are the leading dimensions you used for your benchmarking?

The leading dimensions (particularly the leading dimension for matrix C) can have a significant impact on performance due to cache conflict. For instance, you may want to avoid a leading dimension that is a multiple of 256 and instead offset it by 64 or 128.

José_Luis_G_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-09-2014
02:53 PM

132 Views

Hello,

the leading dimensions for all A, b and C matrices are the same as the dimensions of the matrices in each test

José_Luis_G_

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-09-2014
03:54 PM

132 Views

And, as a related question, how affects the leading dimension to the performance? Now, my program creates the matrices (memory asignation) with the exact number of elements before the function call, so the LDA is N for a NxN matrix. But I'm thinking about change the code to create only once the matrices. But my doubt is, if I create the matrices for the maximum dimensions, for example 10000x10000, so the leading dimension is 10000, how this high number affects the performance when I work with matrices od dimensions 100x100, 500x500, 1000x1000, 3000x300, 5000x5000, etc.? Will copy MKL to the cache only the working part of the matrices or the real matrix (the memory space) columns?

So, the final question is: regardint to leading dimensions, what is better for benchmarking? Leading dimensions near to the matrix dimensions or not is important?

Thanks

Murat_G_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-11-2014
02:07 PM

132 Views

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.