[all-commits] [llvm/llvm-project] 307cfd: [mlir][Linalg] Mostly NFC - Refactor Linalg patter...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Mon May 4 08:22:29 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 307cfdf5338641e3a895857ef02dc9da35cd0eb6
      https://github.com/llvm/llvm-project/commit/307cfdf5338641e3a895857ef02dc9da35cd0eb6
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-05-04 (Mon, 04 May 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/CMakeLists.txt
    R mlir/include/mlir/Dialect/Linalg/Transforms/CMakeLists.txt
    R mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
    R mlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransforms.h
    A mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/Interchange.cpp
    R mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    R mlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
    A mlir/lib/Dialect/Linalg/Transforms/Loops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    A mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
    A mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    M mlir/test/Dialect/Linalg/transform-patterns.mlir
    M mlir/test/lib/DeclarativeTransforms/CMakeLists.txt
    R mlir/test/lib/DeclarativeTransforms/TestLinalgTransformPatterns.td
    M mlir/test/lib/Transforms/CMakeLists.txt
    M mlir/test/lib/Transforms/TestLinalgTransforms.cpp

  Log Message:
  -----------
  [mlir][Linalg] Mostly NFC - Refactor Linalg patterns and transformations.

Linalg transformations are currently exposed as DRRs.
Unfortunately RewriterGen does not play well with the line of work on named linalg ops which require variadic operands and results.
Additionally, DRR is arguably not the right abstraction to expose compositions of such patterns that don't rely on SSA use-def semantics.

This revision abandons DRRs and exposes manually written C++ patterns.

Refactorings and cleanups are performed to uniformize APIs.
This refactoring will allow replacing the currently manually specified Linalg named ops.

A collateral victim of this refactoring is the `tileAndFuse` DRR, and the one associated test, which will be revived at a later time.

Lastly, the following 2 tests do not add value and are altered:
- a dot_perm tile + interchange test does not test anything new and is removed
- a dot tile + lower to loops does not need 2-D tiling and is trimmed.




More information about the All-commits mailing list