Commit 02f87fee authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

CPU runtime: Improve the performance of matrix-vector and

vector-matrix products.

This change makes the single threaded matrix-vector product explicit
so that Eigen will always delegate to an optimized GEMV kernel. This
is done by using an Eigen Matrix instead of the Eigen Tensor
implementation. This is the same optimization done by TensorFlow's
matmul op for GEMV.

This is used even in the multi-threaded case because it appears to
be faster than the multi-threaded version.

This change also expands the scope of the CPU runtime test to test
vec-mat and mat-vec on both single threaded and multi threaded modes.

PiperOrigin-RevId: 165630063
parent 4143410e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment