[PATCH] D79135: [mlir][Linalg] Add support to lower named ops to loops.
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 15:40:05 PDT 2020
rriddle added inline comments.
================
Comment at: mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1119
static void printNamedStructuredOp(OpAsmPrinter &p, NamedStructuredOpType op) {
+ SmallVector<StringRef, 8> silentAttrNames{getIndexingMapsAttrName(),
+ getIteratorTypesAttrName()};
----------------
Can we use std::array here instead?
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp:126
-// Generic loop emitter, to be specialized on an op-per op basis.
-// TODO: Hook up to named ops interface and, later, retire when all named ops
-// are auto-generated.
+// Emits the MLIR for the scalar part of the generic op by:
+// 1. Emitting std_load and std_store ops for each input and output
----------------
nit: Please use /// for comments.
================
Comment at: mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp:186
+
+ // TODO(ntv): When a region inliner exists, use it.
+ // 2. Inline region, currently only works for a single basic block.
----------------
Depends on what you need, but you could use mlir::inlineRegion. You just need to provide an InlinerInterface.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79135/new/
https://reviews.llvm.org/D79135
More information about the llvm-commits
mailing list