[all-commits] [llvm/llvm-project] 3139cc: [mlir][Linalg] Add a pattern to decompose `linalg....

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Fri Jul 15 16:01:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3139cc766c86b09426893a7349763c347639cbdc
      https://github.com/llvm/llvm-project/commit/3139cc766c86b09426893a7349763c347639cbdc
  Author: Mahesh Ravishankar <ravishankarm at google.com>
  Date:   2022-07-15 (Fri, 15 Jul 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Linalg/Transforms/DecomposeLinalgOps.cpp
    A mlir/test/Dialect/Linalg/decompose-ops.mlir
    M mlir/test/lib/Dialect/Linalg/CMakeLists.txt
    A mlir/test/lib/Dialect/Linalg/TestLinalgDecomposeOps.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  [mlir][Linalg] Add a pattern to decompose `linalg.generic` ops.

This patch adds a pattern to decompose a `linalg.generic` operations
that
- has only parallel iterator types
- has more than 2 statements (including the yield)

into multiple `linalg.generic` operation such that each operation has
a single statement and a yield.
The pattern added here just splits the matching `linalg.generic` into
two `linalg.generic`s, one containing the first statement, and the
other containing the remaining. The same pattern can be applied
repeatedly on the second op to ultimately fully decompose the generic
op.

Differential Revision: https://reviews.llvm.org/D129704




More information about the All-commits mailing list