[all-commits] [llvm/llvm-project] bb4c53: [mlir][tensor] Merge consecutive insert_slice/extr...

Lei Zhang via All-commits all-commits at lists.llvm.org
Tue Sep 20 17:00:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb4c53b7ba113b274ad0fd8d881313509947c896
      https://github.com/llvm/llvm-project/commit/bb4c53b7ba113b274ad0fd8d881313509947c896
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/Tensor/Transforms/Transforms.h
    M mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Tensor/Transforms/MergeConsecutiveInsertExtractSlicePatterns.cpp
    A mlir/test/Dialect/Tensor/fold-consecutive-insert-extract-slice.mlir
    M mlir/test/lib/Dialect/Tensor/TestTensorTransforms.cpp

  Log Message:
  -----------
  [mlir][tensor] Merge consecutive insert_slice/extract_slice ops

Consecutive tensor.insert_slice/tensor.extract_slice can be
created for the case like tiling convolution and then downsizing
2-D convolutions into 1-D ones. It hinders further transformations.
So adding these patterns to clean it up.

Given that bufferization is sensitive and have requirements over
the IR structure (see https://reviews.llvm.org/D132666),
these patterns are put in Transforms/ with separate entry points
for explicit collection.

Reviewed By: ThomasRaoux, mravishankar

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




More information about the All-commits mailing list