[all-commits] [llvm/llvm-project] 4dc72d: [mlir][Tensor] Add a FoldTensorSubsetOps pass and ...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Thu Mar 23 04:03:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4dc72d47ce88218ff3c6a7ae724beb6ab3ba2ade
      https://github.com/llvm/llvm-project/commit/4dc72d47ce88218ff3c6a7ae724beb6ab3ba2ade
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2023-03-23 (Thu, 23 Mar 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Affine/ViewLikeInterfaceUtils.h
    M mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
    M mlir/include/mlir/Dialect/Tensor/Transforms/Passes.h
    M mlir/include/mlir/Dialect/Tensor/Transforms/Passes.td
    M mlir/include/mlir/Dialect/Tensor/Transforms/Transforms.h
    M mlir/include/mlir/IR/AffineMap.h
    M mlir/lib/Dialect/Affine/Utils/ViewLikeInterfaceUtils.cpp
    M mlir/lib/Dialect/MemRef/Transforms/FoldMemRefAliasOps.cpp
    M mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
    M mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp
    M mlir/lib/Dialect/Tensor/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Tensor/Transforms/FoldTensorSubsetOps.cpp
    M mlir/lib/Dialect/Tensor/Transforms/MergeConsecutiveInsertExtractSlicePatterns.cpp
    M mlir/lib/Dialect/Tensor/Utils/CMakeLists.txt
    M mlir/lib/Dialect/Tensor/Utils/Utils.cpp
    M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
    M mlir/lib/IR/AffineMap.cpp
    M mlir/test/Dialect/MemRef/fold-memref-alias-ops.mlir
    A mlir/test/Dialect/Tensor/fold-tensor-subset-ops.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir][Tensor] Add a FoldTensorSubsetOps pass and patterns

These patterns follow FoldMemRefAliasOps which is further refactored for reuse.
In the process, fix FoldMemRefAliasOps handling of strides for vector.transfer ops which was previously incorrect.

These opt-in patterns generalize the existing canonicalizations on vector.transfer ops.
In the future the blanket canonicalizations will be retired.
They are kept for now to minimize porting disruptions.

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




More information about the All-commits mailing list