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

Nicolas Vasilache via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 13:56:42 PDT 2020


nicolasvasilache created this revision.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.

This revision is the first in a set of improvements that aim at allowing
more generalized named Linalg op generation from a mathematical
specification.

This revision allows creating a new op and checks that the parser,
printer and verifier are hooked up properly.

This opened up a few design points that will be addressed in the future:

1. A named linalg op has a static region builder instead of an

explicitly parsed region. This is not currently compatible with
assemblyFormat so a custom parser / printer are needed.

2. Building region from an OperationState at parse time is not

straightforward because the region is not attached to an op, which is
required to fill it with a builder. A temporary fake op is created for
this purpose and the resulting region is taken from it.

3. The convention for structured ops and tensor return values needs to

evolve to allow tensor-land and buffer land specifications to agree

4. ReferenceIndexingMaps and referenceIterators will need to become

static to allow building attributes at parse time.

5. Error messages will be improved once we have 4. and we pretty print

in custom form.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78327

Files:
  mlir/include/mlir/Dialect/Linalg/EDSC/FoldedIntrinsics.h
  mlir/include/mlir/Dialect/Linalg/EDSC/Intrinsics.h
  mlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOpsSpec.tc
  mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
  mlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOpsInterface.td
  mlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
  mlir/include/mlir/Dialect/Utils/StructuredOpsUtils.h
  mlir/lib/Dialect/Linalg/EDSC/Builders.cpp
  mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
  mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
  mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
  mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
  mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
  mlir/test/Dialect/Linalg/invalid.mlir
  mlir/test/Dialect/Linalg/loops.mlir
  mlir/test/Dialect/Linalg/roundtrip.mlir
  mlir/test/Dialect/Linalg/transform-patterns.mlir
  mlir/test/EDSC/builder-api-test.cpp
  mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
  mlir/test/mlir-linalg-ods-gen/test-linalg-ods-gen.tc
  mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-gen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78327.258162.patch
Type: text/x-patch
Size: 84854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200416/50615442/attachment.bin>


More information about the llvm-commits mailing list