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

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 14:59:06 PST 2020


nicolasvasilache requested changes to this revision.
nicolasvasilache added a comment.
This revision now requires changes to proceed.

There are unsolved issues going from the buffer world to the tensor world when reductions are involved.
Changing the semantics of all the ops, including ones that don't have reductions, is not the right way to go here.
We need a proper way to tie a tensor result to a tensor operand.
We don't have a good mechanism for this atm and this should be discussed with the bigger group.

If the objective is to unblock yourself, you could add an attribute to encode the convention that result `p` flows into operand `k`.
You can make this attribute whatever you want to encode this in your local work and ensure that the lowering to buffers does the right mapping when seeing the attribute.

None of this should change the semantics of the ops: this has farther reaching consequences that we do not understand yet.
It is possible that an extra region that operates at the level of tensors is needed to encode this cleanly, along the lines of what Mahesh proposes 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