Re: [eigen] Matrix-matrix multiplication is slow compared to openBlas

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Sorry for late reply,

this indeed looks slow, try enabling OpenMP for a fair comparison.

Here I get, on a MacBook-pro, Core i7 2.6GHz (Haswell), clang 4.0, eigen 3.3.3:

AVX only:
Time1: 0.0569905s
Time2: 0.0580338s

AVX+OpenMP:
Time1: 0.0171455s
Time2: 0.0182525s

FMA+OpenMP:
Time1: 0.0151382s
Time2: 0.0122295s

FMA:
Time1: 0.0311275s
Time2: 0.0287779s


gael.

On Tue, Apr 18, 2017 at 4:26 PM, Oleg Shirokobrod <oleg.shirokobrod@xxxxxxxxx> wrote:
Hi,

I have compared calculation of two expressions with Eigen and Eigen with openBlas backend (EIGEN_USE_BLAS)

1. MatrixXd AY = A*Y; where MatrixXd A[2048x2048], MatrixXd Y[2048x110]
2. Y.noalias() = A.adjoint() * X; where MatrixXd X[2048x110]

In Eq.1 I do not use noalias() because this is initialization of a declared matrix..

Calculation with openBlas is approximately 3 times faster.

I used
Intel(R) Core (TM) i5-3470 CPU @ 3.20 GHz; RAM 8 GB; 64 bit OS, x64 based processor;
Windows 10 Pro
MSVS 2015. O2, AVX options.
Eigen 3.3.3

Results:

1. openBlas = 0.028532 s; Eigen = 0.083807 s
2. openBlas = 0.028888 s; Eigen = 0.077522 s

Are these results expected or they should be better?

Thanks,

Oleg Shirokobrod




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/