[eigen] Matrix-matrix multiplication is slow compared to openBlas
• To: eigen@xxxxxxxxxxxxxxxxxxx
• Subject: [eigen] Matrix-matrix multiplication is slow compared to openBlas
• From: Oleg Shirokobrod <oleg.shirokobrod@xxxxxxxxx>
• Date: Tue, 18 Apr 2017 17:26:37 +0300
• Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=c6vFY00t8Ptyfjq/UAjPT5fSPLEw7Wwsu8DWM1f2ph0=; b=m3wRHvF++NoTWaBhHctgaM8qfyWs1yNxXpkIxYiEEXEzavYM7iOnuKNiJ/ySlJ3gKU SZ9lEPhoXdOoW1fkQss4QE9euuni18dSpfBEJvbBQguAZFas1MXdJ9P290WF/45k2fI3 aoFKFld/4Lsc0rqrXwZL5xo8MOs3RKAQqMUzCIixAp8TJKLFIKRsHNqFn8OJ2QCAqCFL mbYd/E4DOPwzOWQcpEARApccw6XPWUIuTR7IkdcwbBS7Rhp9cUvkn7Jz2A4q1wnYDtR7 PwqNwg/25GChdkk+ZkxQ9ep1x7ZwtFkTM2nruTh+E1wLGoCVHqApuz/V6GaUATYEKeFx SQSg==

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/