[PATCH] D76014: [mlir][Vector]Lower vector.contract to llvm.intr.matrix_multiply

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 07:35:56 PDT 2020


nicolasvasilache marked 7 inline comments as done.
nicolasvasilache added inline comments.


================
Comment at: mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h:42
+  auto mapB = AffineMapAttr::get(AffineMap::get(3, 0, {m, k}));
+  auto mapC = AffineMapAttr::get(AffineMap::get(3, 0, {n, m}));
+  auto maps = ArrayAttr::get({mapA, mapB, mapC}, indexingMaps.getContext());
----------------
aartbik wrote:
> note that we also have two "transposed" versions, ie. with either {m,n} or {n.m} but then the position of the k's swapped
I didn't want to invest too much in column major patterns in this PR, can we keep as a followup to add more patterns on a per need basis?
We can also do much more with transposes once we have them in MLIR + retargeting LLVM intrinsics.


================
Comment at: mlir/test/Dialect/VectorOps/vector-contract-transforms.mlir:1
 // RUN: mlir-opt %s -test-vector-contraction-conversion | FileCheck %s
+// RUN: mlir-opt %s -test-vector-contraction-conversion -vector-lower-matrix-intrinsics | FileCheck %s --check-prefix=MATRIX
----------------
aartbik wrote:
> note that in the pending CL, I have renamed this  flag and file, since it started to become less and less about contract only :-)
> 
> One of us will have to rebase and merge
Ack


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76014/new/

https://reviews.llvm.org/D76014





More information about the llvm-commits mailing list