[PATCH] D74638: [mlir][Linalg] Allow specifiying zero-rank shaped type operands to linalg.generic ops.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 13:25:21 PST 2020


rriddle accepted this revision.
rriddle added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp:242
+      Value input = genericOp.getInput(i);
+      if (!input.getType().cast<ShapedType>().getRank())
+        indexedValues[i] = std_load(input);
----------------
nit: Wrap this in {} to match the else.


================
Comment at: mlir/lib/IR/AffineMap.cpp:354
   for (auto m : maps)
-    numResults += m ? m.getNumResults() : 0;
+    numResults += m && !m.isSingleConstant() ? m.getNumResults() : 0;
   unsigned numDims = 0;
----------------
nit: Can you wrap the predicate in ()?


================
Comment at: mlir/test/Dialect/Linalg/loops.mlir:392
+// CHECK:     store %[[a]], %[[ARG1]][%[[i]], %[[j]]]
\ No newline at end of file

----------------
nit: Add a newline here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74638





More information about the llvm-commits mailing list