[PATCH] D73923: [mlir] [VectorOps] refined description of vector.contract

Aart Bik via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 11:26:29 PST 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG3c7e9c34b38f: [mlir] [VectorOps] refined description of vector.contract (authored by aartbik).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73923

Files:
  mlir/include/mlir/Dialect/VectorOps/VectorOps.td


Index: mlir/include/mlir/Dialect/VectorOps/VectorOps.td
===================================================================
--- mlir/include/mlir/Dialect/VectorOps/VectorOps.td
+++ mlir/include/mlir/Dialect/VectorOps/VectorOps.td
@@ -83,13 +83,13 @@
 
       // 2D vector contraction with one contracting dimension (matmul).
       #contraction_accesses = [
-        (i, j, k) -> (i, k),
-        (i, j, k) -> (k, j),
-        (i, j, k) -> (i, j)
+        affine_map<(i, j, k) -> (i, k)>,
+        affine_map<(i, j, k) -> (k, j)>,
+        affine_map<(i, j, k) -> (i, j)>
       ]
       #contraction_trait = {
         indexing_maps = #contraction_accesses,
-        iterator_types = [parallel, parallel, reduction]
+        iterator_types = ["parallel", "parallel", "reduction"]
       }
 
       %3 = vector.contract #contraction_trait %0, %1, %2
@@ -98,13 +98,14 @@
       // 4D to 3D vector contraction with two contracting dimensions and
       // one batch dimension.
       #contraction_accesses = [
-        (b0, f0, f1, c0, c1) -> (c0, b0, c1, f0),
-        (b0, f0, f1, c0, c1) -> (b0, c1, c0, f1),
-        (b0, f0, f1, c0, c1) -> (b0, f0, f1)
+        affine_map<(b0, f0, f1, c0, c1) -> (c0, b0, c1, f0)>,
+        affine_map<(b0, f0, f1, c0, c1) -> (b0, c1, c0, f1)>,
+        affine_map<(b0, f0, f1, c0, c1) -> (b0, f0, f1)>
       ]
       #contraction_trait = {
         indexing_maps = #contraction_accesses,
-        iterator_types = [parallel, parallel, parallel reduction, reduction]
+        iterator_types = ["parallel", "parallel", "parallel",
+	                  "reduction", "reduction"]
       }
 
       %4 = vector.contract #contraction_trait %0, %1, %2


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73923.242383.patch
Type: text/x-patch
Size: 1683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200204/f4c05365/attachment.bin>


More information about the llvm-commits mailing list