[PATCH] D77761: [mlir][Vector] Update lowering of vector ops to llvm intrinsics to use row-major.

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 15:46:24 PDT 2020


nicolasvasilache created this revision.
nicolasvasilache added reviewers: fhahn, aartbik, ftynse.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.

LLVM matrix intrinsics recently introduced an option to support row-major mode.
This matches the MLIR vector model, this revision switches to row-major.

A corner case related to degenerate sizes was also fixed upstream.
This revision removes the guard against this corner case.

A bug was uncovered on the output vector construction which this revision also fixes.

Lastly, this has been tested on a small size and benchmarked independently: no visible performance regression is observed.

In the future, when matrix intrinsics support per op attribute, we can more aggressively translate to that and avoid inserting MLIR-level transposes.

This has been tested independently to work on small matrices.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77761

Files:
  mlir/include/mlir/Dialect/Vector/VectorOps.td
  mlir/lib/Dialect/Vector/VectorTransforms.cpp
  mlir/test/Dialect/Vector/vector-contract-transforms.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77761.256127.patch
Type: text/x-patch
Size: 10681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200408/e5e8eefb/attachment-0001.bin>


More information about the llvm-commits mailing list