[all-commits] [llvm/llvm-project] 431c49: [mlir][linalg] Padding transformation: Write back ...

Matthias Springer via All-commits all-commits at lists.llvm.org
Tue Jun 27 06:01:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 431c49d6b6c7cfbae81fbe3ea6c73918ca9edcd8
      https://github.com/llvm/llvm-project/commit/431c49d6b6c7cfbae81fbe3ea6c73918ca9edcd8
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-06-27 (Tue, 27 Jun 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
    M mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    M mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Padding.cpp
    M mlir/test/Dialect/Linalg/transform-op-hoist-pad.mlir
    M mlir/test/Dialect/Linalg/transform-op-pad.mlir

  Log Message:
  -----------
  [mlir][linalg] Padding transformation: Write back result to original destination

Copy back the padded result to the original destination of the computation. This is important for bufferization, to ensure that the result of the computation does not suddenly materialize in a different buffer due to padding.

A `bufferization.copy_tensor` is inserted for every (unpadded) result. Such ops bufferize to memcpys, but they fold away, should the padding fold away.

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




More information about the All-commits mailing list