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

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 10:24:40 PST 2020


nicolasvasilache created this revision.
nicolasvasilache added reviewers: ftynse, stellaraccident.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.
nicolasvasilache updated this revision to Diff 242686.
nicolasvasilache added a comment.

Avoid deleting all the tests.


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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74075

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74075.242686.patch
Type: text/x-patch
Size: 7389 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/7366cde0/attachment.bin>


More information about the llvm-commits mailing list