[PATCH] D74365: [mlir][Linalg] Update semantics for Linalg generic ops with tensors.

Mahesh Ravishankar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 13:18:53 PST 2020


mravishankar added inline comments.


================
Comment at: mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:222
+  auto nOperands = op.getNumOperands();
+  auto nResults = op.getNumResults();
+  if (block.getNumArguments() != nOperands + nResults)
----------------
I think this is really a stop-gap measure, and has some semantics issues cause tensors are SSA values, and this is effectively implementing an in-place update semantics on tensors. I might be mistaken, but this only happens for cases where the iterator_types are "reduction". One way to get around this might be to use the approach in https://bugs.llvm.org/show_bug.cgi?id=44777 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74365





More information about the llvm-commits mailing list