[all-commits] [llvm/llvm-project] 681f92: [mlir][VectorOps] Introduce a `vector.fma` op that...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Fri Feb 7 12:48:32 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 681f929f591616ca048aa470d030d985b6719216
      https://github.com/llvm/llvm-project/commit/681f929f591616ca048aa470d030d985b6719216
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-02-07 (Fri, 07 Feb 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/VectorOps/VectorOps.td
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/VectorOps/ops.mlir

  Log Message:
  -----------
  [mlir][VectorOps] Introduce a `vector.fma` op that works on n-D vectors and lowers to `llvm.intrin.fmuladd`

Summary:
The `vector.fma` operation is portable enough across targets that we do not want
to keep it wrapped under `vector.outerproduct` and `llvm.intrin.fmuladd`.
This revision lifts the op into the vector dialect and implements the lowering to LLVM by using two patterns:
1. a pattern that lowers from n-D to (n-1)-D by unrolling when n > 2
2. a pattern that converts from 1-D to the proper LLVM representation

Reviewers: ftynse, stellaraccident, aartbik, dcaballe, jsetoain, tetuante

Reviewed By: aartbik

Subscribers: fhahn, dcaballe, merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list