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

Mahesh Ravishankar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 12:58:56 PDT 2020


mravishankar added inline comments.


================
Comment at: mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOpsSpec.tc:2
+ods_def<BatchMatmulOp>:
+def batch_matmul(A: f32(Batch, M, K), B: f32(K, N)) -> (C: f32(Batch, M, N)) {
+  C(b, m, n) = std_addf<k>(std_mulf(A(b, m, k), B(k, n)));
----------------
What is the reference for this specification ? ONNX/TF both seem to have a batch dimension for B as well. Without that this is effectively broadcasting B


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