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
Loading
Please sign in to comment