[PATCH] D78327: [mlir][Linalg] Create a named batch_matmul op and pipe it through.

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 13:33:49 PDT 2020


bondhugula marked an inline comment as done.
bondhugula added inline comments.


================
Comment at: mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:790-793
+  if (auto linalgOp = dyn_cast<LinalgOp>(parentOp))
+    return verifyYield(op, cast<LinalgOp>(parentOp));
 
+  return op.emitOpError("expected parent op with LinalgOp interface");
----------------
nicolasvasilache wrote:
> bondhugula wrote:
> > All of this looks problematic. Do you need this on YieldOp's verifier instead of LinalgOp's verifier? (Check for its terminator there and verify?)
> This is consistent with `LoopOps::YieldOp` and `ReturnOp`, what would justify diverging from that in Linalg specifically?
> If relevant this seems like it would warrant a global change.
> Note that LinalgOp is an interface though, not an Op per se.
> I'll have a followup NFC to rename globally.
> 
> Still, I was missing the `SingleBlockImplicitTerminator<"YieldOp">` so I added it where relevant + updated some tests.
I actually also meant to highlight the lines above as well (788-789). This change will go against unifying the loop dialect and linalg dialect yield ops (including any other) into a single std yield - but we don't have to worry about it all now. It can be easily adjusted when/if an std.yield is added later. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78327





More information about the llvm-commits mailing list