[all-commits] [llvm/llvm-project] 1b2c8f: [mlir][linalg] Extract `GeneralizePadOpPattern` in...

Andrzej Warzyński via All-commits all-commits at lists.llvm.org
Tue Nov 26 00:11:36 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b2c8f104f9c6f26500ab608060bbc6b7f40f5e1
      https://github.com/llvm/llvm-project/commit/1b2c8f104f9c6f26500ab608060bbc6b7f40f5e1
  Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
  Date:   2024-11-26 (Tue, 26 Nov 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Conversion/TensorToLinalg/TensorToLinalg.cpp
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    A mlir/test/Dialect/Linalg/decompose-pad-tensor.mlir
    R mlir/test/Dialect/Linalg/generalize-pad-tensor.mlir
    M mlir/test/Dialect/Linalg/vectorization-pad-patterns.mlir
    M mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp

  Log Message:
  -----------
  [mlir][linalg] Extract `GeneralizePadOpPattern` into a standalone transformation (#117329)

Currently, `GeneralizePadOpPattern` is grouped under
`populatePadOpVectorizationPatterns`. However, as noted in #111349, this
transformation "decomposes" rather than "vectorizes" `tensor.pad`. As
such, it functions as:
  * a vectorization _pre-processing_ transformation, not
  * a vectorization transformation itself.

To clarify its purpose, this PR turns `GeneralizePadOpPattern` into a
standalone transformation by:
  * introducing a dedicated `populateDecomposePadPatterns` method,
  * adding a `apply_patterns.linalg.decompose_pad` Transform Dialect Op,
  * removing it from `populatePadOpVectorizationPatterns`.

In addition, to better reflect its role, it is renamed as "decomposition"
rather then "generalization".  This is in line with the recent renaming
of similar ops, i.e. tensor.pack/tensor.unpack Ops in #116439.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list