[all-commits] [llvm/llvm-project] 63b393: [mlir] [VectorOps] Replace zero fma with mult for ...

Aart Bik via All-commits all-commits at lists.llvm.org
Tue Jun 30 09:04:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 63b3933d0c3381447a706193d3c0d84927a0fbed
      https://github.com/llvm/llvm-project/commit/63b3933d0c3381447a706193d3c0d84927a0fbed
  Author: aartbik <ajcbik at google.com>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M mlir/lib/Dialect/Vector/VectorTransforms.cpp
    M mlir/test/Dialect/Vector/vector-contract-transforms.mlir

  Log Message:
  -----------
  [mlir] [VectorOps] Replace zero fma with mult for vector.contract

More efficient implementation of the multiply-reduce pair,
no need to add in a zero vector. Microbenchmarking on AVX2
yields the following difference in vector.contract speedup
(over strict-order scalar reduction).

SPEEDUP     SIMD-fma SIMD-mul
4x4	    1.45 	 2.00
8x8	    1.40 	 1.90
32x32    	5.32 	 5.80

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D82833




More information about the All-commits mailing list