[PATCH] D72022: [mlir][Linalg] Extend generic ops to allow tensors

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 16:15:15 PST 2019


nicolasvasilache created this revision.
nicolasvasilache added reviewers: mehdi_amini, rriddle, jpienaar, antiagainst, ftynse.
Herald added subscribers: llvm-commits, shauheen, burmako.
Herald added a project: LLVM.

This diff adds support to allow `linalg.generic` and
`linalg.indexed_generic` to take tensor input and output
arguments.

The subset of output tensor operand types must appear
verbatim in the result types after an arrow. The parser,
printer and verifier are extended to accomodate this
behavior.

The Linalg operations now support variadic ranked tensor
return values. This extension exhibited issues with the
current handling of NativeCall in RewriterGen.cpp. As a
consequence, RewriteerGen is tentatively special-cased to
support the new behavior (better suggestions are welcome).

Relevant cleanups and name uniformization are applied.

Relevant invalid and roundtrip test are added.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72022

Files:
  mlir/include/mlir/Dialect/Linalg/EDSC/Builders.h
  mlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
  mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
  mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
  mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
  mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
  mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
  mlir/include/mlir/Dialect/VectorOps/VectorTransforms.h
  mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
  mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
  mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
  mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
  mlir/lib/Dialect/VectorOps/VectorTransforms.cpp
  mlir/test/Dialect/Linalg/invalid.mlir
  mlir/test/Dialect/Linalg/roundtrip.mlir
  mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
  mlir/tools/mlir-tblgen/RewriterGen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72022.235658.patch
Type: text/x-patch
Size: 59965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191231/28f9be6f/attachment.bin>


More information about the llvm-commits mailing list