[PATCH] D74014: [mlir] [VectorOps] generalized vector.contract semantics

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 18:40:08 PST 2020


rriddle added inline comments.


================
Comment at: mlir/include/mlir/Dialect/VectorOps/VectorOps.td:152
     }
-    VectorType getAccType() {
-      return acc().getType().cast<VectorType>();
+    Type getAccType() {
+      return acc().getType();
----------------
nit: Can you format these to one line now?


================
Comment at: mlir/lib/Dialect/VectorOps/VectorOps.cpp:206
+static unsigned getTypeRank(Type type) {
+  auto vectorType = type.dyn_cast<VectorType>();
+  if (vectorType)
----------------
nit: Can you just inline this function? It only has one use case and isn't very large.


================
Comment at: mlir/lib/Dialect/VectorOps/VectorOps.cpp:234
+    if (map.getNumDims() == 0 && map.getNumResults() == 0 && rank == 0)
+      continue; // (i) -> () is parsed into empty map; accept for rank=0
     if (map.getNumDims() != numIterators)
----------------
Is this supposed to be `except for`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74014





More information about the llvm-commits mailing list