Go to file
Sameer Agarwal b55b5c7280 Speed up row-major matrix-vector product on ARM
The row-major matrix-vector multiplication code uses a threshold to
check if processing 8 rows at a time would thrash the cache.

This change introduces two modifications to this logic.

1. A smaller threshold for ARM and ARM64 devices.

The value of this threshold was determined empirically using a Pixel2
phone, by benchmarking a large number of matrix-vector products in the
range [1..4096]x[1..4096] and measuring performance separately on
small and little cores with frequency pinning.

On big (out-of-order) cores, this change has little to no impact. But
on the small (in-order) cores, the matrix-vector products are up to
700% faster. Especially on large matrices.

The motivation for this change was some internal code at Google which
was using hand-written NEON for implementing similar functionality,
processing the matrix one row at a time, which exhibited substantially
better performance than Eigen.

With the current change, Eigen handily beats that code.

2. Make the logic for choosing number of simultaneous rows apply
unifiormly to 8, 4 and 2 rows instead of just 8 rows.

Since the default threshold for non-ARM devices is essentially
unchanged (32000 -> 32 * 1024), this change has no impact on non-ARM
performance. This was verified by running the same set of benchmarks
on a Xeon desktop.
2019-02-01 15:23:53 -08:00
bench Add recent gemm related changesets and various cleanups in perf-monitoring 2019-01-29 11:53:47 +01:00
blas
cmake Simplify handling of tests that must fail to compile. 2018-12-12 15:48:36 +01:00
debug
demos
doc Slightly extend discussions on auto and move the content of the Pit falls wiki page here. 2019-01-30 13:09:21 +01:00
Eigen Speed up row-major matrix-vector product on ARM 2019-02-01 15:23:53 -08:00
failtest PR 572: Add initializer list constructors to Matrix and Array (include unit tests and doc) 2019-01-21 16:25:57 +01:00
lapack Enable "old" CMP0026 policy (not perfect, but better than dozens of warning) 2018-12-08 18:59:51 +01:00
scripts
test bug #1669: fix PartialPivLU/inverse with zero-sized matrices. 2019-01-29 10:27:13 +01:00
unsupported Workaround lack of support for arbitrary packet-type in Tensor by manually loading half/quarter packets in tensor contraction mapper. 2019-01-30 16:48:01 +01:00
.hgeol
.hgignore
CMakeLists.txt Bypass inline asm for non compatible compilers. 2019-01-23 23:43:13 +01:00
COPYING.BSD
COPYING.GPL
COPYING.LGPL
COPYING.MINPACK
COPYING.MPL2
COPYING.README
CTestConfig.cmake
CTestCustom.cmake.in
eigen3.pc.in
INSTALL
README.md
signature_of_eigen3_matrix_library

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.

For more information go to http://eigen.tuxfamily.org/.

For pull request please only use the official repository at https://bitbucket.org/eigen/eigen.

For bug reports and feature requests go to http://eigen.tuxfamily.org/bz.